Add subtitles to embedded video
-
Hi,
I’m trying to add subtitles to embedded YouTube video, but I’m not sure where to put the extra string.
I’m pasting the website URL here, since I’m a little bit annoyed that a google search with the site name refers to this forum: https://just-paste.it/kCyCISgP28
Here’s my code and what I did:
embedded video code:
<figure class=”wp-block-embed aligncenter is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio”><div class=”wp-block-embed__wrapper”>
</div></figure>instructions from Google:
Make captions automatically appear for an embedded video by adding “&cc_load_policy=1” to the video’s embed code.
You can also choose a caption language for the embedded video. To specify the caption language for the video that you’d like to embed, just add “&cc_lang_pref=fr&cc_load_policy=1” to the video’s embed code.
“cc_lang_pref” sets the language for the captions shown in the video.
“cc_load_policy=1” turns captions on by default.
“fr” represents the language code for French. You can look up 2-letter language codes in the ISO 639-1 standard.so I added “&cc_lang_pref=bg&cc_load_policy=1″ by glueing it directly to the video URL, but that doesn’t work, where should I put it?
<figure class=”wp-block-embed aligncenter is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio”><div class=”wp-block-embed__wrapper”>
</div></figure>That breaks the video.
- The topic ‘Add subtitles to embedded video’ is closed to new replies.