Embed Youtube with Captions on by default not working
Asked Answered
S

1

6

I'm trying to embed a Youtube movie, and would like Captions to be on by default.

From https://developers.google.com/youtube/player_parameters#cc_load_policy I understand I should use cc_load_policy=1.

I use the code html code below but it doesn't seem to work. That is, it loads with the captions off (you can manually turn captions on, so the video does have captions). What am I doing wrong?

I've tried the following two options:

<iframe src="https://www.youtube-nocookie.com/embed/xxxxxx?rel=0&amp;&showinfo=0&cc_load_policy=1" frameborder="0" allowfullscreen></iframe>
<iframe src="https://www.youtube-nocookie.com/embed/xxxxxx?rel=0&amp;&showinfo=0" cc_load_policy="1" frameborder="0" allowfullscreen></iframe>
Subdue answered 20/12, 2016 at 10:5 Comment(4)
Try cc_load_policy=1&cc_lang_pref=enInainability
Note: this wasn't working for me until I changed some settings on the videos themselves. I set the video language to English, the caption language to English, and added a transcription. I'm not sure which setting fixed it.Queenie
@bryanbraun: appears that captions on by default is only possible when you load your own captions (can't do so with auto-generated captions). source: support.google.com/youtube/forum/AAAAiuErobUlyT60UUHtHEIngenue
Aug 2020 update: @Benji's comment on the original question worked for me - after adding my own captions to the video (in addition to the automatically-generated ones) fixed the issue.Helsinki
I
12

Try adding cc_lang_pref , you wouldn't find in the official docs. but it's required

cc_load_policy=1&cc_lang_pref=en

You can change pref. language as per the locale representation of the language you have put in the video caption

Inainability answered 20/12, 2016 at 13:10 Comment(4)
Thank you. This solutions still works in January 2019!Boycie
but not in August 2020Curtis
this works in december 2020, however NOT for auto-generated captions. you have to go in, click "duplicate and edit" from the 'subtitles' button of the video (it should be the 5th button down when editing the video) and then it works!Nureyev
The Duplicate and Edit link is missing from my video. Sigh.Tussle

© 2022 - 2024 — McMap. All rights reserved.