Skip to content

Commit

Permalink
Fix canPlayType for Safaris
Browse files Browse the repository at this point in the history
  • Loading branch information
aksun1 committed Oct 26, 2024
1 parent 22f91b9 commit e49bc4b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/frontend/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -64,6 +64,7 @@ const App = () => {
ref={videoEl}
muted
autoPlay
loop
playsInline
onPlay={() => setVideoStatus(true)}
onPause={() => console.log("Teremos")}
Expand Down

0 comments on commit e49bc4b

Please sign in to comment.