How make fancybox auto close when youtube video id done?
问题 How i can make fancybox auto close when youtube video ended? 回答1: This isn't as simple as it sounds: First determine if you are going to use the embed or iframe player. Follow the embed player API or iframe player API examples to initialize the API. Use the "onComplete" fancybox callback functon to set up the player once the popup is open. In the callback, make sure you add an onStateChange event listener so you can determine when the video has completed (the value of zero means the video has