title: Override playerVars controls:attrib dynamically for videos in youtube API
body: <p>I have below JS code for youtube API -</p>
  
  <pre><code>&lt;html&gt;
  &lt;script&gt;
  var tag = document.createElement('script');
  tag.src = "https://www.youtube.com/iframe_api";
  var ScriptTag = document.getElementsByTagName('script')[0];
  ScriptTag.parentNode.insertBefore(tag, ScriptTag);
  
  var player; 
        function onYouTubeIframeAPIReady() {                      
          player = new YT.Player('player', {
            height: '390',
            width: '640',
            videoId : 'YtF6p_w-cSc',                 
            events: {
              'onReady': onPlayerReady,
              'onStateChange': onPlayerStateChange
            }      
          });
        }       
  
         function onPlayerReady(event) {                                        
          event.target.playVideo();
        }
  
        var done = false;
        function onPlayerStateChange(event) {   
          if (event.data == YT.PlayerState.ENDED &amp;&amp; !done) {   
              player.loadVideoById ('4MJRS-cLozU');
          }       
        }
  
  &lt;/script&gt;
  &lt;body&gt;
    &lt;div id="player"&gt;&lt;/div&gt;  
   &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p><strong>Here is <a href="https://jsfiddle.net/onmqef11/" rel="nofollow noreferrer">jsfiddle</a></strong></p>
  
  <p><strong>Description -</strong> </p>
  
  <p>In the above code their are <code>2 videos</code> that are played one after the other
   [i.e. initially  <code>YtF6p_w-cSc</code> and then <code>4MJRS-cLozU</code>]. Now, when the first video is <code>loaded/played</code> i want to hide the control
  [i.e. <code>PlayerVar{control : 0}</code>] below highlighted part in yellow should be eliminated.
  <a href="https://i.stack.imgur.com/1ImaL.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1ImaL.jpg" alt="enter image description here"></a></p>
  
  <p>while for the other video i want it back [i.e control:1].</p>
  
  <p>In simple words i want to <code>hide control</code> for <code>1st video</code> and want it back for the <code>2nd video</code>.</p>
  
  <p>How to achieve this. 
  Please help.!!</p>