Forum Discussion

BrandonKrogel's avatar
BrandonKrogel
Community Member
7 months ago

Parameters for embedded YouTube video

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?

  • Hi Brandon,

    Thanks for reaching out!

    I took a look at the video and saw that Spanish isn't an available subtitle language for the video. 

    Try choosing a video with Spanish subtitles available and let me know if this works for you!

    • BrandonKrogel's avatar
      BrandonKrogel
      Community Member

      Thanks. I will find one. Is there a script to run the auto-translate in Spanish or do you have to have Spanish subtitles?

  • Hi there.

    It may be that you are not using the correct language code, as the available subtitles are Spanish (Latin America) es-419 and Spanish (Mexico) es-MX. Try using those codes in your embed. I think the es code is reserved for Spanish.

    Thanks,
    Sam

  • LuisNoguera's avatar
    LuisNoguera
    Community Member

    Thank you, Sam, I was using ISO-639.1 or .2

    I appreciate your help. It is working now!!!