Parameters for embedded YouTube video

Feb 15, 2024

I embedded a YouTube video and added parameters as mentioned in this article. This is what I put <iframe width="560" height="315" src="https://www.youtube.com/embed/Code?autoplay=1&cc_lang_pref=es&cc_load_policy=1" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; allow='autoplay'; picture-in-picture" allowfullscreen=""></iframe>.

My goal is to have the video play with cc in Spanish. When I publish, the video displays and autoplays, but it does not show cc or set the default cc language to Spanish. Can anyone help?

6 Replies
Sam Hill

For example, this embed code will load with Spanish (Mexico)

<iframe width="1280" height="720" src="https://www.youtube.com/embed/n25VzikHK0M?autoplay=1&cc_lang_pref=es-MX&cc_load_policy=1" title="HECP 1A Intro to Hazardous Energy Sources Fina" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>