Hello,
Thanks for the great project. My team is currently using HasPlayer to provide an MSE-based smooth streaming solution on Edge and IE and it's working great.
However, we're currently integrating a custom closed-captions rendering layer for text tracks delivered via a smoothstreaming manifest. This work can be thought of as three separate parts:
- Reading the available tracks from a manifest.
- Selecting/unselecting an available track.
- Hooking into
cuechange events from the selected track once active in order to update our UI.
So far, we have successfully completed steps 1 and 2, using a combinations of the following HasPlayer APIs:
MediaPlayer.prototype.enableSubtitles() to enable the parsing of text tracks
MediaPlayer.prototype.getTracks() to read the available tracks
MediaPlayer.prototype.selectTrack() to select the desired track
Once a track has been selected, I can see that a text track appears in the textTracks array of the HTML video element on which HasPlayer is mounted, and a list of cues is also available.
Unfortunately, the activeCues array is never updated, and no cuechange events are emitted from the track. I see that you have proprietary cueEnter and cueExit events triggered directly from the MediaPlayer instance, but these do not seem to emit either.
Am I doing something wrong or misunderstanding the API?
I've been unable to find any general documentation or example closed captions integrations to reference.
Thanks in advance!
Hello,
Thanks for the great project. My team is currently using HasPlayer to provide an MSE-based smooth streaming solution on Edge and IE and it's working great.
However, we're currently integrating a custom closed-captions rendering layer for text tracks delivered via a smoothstreaming manifest. This work can be thought of as three separate parts:
cuechangeevents from the selected track once active in order to update our UI.So far, we have successfully completed steps 1 and 2, using a combinations of the following HasPlayer APIs:
MediaPlayer.prototype.enableSubtitles()to enable the parsing of text tracksMediaPlayer.prototype.getTracks()to read the available tracksMediaPlayer.prototype.selectTrack()to select the desired trackOnce a track has been selected, I can see that a text track appears in the
textTracksarray of the HTML video element on which HasPlayer is mounted, and a list of cues is also available.Unfortunately, the
activeCuesarray is never updated, and nocuechangeevents are emitted from the track. I see that you have proprietarycueEnterandcueExitevents triggered directly from the MediaPlayer instance, but these do not seem to emit either.Am I doing something wrong or misunderstanding the API?
I've been unable to find any general documentation or example closed captions integrations to reference.
Thanks in advance!