-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Distinguish between subtitle and caption tracks #206
Comments
Thanks, Mark. In the short term (v1.6.0), we could return the track object from addExternalCaptions. Would this work for now? Long term, I'd like to make sure that a future redesign of Shaka Player provides some more elegant way to represent the semantics you're looking for. Can you help me understand the difference between captions and subtitles? |
Sure that will work. Captions are targeted at the hearing impaired. For example if you are hearing impaired, and an English speaker the captions will contain English dialogue but also environmental noises that might influence the actors. [bang!] to indicate a loud noise, [creaking floorboards] to add suspense, etc... Subtitles are dialog translated to a different language, potentially you could have captions in different languages. The rendering of each is identical, captions may use the location features of WebVTT to indicate a noise came from the left or right of the screen. Not everyone will be interested in the distinction. But if you have ever watched a movie with closed captions when you wanted subtitles it can be very distracting. An example I watched recently was Deadlands in which the dialog is in Maori, which I don't speak but it included captions which wasn't ideal. |
Thanks for the explanation. We'll try to support that distinction better in v2.0. I've taken another look at the code, and it actually will be difficult to return TextTrack the way it is currently implemented. Let me see if there is something else we can do short-term. |
Issue #206 Change-Id: Id731da4b2d76a8fd62e316317600cae094c5255c
Issue #206 Change-Id: Iad89d455422e5e945ba974db2edb188d11753678
@sarge, Shaka v2 should now distinguish between caption and subtitle tracks. Thanks for the report! |
Thanks Joey!
|
As I understand it there is some work planned to look at subtitles, TTML and subtitle playlists. Dash itself has the concept of an adaption set for subtitles.
I was looking to add subtitles and potentially captions as well. While the implementation for each is essentially the same there is a semantic difference that I would like to capture.
I currently pass something like html5 tracks structure to our player and then inturn pass that to the shakaplayer.
The shakaplayer accepts a call like this
But once these are added there is no easy way to distinguish between them. As calling
getTextTracks()
will returnThere is no information that indicates that one is a subtitle and the other is a caption. Even if I call addExternalCaptions with a mime type extension like 'text/vtt+caption' that information is not available.
Ultimately I would like to create a UI to allow the user to select a subtitle or a caption in their language.
I could manage the association between my tracks structure and the getTextTracks but there a couple of assumptions I need to make. Either I assume that the call to getTextTracks will return the results in the same order that I called addExternalCaptions which is probably a safe thing to do, or I take the index of my tracks list and add +2 before calling
selectTextTrack(index + 2);
which seems a little mysterious (I'm experienced in off by one errors but off by two are less common:)).Perhaps the cleanest way would be to return the TextTrack object from the call to addExternalCaptions so I know which text track this refers to. Currently addExternalCaptions returns undefined.
An alternative would be to enrich the current text track model with a friendly name and perhaps even the kind into the call
addExternalCaptions('/subtitles-en.vtt', 'en', 'text/vtt', 'English');
which can be queried viagetTextTracks()
. This better aligns with the HTML5 specification.I hope that made sense
The text was updated successfully, but these errors were encountered: