How i can make fancybox auto close when youtube video ended?
相关问题
- Unable to Full Screen Youtube Video Inside Custom
- Thumbnails from the Vimeo website harder than YouT
- Wait until page is loaded when using XMLHTTP appro
- handling errors in youtube data api in javascript
- jquery fancybox triggered click only working once
相关文章
- How to dynamically add wmode=transparent to Youtub
- Detect or Approximate Bluetooth Latency on Android
- YouTube Video in R markdown
- How to prevent YouTube js calls from slowing down
- How to display all YouTube videos from specific ch
- How to get the last 24 hours worth of videos from
- Target iframe if it is a YouTube embed
- Youtube Video Duration API v3 [closed]
this is the full script with Fancybox-Youtube-Cookie-Autoclose-Autopopup just download the images that required in css put them in /fancybox folder in your root and replace with your video id. Really works fully tested...
Yes this is the right way to handle to fancybox or colorbox. Youtube Video API provides different states to handle this like unstarted=-1, ended=0, playing=1, paused=2, buffering=3, video cued=5
Getting or traping this state in fancybox jquery code block one can achieve this easily. Just visit this article with proper demo also.Visit here
After looking around without any luck here is a solution I came up with
See what we do, watch a video here
This isn't as simple as it sounds:
onStateChange
event listener so you can determine when the video has completed (the value of zero means the video has ended)$.fancybox.close
method to close the popupor, you could just let the user close the popup.