I have not found this anywhere in my api docs, but with your youtube player object you can do the following to change it to English captions:
player.setOption("captions", "track", {"languageCode": "en"}); //Works for html5 ignored by AS3 player.setOption("cc", "track", {"languageCode": "en"}); //Works for AS3 ignored by html5
You can also do:
var module; if (testplayer.getOptions().indexOf("cc") !== -1) { module = "cc"; } else if (testplayer.getOptions().indexOf("captions") != -1) {{ module = "captions"; } var tracklist = testplayer.getOption(module, "tracklist"); // then iterate through the tracklist to see if "he" or "en" is there.
You have cc_load_policy = 1, but you can also enable it via js:
player.loadModule("captions"); //Works for html5 ignored by AS3 player.loadModule("cc"); //Works for AS3 ignored by html5
to disable it:
player.unloadModule("captions"); //Works for html5 ignored by AS3 player.unloadModule("cc"); //Works for AS3 ignored by html5
source share