Skip to content

Segments metadata track is shown when changing source #5553

Closed

Description

@johnbyers

Description

If you had captions on, and then change the video source, you get some weird text on the screen. The guys on videojs slack thought it was the segments metadata track.

Steps to reproduce

  1. Visit the VHS test page at https://videojs.github.io/http-streaming/
  2. Play the video, choosing the very bottom closed caption track, "cc1". (Not sure what language it is for, but the captions show English)
  3. Reset the player's source by clicking the "Load" button again.
  4. Play the video, and see the weird text/json

Results

Expected

No captions after changing source.

Actual

Even though closed captions are set to "off" after switching the source, this appears as a caption over the video:
{"bandwidth":915905,"resolution":{"width":960,"height":540},"codecs":"mpra.40.2,avc1.4d401f","byteLength":1046972,"uri":"https://d2zihajmogu5jn.cloudfront.net/bipbop-advanced/gear3/main.ts","timeline":0,"playlist":"gear3/prog_index.m3u8","start":9.976644444444446,"end":19.91992222222223}

Error output

Additional Information

versions

videojs

I've seen it in 7.2.2 and 7.2.4

browsers

Chrome, Firefox, and IE11.
Edge doesn't even show captions.
Mobile Safari doesn't show that bottom "CC" caption option, so it doesn't seem to have the problem.

OSes

Microsoft Windows 10

plugins

None

Activity

  1. welcome commented on Nov 5, 2018

    @welcome

    👋 Thanks for opening your first issue here! 👋

    If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.
    To help make it easier for us to investigate your issue, please follow the contributing guidelines.

  2. gkatsev commented on Nov 5, 2018

    @gkatsev
    Member

    Ooh, thanks for the reproducible test case!

  3. ldayananda commented on Nov 5, 2018

    @ldayananda
    Contributor

    From taking the quickest of looks at this, I think it's because userPref.language and track.language(for the metadata-track) are both '' here:

    userPref.language === track.language) {

    We should probably ensure that text-track-display completely ignores non-visible track types

  4. ldayananda commented on Nov 5, 2018

    @ldayananda
    Contributor

    It might also make sense to clear the TextTrackList queue on source changes too?

    https://github.com/videojs/video.js/blame/8c92cbfb3e98259999224d5dd7778f35dfe1cab7/src/js/tracks/text-track-list.js#L31

  5. gkatsev commented on Nov 5, 2018

    @gkatsev
    Member

    clearing the event queue makes sense.
    We should update the preselectTrack method to ignore when language is the empty string and also ignore tracks that are chapters or metadata

  6. johnbyers commented on Nov 5, 2018

    @johnbyers
    Author

    What is special about that "cc1" caption? All the others have a language, but that one just says "cc1". Is there something different about it?

  7. gkatsev commented on Nov 5, 2018

    @gkatsev
    Member

    cc1 is the first caption track for 608 captions which live inside the video data. Not sure if that has language data but we should consider setting one for it as well.

  8. johnbyers commented on Nov 5, 2018

    @johnbyers
    Author

    That is interesting, I thought we were using WebVTT captions in our project, I guess they have turned into 608 captions

  9. gkatsev commented on Nov 6, 2018

    @gkatsev
    Member

    It looks like any caption without a language would trigger this issue.

  10. added a commit that references this issue on Nov 6, 2018
    5261c2a
  11. gkatsev commented on Nov 6, 2018

    @gkatsev
    Member

    I have a fix for this in #5556

  12. added a commit that references this issue on Nov 6, 2018
    c1cbce3
  13. locked as resolved and limited conversation to collaborators on May 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions