-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
External Subtitles don't get displayed #1596
Comments
Hi @cdgriffith, thanks for reaching out! I have a couple of theories on what might be going on, but want to check with your content, if possible. |
Sure, everything should be attached in a zip file. I just serve the directory with |
Thanks for the content! The player seems to think the list of text cues id empty. I'll investigate. As an aside (for the team), we don't communicate the text streams' information to the native controls. As a result, any content with subtitles, regardless how many tracks, results in a single "Shaka embedded track" entry. We should consider explicitly adding track objects to the video element, so they're accessible to native controls users. |
Okay, the latest master should be good now. I noticed that you're using Chrome's native media controls. |
Tested and confirmed working for me, thanks for the fast fix! Just as a heads up to anyone else using it, this method currently only supports a single track (as @ismena stated) and will always be the last one added, regardless if it is labeled 'caption' or 'subtitle'. |
The one native track represents what is currently streaming from Shaka Player. You can change what we stream using Also note that if you are using native controls, you may need to set the As for why we only have one native track, it is because we want to stream only what is being displayed. If we had multiple native tracks for different languages, we would have to download all of them since it would be hard (or impossible) to determine which is currently displayed and get events when it changes. So we reuse the same native track and handle buffering and changing languages internally. |
FYI, we are currently working on a UI layer for the player, that will allow for text track selection from the UI, listing all the text tracks available. |
We used to only create media source for external text when captions are turned on. It created problems with combining external text with native controls. Native captions button changes the state of a text track (unlike our button, which also triggers media source creation if needed), but because there is no media source for text, we had nothing to display. Fixes #1596. Backported to v2.4.x Change-Id: Ifeca9bf987f78061d77ccbc89bf94066061ebd74
Fix cherry-picked to v2.4.5. |
Have you read the FAQ and checked for duplicate open issues?:
Yes
What version of Shaka Player are you using?:
2.4.4, 2.5.0-beta
Can you reproduce the issue with our latest release version?:
Yes
Can you reproduce the issue with the latest code from
master
?:Have not tried
Are you using the demo app or your own custom app?:
Custom
If custom app, can you reproduce the issue using our demo app?:
Unsure how
What browser and OS are you using?:
Chrome 69.0.3497.100
Windows 10
What are the manifest and license server URIs?:
Any
What did you do?
Added subtitle track via addTextTrack, but is not shown or selectable via the UI
What did you expect to happen?
When hitting the CC button, to have the option of a 'English' subtitle. This works if adding it in the section of the HTML manually.
What actually happened?
Hitting CC only showed the usual 'Shaka Player TextTrack' and selecting it did nothing.
** Additional **
I am very new to using this, so it is probably user error, but have tried for a few days to no avail. Any help would be appreciated!
WebVTT file
HTML File
The text was updated successfully, but these errors were encountered: