Home
[RDK Central Wiki]
CMF
[Code Releases]
Hi,
We are testing DASH video playback in Lightning App.
We would like to know if there is any callback for Event from EventStream in DASH video stream?
If there is no callback, is there any suggested way to handle those Events?
Thanks.
Regards,
Percy
2 Comments
Deepthi Suseelan
Z-Percy Tse
It is possible to consume mediaplayer events in Lightning
http://cdn.dashjs.org/latest/jsdoc/streaming_MediaPlayerEvents.js.html
Example:
const events = ["playbackStateChanged", "playbackCompleted", "playbackSpeedChanged", "playbackFailed",
"mediaMetadata", "timedMetadata", "playbackProgressUpdate", "playbackStarted", "bufferingChanged",
"durationChanged", "decoderAvailable" ];
events.forEach(event => {
player.addEventListener(event, (e) => {
this.fire(event, {event: e});
});
});
Z-Percy Tse
Hi Deepthi Suseelan
Yes, we can handle it using dash.js
Thanks for the information!