When I use google's YTPlayer to display a video with cc_load_policy=1
, and if the video in question has just a English (auto-generated) subtitle, captions still don't appear for me - shouldn't the English (auto-generated) one still be displayed in such a case?
I've tried setting the cc_lang_pref=en
as well as the hl=en
parameters but to no avail.
The cc_load_policy=1
parameter does work well with videos that do have an English subtitle, so I don't think the problem has anything to with code per se.
Is there perhaps a special language code for English (auto-generated) that I should be using instead?
new YT.Player("ytplayer_placeholder", {
width: "100%",
videoId: "4Uzbpj1UCEY",
playerVars: {cc_load_policy: 1},
events: {
'onReady': player_ready,
'onStateChange': schedule_buffering,
'onError': error_handler
}
});
The sample code above includes the youtube videoid that has such a problem. It should have displayed the video with the English (auto-generated) captions but nothing appears. I can manually click the CC button to get the captions to appear though, but I need that to happen automatically.