From 6cea339b25b1c2a8e0d5fdaa3b115e029adc8f24 Mon Sep 17 00:00:00 2001 From: Samuel Newman <10959775+mozzius@users.noreply.github.com> Date: Fri, 2 Aug 2024 19:41:24 +0200 Subject: [PATCH] always use hlsjs --- src/view/com/util/post-embeds/VideoEmbedInner.web.tsx | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/view/com/util/post-embeds/VideoEmbedInner.web.tsx b/src/view/com/util/post-embeds/VideoEmbedInner.web.tsx index 4057974bb8..e8ea5c1b99 100644 --- a/src/view/com/util/post-embeds/VideoEmbedInner.web.tsx +++ b/src/view/com/util/post-embeds/VideoEmbedInner.web.tsx @@ -89,11 +89,7 @@ export function VideoPlayer({ const [hasSubtitleTrack, setHasSubtitleTrack] = useState(false) useEffect(() => { - if ( - ref.current && - !ref.current.canPlayType('application/vnd.apple.mpegurl') && - Hls.isSupported() - ) { + if (ref.current && Hls.isSupported()) { hls.attachMedia(ref.current) // initial value, later on it's managed by Controls hls.autoLevelCapping = 0 @@ -112,9 +108,7 @@ export function VideoPlayer({ useEffect(() => { if (ref.current) { - if (ref.current.canPlayType('application/vnd.apple.mpegurl')) { - ref.current.src = source - } else if (Hls.isSupported()) { + if (Hls.isSupported()) { hls.loadSource(source) } else { // TODO: fallback