Closed lvgg3271 closed 6 years ago
You can listen to hls events since this PR check it against master, I haven't released it yet.
fixed on latest version (>v3.0.0)
I've been messing around, trying to get your events to be triggered. I think I'm missing something obvious, how would I listen for hlsManifestLoaded
I've tried to do: player.on('hlsManifestLoaded', fn)
but it is never triggered.
I can see, through the code, that you are triggering the events via the Tech, but I don't think that bubbles up to the player which is the constant API...
Any help appreciated! I did not see any documentation to access the hls
object either. From the code, doesn't look like you can?
@spodlecki player.tech_.on('hlsManifestLoaded', fn)
This should do the trick for what you need.
The best way is to offer the 'hls' reference through player.tech_. sourceHandler_.hls
, so we can get more infornation and invoke some hls's method. For example, change the level through setting hls.currentLevel .
Thanks for your working first.
The problem is How can i get a reference to hls? I need to handle errors outside the videojs-contrib-hlsjs.js.