Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to link youtube video without captions?

Is it possible to link youtube videos in HTML code without showing it's captions (subtitles)?

Let's say I have following video: http://www.youtube.com/watch?v=kTvHIDKLFqc . It has default english subtitles. However, when linking this video, I want to load it without them. Is there a possibility to do so with some kind of parameter in video?

I found this link with description how to do it, but it doesn't seem to work. If I try to use following format of link, it shows captions anyway: http://www.youtube.com/watch?v=kTvHIDKLFqc&cc_load_policy=0. Is it not working or did I misunderstand anything?

like image 276
Ondrej Slinták Avatar asked Feb 18 '10 10:02

Ondrej Slinták


2 Answers

I found the documentation to be a little misleading in that setting &cc_load_policy=1 does not show the closed captions by default, but enables toggling with the cc button in the video control bar when entered as shown here -

http://www.google.com/support/youtube/bin/answer.py?hl=en&answer=140174

like image 89
John Avatar answered Sep 28 '22 01:09

John


It seems cc_load_policy is a parameter that only accepts 1 as value, so even if you try to use 0 or off values to turn off captions, it won't make a difference (at least until today: 2015-05-18 2017-09-11): https://developers.google.com/youtube/player_parameters#cc_load_policy

2017-09-11 Solution: "Enable privacy-enhanced mode"

When you share a video in Youtube through the embedding option, you can click the "Enable privacy-enhanced mode" checkbox. This will change the URL to a different Youtube domain: https://www.youtube-nocookie.com

Just by doing this, even if the user has captions On by default, the nocookie option will not read the cookie associated to the user preferences (it's as if the user does not require captions by default).

I have created this codepen example in order to explain this:

  1. Try playing the "No parameters" video and then the cc_load_policy=1 video (it may not display captions due to user preferences, even if in the latter the CC button is activated - red underline);
  2. Then play the "nocookie domain" video and there should be no captions.
  3. Try activating captions in the "no parameters" video and refresh the page.
  4. All videos except the "nocookie domain" video will display captions.

Disclaimer: I have only seen this working in Chrome (Firefox and Edge always display captions in the nocookie domain, even in private navigations). If you activate/deactivate captions manually in the "nocookie domain" video, then it will display/hide captions in this domain when you refresh the page respectively.

Old stuff (partial solution for owners of the video)

cc_lang_pref does not accept off or Off as a value either...

I managed to turn off captions/subtitles for the default language of the video this way only for Safari and IE (I have captions in the default language and English - in my case, Chrome and Firefox seemed to have ignored the change, but I suggest to give it a shot anyway):

  1. In youtube if you go to your video's Info and Settings page and click Advanced Settings tab, set the Video Language to Not applicable.
  2. Save and go to Subtitles and CC page, where a pop-up appears explaining that «You must select a video language before adding subtitles or CC.» (this seems not to be true, because they even appear anyway).
  3. Choose your video's default language in the pop-up: this is what makes it understand that you don't need captions of your default language when the video is in the same default language the weird thing is, this is the step that will make them not to show up, and it's not because the same language is used in the captions.
  4. In the URL's video that you do not want to have captions do not use cc_load_policy parameter, but you can use cc_lang_pref to the default language like this: http://www.youtube.com/watch?v=kTvHIDKLFqc&cc_lang_pref=en.

Again, this seems to work only in some browsers (Firefox and Chrome not included), but hope it helps...

like image 34
Armfoot Avatar answered Sep 28 '22 01:09

Armfoot