Skip to content

Commit 9cb1ba5

Browse files
authored
fix(sourceset): ignore blob urls when updating source cache (videojs#5371)
It's possible for us to get a blob url for sourceset, but when we do, we shouldn't update the source caches with that information. blob urls can arise when playback is done via Media Source Extension (MSE) such as m3u8 sources with @videojs/http-streaming (VHS).
1 parent 16f4e92 commit 9cb1ba5

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/js/player.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1291,6 +1291,14 @@ class Player extends Component {
12911291
src = srcObj.src;
12921292
type = srcObj.type;
12931293
}
1294+
1295+
// if we are a blob url, don't update the source cache
1296+
// blob urls can arise when playback is done via Media Source Extension (MSE)
1297+
// such as m3u8 sources with @videojs/http-streaming (VHS)
1298+
if (/^blob:/.test(src)) {
1299+
return;
1300+
}
1301+
12941302
// make sure all the caches are set to default values
12951303
// to prevent null checking
12961304
this.cache_.source = this.cache_.source || {};

0 commit comments

Comments
 (0)