Skip to content

Commit

Permalink
Fix: Handle query parameters in m3u8 URL validation
Browse files Browse the repository at this point in the history
  • Loading branch information
Yidaotus committed Dec 3, 2024
1 parent a210746 commit c8a366d
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 c8a366d

Please sign in to comment.