Skip to content

Commit

Permalink
fix: handle query parameters in m3u8 URL validation (redotvideo#335)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yidaotus authored Dec 4, 2024
1 parent a210746 commit 1d9431f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/2d/src/lib/components/Video.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,8 @@ export class Video extends Media {
video = document.createElement('video');
video.crossOrigin = 'anonymous';

if (src.endsWith('.m3u8')) {
const parsedSrc = new URL(src);
if (parsedSrc.pathname.endsWith('.m3u8')) {
const hls = new Hls();
hls.loadSource(src);
hls.attachMedia(video);
Expand Down

0 comments on commit 1d9431f

Please sign in to comment.