Youtube Video Autoplay in popup

前端 未结 4 1380
一向
一向 2021-02-03 11:08

I\'ve made a popup and placed a youtube video in it. I set video to autoplay. But the problem is video plays when i open the page. It is auto play in global and i want it to aut

4条回答
  •  北荒
    北荒 (楼主)
    2021-02-03 11:40

    Thanks to @Jarod Means script! It works and I uses it since it only requires jQuery (Simple solution = Great solution). But I developed it for multiple video clips, which is great in slideshows, as an example or whenever you need this solution for more then one clip in the same dom. I also made it so it is completely in jQuery.

    Just posting it so you can use it as you wish.

    
    
    
        
        
        Youtube-player test 
        
    
    
        
        
    
        
    
    
    

    I guess you can keep on changing/developing this with html, css and jQuery to whatever fit your needs. :)

提交回复
热议问题