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.
I want to auto play the youTube video when loaded
My jquery code to display the youtube video
- $.getJSON("sampleyoutubevideojsonfill.php", {id: $('#videoid').val()}, function(data){
- $('#samplevideonamediv').text(data['name']);
-
- $('#samplevideo').html(data['code']); // this is the embedded code
- });
let me repeat this code will be like
and i wish to autoplay this youtube ideo
so I want to change this code as
Can use Jquery for this
if so how