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
May 01, 2020Unknown User (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});
});
});
Unknown User (percy.tse)
May 04, 2020Hi Unknown User (dsuseelan)
Yes, we can handle it using dash.js
Thanks for the information!