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

Add subtitles to a Youtube iframe #479

Open
gamaliny opened this issue May 30, 2022 · 0 comments
Open

Add subtitles to a Youtube iframe #479

gamaliny opened this issue May 30, 2022 · 0 comments

Comments

@gamaliny
Copy link

Hello,

I had succesfully change dynamically the youtube id of a video by doing this:
this.$refs.plyr.player.media.src = this.urlVideo;
But unfortunately I don't know how to enable captions for this video, I don't have the option shown in my controls and even if I do:
this.$refs.plyr.player.captions = { active: true, language: 'FR', update: true, currentTrack: this.urlSubtitles};
It's not working. I'm not sure if currentTrack is the correct attribute to set the url of the subtitles, maybe I misunderstood its purpose.

I can't create a track element dynamically because it is an iframe, if anybody can help me to enable the captions button in the controls and add the url of a subtitles file dynamically it would be great !

Thanks,
Have a nice day,

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

No branches or pull requests

1 participant