-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
Have you read the FAQ and checked for duplicate open issues?
Yes
What version of Shaka Player are you using?
2.5.6 and 2.5.7
Can you reproduce the issue with our latest release version?
Yes
Can you reproduce the issue with the latest code from master
?
Yes
Are you using the demo app or your own custom app?
Yes
If custom app, can you reproduce the issue using our demo app?
Yes
What browser and OS are you using?
Chrome 79.0.3945.88 and Mac OS 10.14.6
For embedded devices (smart TVs, etc.), what model and firmware version are you using?
NA
What are the manifest and license server URIs?
-
http://rdmedia.bbc.co.uk/dash/ondemand/testcard/1/client_manifest-events.mpd
-
http://vm2.dashif.org/livesim/mup_30/testpic_2s/Manifest.mpd
These dont require license.
What did you do?
I use shaka-player.ui.js, which creates shakaplayer instance. I use following code to access player instance and add listeners for "onstatechange" and "onstateidle" events.
video = document.getElementById('video');
const ui = video['ui'];
const controls = ui.getControls();
shakaPlayer = controls.getPlayer();
shakaPlayer.addEventListener("onstatechange",onStateChanged);
shakaPlayer.addEventListener("onstateidle",onStateIdle);
function onStateChanged(event) {
console.log("onStateChanged Event ", event.state);
}
function onStateIdle(event) {
console.log("onStateIdle Event ", event.state);
}
What did you expect to happen?
I expected onStateChanged() and onStateIdle() methods to be called, with different events like
- onStateChanged Event attach
- onStateChanged Event media-source
- onStateIdle Event media-source
- onStateChanged Event manifest-parser
- onStateChanged Event manifest
- onStateChanged Event drm-engine
- onStateChanged Event load
- onStateIdle Event load
- onStateChanged Event unload
- onStateChanged Event detach
What actually happened?
If I use shaka-player.ui.js and add listener for "onstatechange" and "onstateidle" events. The callback methods are not called.
But if I manually create an instance shaka player and add listeners for "onstatechange" and "onstateidle" events, they seem to work.
SamplePlayers.zip
This has two players
- shakaplayerBug.html -> Event is not fired
- shakaplayerWorking.html -> Event is fired
I have also hosted the player to following location: