From e49bc4b417ec4e03e3bb81e2c3d09488a51b20f7 Mon Sep 17 00:00:00 2001 From: aksun1 Date: Sat, 26 Oct 2024 15:07:21 +0300 Subject: [PATCH] Fix canPlayType for Safaris --- app/frontend/src/App.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/frontend/src/App.tsx b/app/frontend/src/App.tsx index 58fe61c..cd87f90 100644 --- a/app/frontend/src/App.tsx +++ b/app/frontend/src/App.tsx @@ -21,8 +21,8 @@ const App = () => { if (videoEl.current) { const videoCurrent = videoEl.current; if ( - videoCurrent.canPlayType("application/vnd.apple.mpegurl") - === "probably" // This result type is ridiculous + videoCurrent.canPlayType("application/vnd.apple.mpegurl") === + "maybe" // This result type is ridiculous ) { // HLS is natively supported in Safari videoCurrent.src = url; @@ -64,6 +64,7 @@ const App = () => { ref={videoEl} muted autoPlay + loop playsInline onPlay={() => setVideoStatus(true)} onPause={() => console.log("Teremos")}