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

Captions: Native Captions disabled in Firefox #1862

Closed
gkatsev opened this issue Feb 13, 2015 · 12 comments
Closed

Captions: Native Captions disabled in Firefox #1862

gkatsev opened this issue Feb 13, 2015 · 12 comments

Comments

@gkatsev
Copy link
Member

gkatsev commented Feb 13, 2015

Investigate and fix why it's currently broken, so, we can use native captions in firefox.

@chemoish
Copy link
Member

Captions don't work for me entirely.

Firefox 40.0.3

videojs@4.12.15
vtt.js@0.12.1

A request is made to obtain node_modules/vtt.js/dist/vtt.js, but vtt.js doesn't have a dist directory.

screen shot 2015-10-14 at 5 43 07 pm

node_modules/vtt.js/lib/vtt.js

However, fixing path errors don't have an effect on captions.


Maybe similar…

#2397

@chemoish
Copy link
Member

vtt.js issue seems to be addressed #2426

@Dador
Copy link

Dador commented Oct 17, 2015

Probably the reason why native captions not working with Firefox & video.js:

Annoyingly, this doesn’t work for Firefox 35.0.1 which currently has all text tracks set to “disabled”, and the only way to override this value is to access the text track via the video itself.
More: http://www.iandevlin.com/blog/2015/02/javascript/dynamically-adding-text-tracks-to-html5-video

There is workaround on the link. Please take a look.

@gkatsev
Copy link
Member Author

gkatsev commented Apr 14, 2016

Looks like we can re-enable native captions in current versions of firefox. They're working for me now.

@gkatsev
Copy link
Member Author

gkatsev commented Apr 14, 2016

spoke too soon, I need to make sure that it's actually trying to use native captions and not just emulated captions.

@gkatsev
Copy link
Member Author

gkatsev commented Apr 14, 2016

I figured out why tracks on firefox are broken. This also might have to do with why #2062 doesn't display native tracks.
When videojs moves the video element in the DOM, firefox had already started loaded the text tracks but then when the element is moved the already partially loaded tracks are killed by firefox and then it doesn't re-load it. So, we can try and do what we do on iOS in firefox or at least we'd want to remove the track elements and re-add them after moving the element in firefox.

@gkatsev gkatsev self-assigned this Apr 14, 2016
@gkatsev
Copy link
Member Author

gkatsev commented Apr 14, 2016

Setting movingElementInDOM to false on firefox fixes this issue!

@gkatsev
Copy link
Member Author

gkatsev commented Apr 14, 2016

Well, maybe not fixes it but it seems to be helping out. At least I know what needs to happen here.

@gkatsev
Copy link
Member Author

gkatsev commented Apr 21, 2016

I was trying to get tech switching working but we were losing the text tracks when coming back to the html5 tech because firefox wasn't firing the addtrack event on the tracks again. And so this would require another patch and who knows how much other stuff we could require to get this working correctly.
I'm going to open a bug with Mozilla about this but otherwise leave emulated tracks on with native captions disabled because of browser bug.

@gkatsev
Copy link
Member Author

gkatsev commented Apr 21, 2016

Looks like there are related bugs already filed.
The main one is https://bugzilla.mozilla.org/show_bug.cgi?id=1242594
But https://bugzilla.mozilla.org/show_bug.cgi?id=1046255 and https://bugzilla.mozilla.org/show_bug.cgi?id=1242599 also relate.
This is my test case: http://plnkr.co/edit/xmG766?p=preview

closing as a browser bug for now.

@powrsurg
Copy link

I'm not sure how the 1046255 issue relates to VideoJS, but the other two have been fixed recently and marked for inclusion in the upcoming Firefox 49 and 50. If 1046255 does not seem to be an issue how soon after the release of Firefox 50 can we see native captions enabled? Does VideoJS typically wait a bit for users to update to the latest version so that it's less likely to have an older client running that has the bug requiring native tracks to be disabled?

@gkatsev
Copy link
Member Author

gkatsev commented Jul 14, 2016

1046255 means that when videojs is started, video.textTracks doesn't necessarily contain all the tracks that are actually available so that our menu doesn't include all the tracks.
What we'll probably do is have a user agent switch for firefox versions older than 50 and have them stay with the current functionality and otherwise get native captions. Of course, it would have to pass our tests and spot checking.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants