Skip to content

Commit

Permalink
fix: Remove old call to player.load() during snapshot restoration for…
Browse files Browse the repository at this point in the history
… players which share the video element with the ad integration. This is causing problems in Chrome/Edge with Video.js 6 due to the asynchronous nature of calling player.src(). (#257)
  • Loading branch information
misteroneill authored and incompl committed Jul 19, 2017
1 parent 1c633b5 commit afb3ccf
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/snapshot.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,7 @@ export function restorePlayerSnapshot(player, snapshotObject) {

// if the src changed for ad playback, reset it
player.src({ src: snapshotObject.currentSrc, type: snapshotObject.type });
// safari requires a call to `load` to pick up a changed source
player.load();

// and then resume from the snapshots time once the original src has loaded
// in some browsers (firefox) `canplay` may not fire correctly.
// Reace the `canplay` event with a timeout.
Expand Down

0 comments on commit afb3ccf

Please sign in to comment.