Skip to content
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

Text track kind is misspelled #808

Closed
johnBartos opened this issue May 16, 2017 · 2 comments
Closed

Text track kind is misspelled #808

johnBartos opened this issue May 16, 2017 · 2 comments
Labels
status: archived Archived and locked; will not be updated type: bug Something isn't working correctly type: docs Improvements or fixes to documentation

Comments

@johnBartos
Copy link

  • 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?
      Yes

  • Are you using the demo app or your own custom app?
    Both

    • If custom app, can you reproduce the issue using our demo app?
      Yes
  • What browser and OS are you using?
    Chrome, FF, Edge, IE; MacOS

  • What did you do?
    Calling getTextTracksin the trackschanged event

  • What did you expect to happen?
    Tracks have a kind of subtitles or captions

  • What actually happened?
    Kind is subtitle or caption

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 or captions here.

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/track

@joeyparrish
Copy link
Member

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:

  • The Shaka Player API uses subtitle and caption.
  • DASH manifests use subtitle and caption.
  • HLS manifests use subtitles.
  • HTMLTrackElement uses subtitles and captions.

We will take this as a docs bug and correct the typos in the externs. Thank you for the report!

@joeyparrish joeyparrish added type: bug Something isn't working correctly type: docs Improvements or fixes to documentation labels May 16, 2017
joeyparrish pushed a commit that referenced this issue May 23, 2017
In externs we used the working "subtitles" and "caoptions" but in
the code we use "subtitle" and "caption". This changes all
references to "subtitles" and "captions" in externs to be "subtitle"
and "caption".

Closes #808

Change-Id: I58b5cb3b5f5533af3c856cd32504d6b3620aee9a
@joeyparrish
Copy link
Member

This fix was just released in v2.1.2.

@shaka-project shaka-project locked and limited conversation to collaborators Mar 22, 2018
@shaka-bot shaka-bot added the status: archived Archived and locked; will not be updated label Apr 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: archived Archived and locked; will not be updated type: bug Something isn't working correctly type: docs Improvements or fixes to documentation
Projects
None yet
Development

No branches or pull requests

4 participants