1
0
mirror of https://github.com/videojs/video.js.git synced 2025-01-19 10:54:16 +02:00

fix(sourceset): ignore blob urls when updating source cache (#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).
This commit is contained in:
Gary Katsevman 2018-08-10 15:13:21 -04:00 committed by GitHub
parent 16f4e92eca
commit 9cb1ba5ae9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1291,6 +1291,14 @@ class Player extends Component {
src = srcObj.src;
type = srcObj.type;
}
// if we are a blob url, don't update the source cache
// blob urls can arise when playback is done via Media Source Extension (MSE)
// such as m3u8 sources with @videojs/http-streaming (VHS)
if (/^blob:/.test(src)) {
return;
}
// make sure all the caches are set to default values
// to prevent null checking
this.cache_.source = this.cache_.source || {};