Autoplay youtube on Xibo with autosubtitle, it works already but why?

Peter once wrote a very good workaround:

That API script works fantastic on Minix X7 X8
Lately we observed this week it also displays auto subtitles english or dutch in Xibo from the spoken tekst. How is this achieved? As far as I know auto subtitle is only available in English.
But this afternoon we got confrontated with it in dutch… Is this the XIBO android player itself?
Or can we influence/manipulate these auto subtitles. Very usefull as most digital signaging is used “silent” (>> Full cantenes)

The subtitles come from Youtube and I would imagine it’s a preference of whoever uploaded the video to force subtitles on or off by default.

I believe you can add a parameter to the player cc_load_policy to control whether they are shown (if available) or not:
https://developers.google.com/youtube/player_parameters#autoplay

So something like:

player = new YT.Player('player', {
          height: '720',
          width: '1280',
          videoId: 'onldzSzdqlM',
          cc_load_policy: 0,
          events: {
            'onReady': onPlayerReady
          }
        });

in theory turns off the captions.

Youtube video annotations? We learned something new today. A new world opens…

you gave us the angle look for…

iv_load_policy

Supported players HTML5, AS3
Description Setting the parameter’s value to 1 causes video annotations to be shown by default, whereas setting to 3 causes video annotations to not be shown by default. The default value is 1.

I am bringing this topic up again regarding closed captions in Youtube

this is the HTML Embed for a video

what should I do to enable subtitles - without user interaction

thanks for the support

@Simon_Kuntam see my previous response. You’d change cc_load_policy to be 1 to enable subtitles.

Hello Alex
sorry I am asking a basic question
when setting this up in the embedded HTML section
I added the following

player = new YT.Player(‘player’, {
height: ‘1080’,
width: ‘1920’,
videoId: ‘hUYEBc2kjZs’,
cc_load_policy: 1,
events: {
‘onReady’: onPlayerReady
}
});

But the Display remains blank…am I doing something wrong ?
thanks for the support
simon