I need on my site when clicking on a video call to open an i-frame with the video that lies on YouTube (this has already been implemented). Moreover, depending on the current language, the video should open with subtitles and the corresponding language. Is it possible to do this? If it were possible, when opening a video, to pass a parameter to the language and the mandatory subtitles, it would be great. Is the question really real? And if not, how can you get out of the situation?
1 answer
According to the official documentation , the interface language can be set using the hl parameter, and the cc_load_policy parameter with a value of 1 used to enable subtitles. If necessary, you can use the cc_lang_pref parameter to set the subtitle language. This parameter works similarly to the hl parameter.
It should be borne in mind that cc_load_policy=1 does not work with auto- cc_load_policy=1 subtitles, they must be turned on manually.
Example of use:
https://www.youtube.com/embed/QRS8MkLhQmM?hl=en&cc_load_policy=1&cc_lang_pref=ru&autoplay=1 |