diff --git a/packages/2d/src/lib/components/Video.ts b/packages/2d/src/lib/components/Video.ts index fccae7fd..0275c53f 100644 --- a/packages/2d/src/lib/components/Video.ts +++ b/packages/2d/src/lib/components/Video.ts @@ -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);