You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 20, 2022. It is now read-only.
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!
The text was updated successfully, but these errors were encountered:
first of all, thanks to your congratulations about hasplayer.js! ;-)
It's quite difficult to answer your question....It could be a timestamp issue : have you take a look at those values in the cues?
if start value is never reached, it could explain why cues are never activated...
I've just tested your dash sample stream in the Dash-IF sample page. If you add the line to main.js webApp : player.addEventListener("cueEnter", onCueEnter.bind(this)); ... function onCueEnter(e) { console.log('cueEnter:: ' + e.data.text); }
I can see subtitles and the onCueEnter event is correctly triggered.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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:
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 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
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 nocuechange
events are emitted from the track. I see that you have proprietarycueEnter
andcueExit
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!
The text was updated successfully, but these errors were encountered: