Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.


    To learn more about how to use our BBCode feature, please click here.

    Thank you, Code Forum.

HTML & CSS Forcing captions in embedded YouTube video (iframe) in specific language

emilyannand

New Coder
Hello,

I'm trying to force captions on an embedded video and want them to show in Scottish Gaelic. The subtitles have been added to the youtube video.

This is the coding I currently have. I've added some extra code to make the embedded video stretch to the page width and to remove extra buttons.
HTML:
  <div style="position:relative;padding-top:56.25%;">
    <iframe src="https://www.youtube.com/embed/myvideosURL?controls=0" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" style="position:absolute;top:0;left:0;width:100%;height:100%;"></iframe>
  </div>

I think the code to force captions on is:
&cc_load_policy=1

And the code for the language is:
&hl=gd&cc_lang_pref=gd

I know very little about coding so hope someone on here can help :) Thanks so much in advance!
 
Last edited by a moderator:
Back
Top Bottom