Closed johnBartos closed 7 years ago
After careful review, we have determined that the typo is in the documentation for shakaExtern.Stream
and shakaExtern.Track
. Those refer to "captions" and "subtitles", even though the constants used are "caption" and "subtitle".
I understand that it is a little confusing to have constants named very similarly to the <track>
element attribute names, but the constants in shakaExtern.Track
and shakaExtern.Stream
are never applied to the kind
attribute in <track>
.
To summarize:
subtitle
and caption
.subtitle
and caption
.subtitles
.subtitles
and captions
.We will take this as a docs bug and correct the typos in the externs. Thank you for the report!
This fix was just released in v2.1.2.
What version of Shaka Player are you using? 2.1.1
Can you reproduce the issue with our latest release version? Yes
Can you reproduce the issue with the latest code from
master
? YesAre you using the demo app or your own custom app? Both
What browser and OS are you using? Chrome, FF, Edge, IE; MacOS
What did you do? Calling
getTextTracks
in thetrackschanged
eventWhat content did you load? http://storage.googleapis.com/shaka-demo-assets/angel-one/dash.mpd
If standard demo asset, which one?
If custom asset, what manifest and license server URIs?
How did you interact with the content, if at all?
What did you expect to happen? Tracks have a kind of
subtitles
orcaptions
What actually happened? Kind is
subtitle
orcaption
I believe these enums are wrong: https://github.com/google/shaka-player/blob/01d64584224d4a9546cb0982b7047a6079f08c28/lib/util/manifest_parser_utils.js#L90-L93
According to the spec, valid kinds are
subtitles
orcaptions
here.https://developer.mozilla.org/en-US/docs/Web/HTML/Element/track