From 4c2ede91e0df406b96975c910d022276153f1081 Mon Sep 17 00:00:00 2001 From: Jos Vooges | STH Date: Mon, 28 Sep 2026 20:41:38 +0200 Subject: [PATCH] Await VLC play in PlayerScreen so the iOS archive builds. --- apps/ios/VMC/Playback/PlayerScreen.swift | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/apps/ios/VMC/Playback/PlayerScreen.swift b/apps/ios/VMC/Playback/PlayerScreen.swift index 4810bfb..11f7512 100644 --- a/apps/ios/VMC/Playback/PlayerScreen.swift +++ b/apps/ios/VMC/Playback/PlayerScreen.swift @@ -51,12 +51,13 @@ struct PlayRequest: Identifiable { watchSessionId: String? = nil, watchKind: String? = nil, watchId: String? = nil, - logoUrl: String? = nil + logoUrl: String? = nil, + isLive: Bool = true ) -> 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, - startMs: 0, isLive: true, fallbackUrl: fallback, subtitleFileURL: nil, + startMs: 0, isLive: isLive, fallbackUrl: fallback, subtitleFileURL: nil, format: format, drm: drm, watchSessionId: watchSessionId, watchKind: watchKind, watchId: watchId, logoUrl: logoUrl ) @@ -652,7 +653,7 @@ struct PlayerScreen: View { error = vlc.errorMessage ?? "Livestream startte niet (geen beeld/geluid)." } } 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() } } try? await Task.sleep(nanoseconds: 250_000_000)