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

Allow viewing in-band metadata tracks from shimmed texttracklist #2272

Closed
wants to merge 4 commits into from

Conversation

gkatsev
Copy link
Member

@gkatsev gkatsev commented Jun 17, 2015

Fixed #2266.

@@ -61,6 +61,9 @@ vjs.Html5 = vjs.MediaTechController.extend({

if (this['featuresNativeTextTracks']) {
this.on('loadstart', vjs.bind(this, this.hideCaptions));
} else {
// allow us to view the in-band metadata tracks from our shimmed TextTrackList
this.on('loadedmetadata', vjs.bind(this, this.addInBandMetadataTracks));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure that inband tracks will show up by loadedmetadata. Did you find this in the spec or discover it experimentally?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Experimentally.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Though, this reminds me. I probably need to remove the old ones from the list on source change.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An in-band metadata track might not be evident until a decent amount of buffering has occurred. If there were a way to make the track registration a bit more robust for that case, that would be great.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll take a look whether the addtrack event fires for it. Might listen to both or something.

@gkatsev
Copy link
Member Author

gkatsev commented Jun 22, 2015

This should handle multiple in-band metadata tracks better and should be able to clear them out properly between video loads.
I'm not sure how easy it would be to test this.
Also, this would also need to be ported to master as well.

track,
i = 0;

for (i = 0; i < tracks.length; i++) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This shouldn't be necessary unless addtrack fired twice, right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I'm not certain it'll be necessarily useful. Even if you re-apply the same video you get a new track.
This was kind of left-over from when I had the removal of tracks in the same method as additions and so far I left it for "extra security" but I'm not certain it actually buys us much.

@dmlap
Copy link
Member

dmlap commented Jun 26, 2015

We should have a test for this.

@gkatsev
Copy link
Member Author

gkatsev commented Jun 26, 2015

I'll try and come up with some tests.

@gkatsev gkatsev changed the title Allow viewing in-band metadata tarcks from shimmed texttracklist Allow viewing in-band metadata tracks from shimmed texttracklist Jun 26, 2015
@gkatsev gkatsev added this to the Text Tracks milestone Jul 15, 2015
@gkatsev
Copy link
Member Author

gkatsev commented Jul 21, 2015

This will become obsolete as part of the work to fix #2367. I'm using this general framework for that fix anyway. Given that we've decided not to include it in stable, I'm going to close this.

@gkatsev gkatsev closed this Jul 21, 2015
@gkatsev gkatsev deleted the in-band-metadata-track branch March 8, 2016 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants