font size happening but inside the player its not selecting the 200 value from the dropdown.
font size happening but inside the player its not selecting the 200 value from the dropdown.
font size happening but inside the player its not selecting the 200 value from the dropdown.
i tried the below code, its changing the caption size but in the select box inside the player is not selecting
<!-- <iframe width="560" height="315" src="https://www.youtube.com/embed/SqcY0GlETPk?cc_load_policy=1" frameborder="0" allowfullscreen></iframe> --><!-- <iframe src="https://www.youtube.com/embed/rB9ql0L0cUQ?cc_load_policy=0" frameborder="0" allowfullscreen></iframe> --><!-- <iframe src="https://www.youtube.com/embed/rB9ql0L0cUQ?cc_lang_pref=fr&cc_load_policy=1" frameborder="0" allowfullscreen></iframe> --><!DOCTYPE html><html><body><!-- 1. The <iframe> (and video player) will replace this <div> tag. --><div id="player"></div><script> // 2. This code loads the IFrame Player API code asynchronously. var tag = document.createElement('script'); tag.src = "https://www.youtube.com/iframe_api"; var firstScriptTag = document.getElementsByTagName('script')[0]; firstScriptTag.parentNode.insertBefore(tag, firstScriptTag); // 3. This function creates an <iframe> (and YouTube player) // after the API code downloads. var player; function onYouTubeIframeAPIReady() { player = new YT.Player('player', { height: '390', width: '640', videoId: 'M7lc1UVf-VE', playerVars: { cc_load_policy : 1 }, events: { onReady: onPlayerReady, onStateChange: onPlayerStateChange, onApiChange: onPlayerApiChange }, }); } function onPlayerReady(event) { event.target.setVolume(20); event.target.playVideo(); } var done = false; function onPlayerStateChange(event) { if (event.data == YT.PlayerState.PLAYING && !done) { setTimeout(stopVideo, 6000); done = true; } } function onPlayerApiChange(event) { player.setOption('captions', 'fontSize', 2); } function stopVideo() { player.stopVideo(); }</script></body></html>