From eff948f7864aa7b16960db8798c0f46c5f7cde66 Mon Sep 17 00:00:00 2001 From: zeppi Date: Fri, 11 Jun 2021 13:32:56 -0400 Subject: [PATCH] toms fix for player timeout bug --- ui/component/viewers/videoViewer/internal/videojs.jsx | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/ui/component/viewers/videoViewer/internal/videojs.jsx b/ui/component/viewers/videoViewer/internal/videojs.jsx index 18ee60b2f..52cc59706 100644 --- a/ui/component/viewers/videoViewer/internal/videojs.jsx +++ b/ui/component/viewers/videoViewer/internal/videojs.jsx @@ -553,22 +553,17 @@ export default React.memo(function VideoJs(props: Props) { } let type = sourceType; - + let finalSource = source; // override type if we receive an .m3u8 (transcoded mp4) if (response && response.redirected && response.url && response.url.endsWith('m3u8')) { type = 'application/x-mpegURL'; + finalSource = response.url; } // Update player poster // note: the poster prop seems to return null usually. if (poster) player.poster(poster); - // Update player source - player.src({ - src: source, - type: type, - }); - // set playsinline for mobile player.children_[0].setAttribute('playsinline', ''); @@ -579,7 +574,7 @@ export default React.memo(function VideoJs(props: Props) { // Update player source player.src({ - src: source, + src: finalSource, type: type, });