Browse Source

chore: keep window vhs/mpc up to date on source switch (#883)

pull/889/head
Brandon Casey 5 years ago
committed by GitHub
parent
commit
3ba85fdfd9
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      scripts/index-demo-page.js

5
scripts/index-demo-page.js

@ -277,10 +277,13 @@
} else {
sources.dispatchEvent(newEvent('change'));
}
player.ready(() => {
player.on('loadedmetadata', () => {
if (player.vhs) {
window.vhs = player.tech_.vhs;
window.mpc = player.tech_.vhs.masterPlaylistController_;
} else {
window.vhs = null;
window.mpc = null;
}
});
cb(player);

Loading…
Cancel
Save