Liquid Web Managed Word Press

How To Force Subtitles In An Embedded YouTube Video

$.99* .COM Domain! You be you with GoDaddy!

It’s been about three years since YouTube introduced improved automatic captions for some of the videos; in a year they became more common and last year they were enabled for all English-language videos.By default, captions are disabled in an embedded video, however you may want to force the subtitles for one (or both) of the following reasons:

    You want to make your video more accessible (especially to hearing-impaired people who are

unaware of the option).

You are sharing an English video with non-English-speaking community.

Even if anyone can enable automatic subtitles manually, few people are actually aware of the ,

option so showing the captions by default would help a lot.

1. Add Subtitles in an Embedded Video (by Default)

Normally, if a user turned on captions once, YouTube will remember it and play subtitles by default until the user turns them off.

 What you can do is to change the default settings (show subtitles to users who don’t have the subtitles disabled or are logged out of Google / YouTube).

To enable subtitles by default, you will need to use &cc_load_policy=1 parameter as shown below:

Old-style code:

<object width=”550″ height=”343″><param name=”movie” value=”;hl=en_US&amp;&cc_load_policy=1“></param><param name=”allowFullScreen” value=”true”></param><param name=”allowscriptaccess” value=”always”></param><embed src=”;hl=en_US&amp;rel=0&cc_load_policy=1” type=”application/x-shockwave-flash” width=”550″ height=”343″ allowscriptaccess=”always” allowfullscreen=”true”></embed></object> 

Iframe (mobile-friendly) code:

<iframe width=”550″ height=”343″ src=”” frameborder=”0″ allowfullscreen></iframe>

2. Translate Subtitles in an Embedded Code

Despite the fact that this parameter is not “officially” described, YouTube has supported it for ages: “hl=” parameter in an embed code pre-selects the subtitle language. Most of these language code should work when used after the &hl= parameter: Language Codes

This means that the following code should work to play the video automatically with translated subtitles:

<object width=”550″ height=”343″>
<param name=”movie” value=”;fs=1&amp;hl=ru&amp;cc_load_policy=1&amp;rel=0&amp;hd=1″>
<param name=”allowFullScreen” value=”true”>
<param name=”allowscriptaccess” value=”always”>
<embed src=”;fs=1&amp;hl=ru&amp;cc_load_policy=1&amp;rel=0&amp;hd=1″ type=”application/x-shockwave-flash” width=”550″ height=”343″ allowscriptaccess=”always” allowfullscreen=”true”></embed>

However, due to reported  bugs, this code won’t work in many cases (maybe because of the numerous tweaks to the YouTube player). If you start experimenting with automatically translated captions, check out this g (one possible workaround is to use version=3 parameter in an embedded code).

Also, there is no way to translate captions in an iframe-based (newer) version of the embed player (sadly).

3. Linking to Videos with Captions

If you want to share a link to the video for viewers to see captions by default, you need to add this code at the end of the URL string:



Bhardwaj Brother's
Hello Readers, This is Bhardwaj Brother's, founder of Blogger BYNEXT. Here I write about Blogging, SEO, WordPress, Affiliate Marketing and Make Money Online for over 50,000 monthly readers

Leave a Reply

Your email address will not be published. Required fields are marked *

Optimization WordPress Plugins & Solutions by W3 EDGE