Skip to content

Commit

Permalink
fix(sourceset): ignore blob urls when updating source cache (#5371)
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
gkatsev authored Aug 10, 2018
1 parent 16f4e92 commit 9cb1ba5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/js/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 || {};
Expand Down

0 comments on commit 9cb1ba5

Please sign in to comment.