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

Double captions in Chrome #564

Closed
heff opened this issue Jun 5, 2013 · 5 comments
Closed

Double captions in Chrome #564

heff opened this issue Jun 5, 2013 · 5 comments
Labels

Comments

@heff
Copy link
Member

heff commented Jun 5, 2013

If you go to the Video.js homepage with the latest version of Chrome (27), you'll see the captions playing without clicking the captions button. If you then turn on the captions, there will be two sets of captions, the vjs custom captions and Chrome's built-in captions.

There seems to have been and update to Chrome that is causing the captions to show by default, even though the 'default' attribute isn't being used on any of the tracks. This at least wasn't happening when we launched the new site at the beginning of may.

This is different from #259, where captions would show twice when the default attribute was used.

@nosecreek
Copy link

I also noticed that this was not an issue when version 4 was initially released, but is now. Also, I've gone back and tested Video.js 3 and the issue is not present there.

@heff
Copy link
Member Author

heff commented Jun 5, 2013

It's not present? That's interesting. I can't think of anything that would've changed in 4.0 around that, but I guess something must have.

@vagari
Copy link
Contributor

vagari commented Jun 25, 2013

I can confirm it's also present in Chrome Canary (29.0.1547.2) so it'll be around for a while.

@vagari
Copy link
Contributor

vagari commented Jun 25, 2013

Found a post involving Chromium that seems to have a solution. I actually just threw this into a web page right under the video element (where I already had a script element performing some other actions).

var vidz = document.getElementsByTagName('video');
for (var i = 0, j = vidz.length; i < j; i++) {
    vidz[i].textTracks[0].mode = "hidden";
};

Hopefully something comparable can be implemented within the actual source (I'm guessing something does already exist, it's just not working with Chrome).

This works on Chrome v. 27 and the previously mentioned Canary.

@heff
Copy link
Member Author

heff commented Jun 27, 2013

This is what originally fixed the issue in Chrome.

tag.removeChild(j[0]);

Chrome must be parsing the tag data quicker now, so removeChild isn't enough to kill the default tags. Simply breaking that out to check for tags specifically and setting the mode to hidden should fix that issue.

It should probably be done with #511 in consideration.

heff added a commit to heff/video.js that referenced this issue Jun 28, 2013
@heff heff mentioned this issue Jun 28, 2013
@heff heff closed this as completed in ffd308e Jun 28, 2013
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants