Closed pdoria closed 6 years ago
Hi @pdoria ,
your stream has no text streamIndex, so captions array is logically empty. Could you, please, register the error event in order to know what happends (ex: mediaPlayer.addEventListener("error", onError);) ?
thanks, Nico
Hi Nico,
Thanks for joining this thread :)
Yes I know that that particular stream as no captions. Was just testing for audio streams, although I'll offer a manifest sample later on with captions ;)
As for what you have suggested we are already doing that, even turned the debug level to 4...
this.mediaPlayer.getDebug().setLevel(4);
this.mediaPlayer.addEventListener("error", this.onError);
onError(error:any) {
console.error('Media player error: ', error);
}
Unfortunately no error is thrown.
Achieving getting just the audio stream list would be victory now and I'm in a bit of loss as to what to do next.
TIA, Pedro
could you, please, show us the logs of the hasplayer.js?
Hi Nico,
Here it is hasplayer.zip
You'll notice that the completion of the MssParser occurs after getTracks completes ... so this might be the problem.
Thanks for your insights, Pedro
Hi @pdoria ,
indeed the problem is the way you registered the callback : the onLoad function is called when you do the registration. I think you should register the loadeddata event like this :
this.mediaPlayer.addEventListener("loadeddata", this.onload);
it's the same way that you did for error event....
Nico
Thank you Nico. Issue has been solved :)
Hi, calling getTracks() - for either type - always returns an empty array.
Stream sample: manifest.zip
Relevant code:
Any ideas would be greatly appreciated ;) TIA, Pedro