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

I need event for subtitles loaded! #823

Closed
salmazov opened this issue Nov 7, 2013 · 3 comments
Closed

I need event for subtitles loaded! #823

salmazov opened this issue Nov 7, 2013 · 3 comments
Labels

Comments

@salmazov
Copy link

salmazov commented Nov 7, 2013

How can I should know if my subtitles has been loaded?

@heff
Copy link
Member

heff commented Nov 7, 2013

They won't load until they're selected, but other than that I'm not sure what event we should be firing.

I took a quick look and couldn't find it. You might look through the spec to see if there's an event that should be fired, and then we can make that happen.
http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#the-track-element

@heff heff closed this as completed Nov 7, 2013
@mmcc
Copy link
Member

mmcc commented Nov 7, 2013

textTracks functions aren't exported yet, but they will be when #815 is pulled in. Then you'll be able to do something like this, but as @heff said, they still won't load until selected.

var video = videojs('your_video');
tracks = video.textTracks();
track = tracks[0]; // or whichever track you need
track.on('loaded', function(){ console.log("zomg") });

@salmazov
Copy link
Author

salmazov commented Nov 8, 2013

Thank you. Loaded is function I searched.

@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

No branches or pull requests

3 participants