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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
4 additions and
1 deletions
-
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); |
|
|
|