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 #1749

Closed
wants to merge 236 commits into from
Closed

Captions #1749

wants to merge 236 commits into from

Conversation

@gkatsev
Copy link
Member

@gkatsev gkatsev commented Dec 17, 2014

This PR supercedes the other PRs (#1736)

  • fix up one last test
  • more tests
  • fixup settings menu styles (prettier/reworked should come as a separate PR)
gkatsev added 30 commits Nov 11, 2014
Don't auto-add the textTrackDisplay component.
Add a 'featuresNativeTrack'. Currently hardcoded to false for everything
except the html5 tech.
Add textTracks and addTextTrack methods to html5 tech.
Proxy player level methods to tech if we're using native tracks.
Fix up track menu items to work with spec tracks or vjs tracks.
Also, if text tracks are old and use numerical mode values, use custom
tracks.
If an html tech is using custom tracks, remove track elements so we
don't accidentally show both custom and native captions.
Clean up showTextTrack slightly.
textTracks is completely inside of techs but needs to be called manually
because techGet requires the tech to be ready.
addTextTrack, unfortunately, currently forks. If when called, it doesn't
have a tech, it assumes that it's a custom implementation and does the
same work that MediaTechController#addTextTrack does.
Don't create a flash getter for textTracks.
Load up textTrackDisplay synchronously but have it do no work until the
player is ready (see the previous commit).
Add a check that delegates to MediaTechController's methods if we're in
Html5 but we are not using native tracks.
MenuButton's new 'update' method conflicted with volumeMenuButton's
update method which was used to update volume levels.
gkatsev added 4 commits Jan 26, 2015
Instead, default to langauge or "Unknown";
IE10 and below don't support pointer-events:none, so, we want to make
sure that the big play button will be clickable.
@heff

This comment has been minimized.

Copy link

@heff heff commented on test/unit/tracks/text-track.js in e202f9b Feb 10, 2015

Instead of checking instanceof is there a property that's on both versions of the lists that we could check here so that this works in IE8 too?

This comment has been minimized.

Copy link
Owner Author

@gkatsev gkatsev replied Feb 10, 2015

I could duck type these.

This comment has been minimized.

Copy link

@heff heff replied Feb 10, 2015

Yeah, that seems more valuable than just turning it off for ie8.

This comment has been minimized.

Copy link
Owner Author

@gkatsev gkatsev replied Feb 13, 2015

Done.

@heff

This comment has been minimized.

Copy link

@heff heff commented on test/unit/tracks/text-track-controls.js in e202f9b Feb 10, 2015

I don't think that just saying this breaks in IE8 is a good enough reason to turn it off for ie8. :-P

Why isn't it working in IE8? And if the goal is to have tracks that work everywhere, why is this test still valuable otherwise?

This comment has been minimized.

Copy link
Owner Author

@gkatsev gkatsev replied Feb 10, 2015

This test specifically tests a issue that ios7 has. So, even if it doesn't run on IE8, it's still valuable to have.
I do not remember why it was working on IE8 or if I investigated it.

This comment has been minimized.

Copy link

@heff heff replied Feb 10, 2015

Ok, cool. I think we either need a much more clear comment or to scope it to vjs.IS_IOS instead so it's more obvious what the test is limited for.

This comment has been minimized.

Copy link
Owner Author

@gkatsev gkatsev replied Feb 13, 2015

Decided to leave a more elaborate comment and open an issue: videojs#1861

@@ -21,7 +21,8 @@
},
"main": "./dist/video-js/video.js",
"dependencies": {
"videojs-swf": "4.5.3"
"videojs-swf": "4.5.3",
"vtt.js": "git+https://github.com/gkatsev/vtt.js.git#shim-build"

This comment has been minimized.

@heff

heff Feb 10, 2015
Member

Do the recent merges mean we can change this to the main lib yet?

This comment has been minimized.

@gkatsev

gkatsev Feb 10, 2015
Author Member

Unfortunately, not yet. All the IE8 changes went in but the shim build stuff still need to get tweaked first.

pointer-events: none;
}

/* Increase font-size when fullscreen */

This comment has been minimized.

@heff

heff Feb 10, 2015
Member

Is there resource or discussion we can point to in the comment for why we're doing this? I actually don't know why myself.

This comment has been minimized.

@gkatsev

gkatsev Feb 10, 2015
Author Member

Hm... I think this should be removed, though, it's actually not doing anything right now because vttjs overrides the font-size manually. I think it got added when I merged some stuff from master.

This comment has been minimized.

@gkatsev

gkatsev Feb 13, 2015
Author Member

Removed.

if (supportsTextTracks && vjs.TEST_VID.textTracks.length > 0) {
supportsTextTracks = typeof vjs.TEST_VID.textTracks[0]['mode'] !== 'number';
}
if (supportsTextTracks && vjs.IS_FIREFOX) {

This comment has been minimized.

@heff

heff Feb 10, 2015
Member

It feels like a shame to disable native captions in firefox completely. I feel like we should submit a bug, or see if one already exists that we can track for this.

This comment has been minimized.

@gkatsev

gkatsev Feb 10, 2015
Author Member

Yeah. I just didn't have time to figure out what was going on. Still not certain where the root of the problem is.

This comment has been minimized.

@heff

heff Feb 10, 2015
Member

Ok, if that's gonna take work, can we add a TODO comment here for now so we can move forward?

This comment has been minimized.

@gkatsev

gkatsev Feb 13, 2015
Author Member

Done.

var player = this.player_,
tracks,
textTrackListChanges = function() {
var textTrackDisplay = player.getChild('textTrackDisplay'),

This comment has been minimized.

@heff

heff Feb 10, 2015
Member

Was there a specific reason we couldn't let the textTrackDisplay handle updating itself instead of requiring the tech to update it?

This comment has been minimized.

@gkatsev

gkatsev Feb 10, 2015
Author Member

Not certain. It's possible that this function can be moved to the text track display.

This comment has been minimized.

@heff

heff Feb 10, 2015
Member

Same here as far as adding a TODO comment.

This comment has been minimized.

@gkatsev

gkatsev Feb 13, 2015
Author Member

Done.

vjs.IS_FIREFOX = oldIsFirefox;
});

test('if native text tracks are not supported, create a texttrackdisplay', function() {

This comment has been minimized.

@heff

heff Feb 10, 2015
Member

This appears to be a duplicate test of line 197

This comment has been minimized.

@gkatsev

gkatsev Feb 13, 2015
Author Member

Huh, so it is.

@heff
Copy link
Member

@heff heff commented Feb 12, 2015

@gkatsev I'll work on some of the remaining cleanup tasks.

I don't see a resolution to the last chapters related question. Were you able to figure that out?

@gkatsev gkatsev modified the milestone: Captions Feb 13, 2015
@gkatsev
Copy link
Member Author

@gkatsev gkatsev commented Feb 13, 2015

@heff pushed TODOs. Would you want me to merge master into this branch so it's easier to merge this back into master?

@heff
Copy link
Member

@heff heff commented Feb 13, 2015

Thanks for handling those! Yeah, if you have a minute to merge master you're in a better place to understand merge conflicts, but otherwise I can take care of it.

Conflicts:
	src/js/media/html5.js
	src/js/player.js
@gkatsev
Copy link
Member Author

@gkatsev gkatsev commented Feb 13, 2015

@heff merged in.

gkatsev added 2 commits Feb 13, 2015
@gkatsev gkatsev closed this in 4e5c28c Feb 13, 2015
@gkatsev gkatsev deleted the gkatsev:tt-with-style branch Aug 12, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants
You can’t perform that action at this time.