Await VLC play in PlayerScreen so the iOS archive builds.
This commit is contained in:
parent
0426a4c6ea
commit
4c2ede91e0
1 changed files with 5 additions and 4 deletions
|
|
@ -51,12 +51,13 @@ struct PlayRequest: Identifiable {
|
||||||
watchSessionId: String? = nil,
|
watchSessionId: String? = nil,
|
||||||
watchKind: String? = nil,
|
watchKind: String? = nil,
|
||||||
watchId: String? = nil,
|
watchId: String? = nil,
|
||||||
logoUrl: String? = nil
|
logoUrl: String? = nil,
|
||||||
|
isLive: Bool = true
|
||||||
) -> PlayRequest {
|
) -> PlayRequest {
|
||||||
PlayRequest(
|
PlayRequest(
|
||||||
url: url, title: title, mediaType: "live", mediaFileId: nil,
|
url: url, title: title, mediaType: isLive ? "live" : "vod", mediaFileId: nil,
|
||||||
movieId: nil, episodeId: nil, seriesId: nil,
|
movieId: nil, episodeId: nil, seriesId: nil,
|
||||||
startMs: 0, isLive: true, fallbackUrl: fallback, subtitleFileURL: nil,
|
startMs: 0, isLive: isLive, fallbackUrl: fallback, subtitleFileURL: nil,
|
||||||
format: format, drm: drm, watchSessionId: watchSessionId,
|
format: format, drm: drm, watchSessionId: watchSessionId,
|
||||||
watchKind: watchKind, watchId: watchId, logoUrl: logoUrl
|
watchKind: watchKind, watchId: watchId, logoUrl: logoUrl
|
||||||
)
|
)
|
||||||
|
|
@ -652,7 +653,7 @@ struct PlayerScreen: View {
|
||||||
error = vlc.errorMessage ?? "Livestream startte niet (geen beeld/geluid)."
|
error = vlc.errorMessage ?? "Livestream startte niet (geen beeld/geluid)."
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
vlc.play(url: request.url, startMs: request.startMs, subtitleFileURL: request.subtitleFileURL)
|
await vlc.play(url: request.url, startMs: request.startMs, subtitleFileURL: request.subtitleFileURL)
|
||||||
progressTask = Task { await progressLoop() }
|
progressTask = Task { await progressLoop() }
|
||||||
}
|
}
|
||||||
try? await Task.sleep(nanoseconds: 250_000_000)
|
try? await Task.sleep(nanoseconds: 250_000_000)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue