Play YouTube video in Flexslider slide and pause slideshow

吃可爱长大的小学妹 提交于 2020-01-22 15:26:05

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!