Auto play Youtube Video when loaded in a div

Auto play Youtube Video when loaded in a div

Dear Sir

I am embeding following code using javascript  when i load 

following code (say) using database this information being in database, this varied based on the link clicked by  the user.


<iframe width="560" height="315" src=" https://www.youtube-nocookie.com/embed/zNWHsYsht9E?rel=0&amp;controls=0&amp;showinfo=0" frameborder="0" allowfullscreen></iframe>


I want to auto play the youTube video when loaded

My jquery code to display the youtube video


  1.  $.getJSON("sampleyoutubevideojsonfill.php", {id: $('#videoid').val()}, function(data){
  2.             $('#samplevideonamediv').text(data['name']);
  3.  
  4. $('#samplevideo').html(data['code']); // this is the embedded code
  5.         });    

let me repeat this code will be like


<iframe width="560" height="315" src=" https://www.youtube-nocookie.com/embed/zNWHsYsht9E?rel=0&amp;controls=0&amp;showinfo=0" frameborder="0" allowfullscreen></iframe>


and i wish to autoplay this youtube ideo

so I want to change this code as


<iframe width="560" height="315" src=" https://www.youtube-nocookie.com/embed/zNWHsYsht9E? autoplay=1&rel=0&amp;controls=0&amp;showinfo=0" frameborder="0" allowfullscreen></iframe>

Can use Jquery for this

if so how