问题
I am using flexslider on a site and will be putting youtube videos in certain slides. However, I need the slider to stop animating while the video is playing, and resume when the video finishes. I understand that the developer has provided a solution to this exact problem using the vimeo API. Are there examples out there of an implementation using the youtube APIs? Is it possible? I am (obviously) not a javascript expert, and find that I learn best through examples/tutorials.
回答1:
There's an example at https://developers.google.com/youtube/iframe_api_reference#Getting_Started for embedding an iframe YouTube player on a page, and responding to specific events. I think you should be able to adapt that to meet your needs.
回答2:
Here is my option for Youtube and Vimeo, hope is help :)
https://github.com/woothemes/FlexSlider/issues/346#issuecomment-13826530
来源:https://stackoverflow.com/questions/13688919/play-youtube-video-in-flexslider-slide-and-pause-slideshow