Skip to content

Commit

Permalink
remove endswith m3u8 check
Browse files Browse the repository at this point in the history
  • Loading branch information
0xrohitgarg committed Nov 27, 2024
1 parent 65a8e9c commit 20c6bdd
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/components/hooks/useVideoJSPlayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,8 @@ export function usePlayer(emit, props) {
const player = ref(null);

const getSource = () => {
let src = props.streamUrl;
let type = "video/mp4";

if (src.endsWith("m3u8")) {
type = "application/x-mpegURL";
}
const src = props.streamUrl;
const type = "application/x-mpegURL";

return { src, type };
};
Expand Down Expand Up @@ -163,7 +159,7 @@ export function usePlayer(emit, props) {
playerState.playing = true;
break;
case "ended":
togglePlay()
togglePlay();
break;
}
emit(customEvent, { event });
Expand Down

0 comments on commit 20c6bdd

Please sign in to comment.