From 77fd3e92886930ce2501c6fad39859921165ac00 Mon Sep 17 00:00:00 2001 From: Bnyro Date: Mon, 7 Aug 2023 18:06:27 +0200 Subject: [PATCH] fix: playback of live videos --- .../java/com/github/libretube/ui/fragments/PlayerFragment.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/github/libretube/ui/fragments/PlayerFragment.kt b/app/src/main/java/com/github/libretube/ui/fragments/PlayerFragment.kt index 115835b58..333ec1fdb 100644 --- a/app/src/main/java/com/github/libretube/ui/fragments/PlayerFragment.kt +++ b/app/src/main/java/com/github/libretube/ui/fragments/PlayerFragment.kt @@ -1339,8 +1339,8 @@ class PlayerFragment : Fragment(), OnlinePlayerOptions { MimeTypes.APPLICATION_M3U8 ) ) - exoPlayer.setMediaSource(mediaSource) - ProxyHelper.unwrapStreamUrl(streams.hls!!).toUri() to MimeTypes.APPLICATION_M3U8 + withContext(Dispatchers.Main) { exoPlayer.setMediaSource(mediaSource) } + return } // NO STREAM FOUND else -> {