why double click is needed to play iframe video using JS

I have an iframe youtube video which I am trying to click using a Tag. I got everything to work however I need to click on the image twice in order for the video to play. How can I make it a single click? Is it a focus issue to iframe?

<center><a href="javascript:void(0)" class="addto" id="playvideo" target="_self" onclick="someFunction2()">
    <img src="www.pngegg.com/pngimages/299/1011/png-clipart-moringa-leaf.png" width="300">
      
</a></center>




<script>
 function someFunction2(){

 $("#playvideo").click(function(){
 $("#widget2")[0].src = "https://www.youtube.com/embed/JtdGWMH28ns?autoplay=1";
    });
 }

I wish to click on the image with a single click to play the video rather click on it twice to play the video. any help