• 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


New Coder

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.
  <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>

I think the code to force captions on is:

And the code for the language is:

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