dash.js icon indicating copy to clipboard operation
dash.js copied to clipboard

Need to update DASH event API and documentation

Open waqarz opened this issue 6 years ago • 1 comments

Following up on email discussion at https://groups.google.com/forum/#!topic/dashjs/5-Np_mQjlQ8

  1. API being used for DASH event listing is: MediaPlayer.on and MediaPlayer.off, but the API documentation of these at http://cdn.dashjs.org/latest/jsdoc/module-MediaPlayer.html does not document this functionality. Rather, the type string is prescribed to be "MediaPlayerEvents".

  2. Ideally, MediaPlayerEvents and DASH events should be separate interfaces, since they have a completely different nature (the latter is specifically DASH media related)

  3. Otherwise, if we must use the same API for MediaPlayerEvents and DASH events, we should not be slipping in an event URI in place of MediaPlayerEvents string. I imagine the API would have some categories, like the type being dashjs.events.mediaplayerevents.xyz, dashjs.events.dashevents.scte35 ... etc. Still this seems a very bad solution and should be avoided.

  4. Finally, there seems to be no worth-using response codes, specifically for DASH events API there should be a pass/fail response, or could it be realized throwing exception?

waqarz avatar Aug 02 '18 16:08 waqarz

@waqarz, thanks for documenting this so well. I am going to take care of this. Thanks!

epiclabsDASH avatar Aug 06 '18 21:08 epiclabsDASH