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

Default subtitle not working #1011

Closed
tomasdev opened this issue Feb 13, 2014 · 6 comments
Closed

Default subtitle not working #1011

tomasdev opened this issue Feb 13, 2014 · 6 comments

Comments

@tomasdev
Copy link

As per https://github.com/videojs/video.js/blob/v4.3.0/docs/guides/tracks.md it reads a default attribute but even with that property set on the <track> element, subtitles won't load by default.

On the code at vjs.TextTrack.prototype.show it says:

  • The showing by default state is used in conjunction with the default attribute on track elements to indicate that the text track was enabled due to that attribute.

It feels to me like it's a bug, and the code isn't handling the default attribute on children tracks correctly.

Setup code:

<video autoplay id="video_player" width="100%" height="100%" class="video-js vjs-default-skin" controls>
        <source src="video" type="video/mp4" />
        <track kind="subtitles" src="validUrl.srt" default srclang="es" label="Spanish" />
</video>

And obviously call videojs('video_player'); in JavaScript

@tomasdev
Copy link
Author

Duplicated of #656

@heff
Copy link
Member

heff commented Feb 13, 2014

Thanks for closing the duplicate. I hope we can get that solved soon, but focused on other things like HLS right now.

@tomasdev
Copy link
Author

@heff we could do a PR with the if commented at #656, tho

@heff
Copy link
Member

heff commented Feb 13, 2014

Did that fix the issue for you? I feel like I tried that quickly and it didn't work as expected. Forgetting the specific details though.

@tomasdev
Copy link
Author

@heff yes it did.

@heff
Copy link
Member

heff commented Feb 18, 2014

Ok, then yeah, a PR would be helpful.

@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
None yet
Projects
None yet
Development

No branches or pull requests

2 participants