将视频与 jQuery Cycle 一起使用
似乎很多人在开始将视频添加到 jQuery Cycle 幻灯片中时都会遇到一些问题,但我认为我遇到的具体问题还没有出现。
问题是,每当我在幻灯片中插入视频时,第一次查看幻灯片时它会显示良好,但如果您再次查看幻灯片(刷新之前),它就会完全变黑。
这是幻灯片示例,视频位于最后一张幻灯片(幻灯片 5)上。
关于为什么会发生这种情况以及如何纠正它有什么想法吗?和/或有人有一些使用 jQuery 循环和视频的网站的好例子吗?
我很想看看他们的代码,看看他们是否正在做我错过的事情。
It seems like many people have some issues once they start adding video into their jQuery Cycle slideshow, but the specific issue I am having I do not think has come up yet.
The problem is that whenever I insert a video in the slideshow, it displays fine the first time you view the slide, but if you look at the slide again (before refreshing) it is completely black.
Here is an example of the slideshow and the video is on the last slide (slide 5).
Any thoughts on why this might be happening and how to correct it? And/or does anyone have some good examples of sites that use jQuery cycle and videos.
I'd love to take a look at their code to see if they are doing something that I am missing.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
YouTube 视频需要一两秒钟才能启动。当 css 从
display:none
更改为display:block
或类似内容时。解决此问题的方法是修改插件或您自己的插件,改用visibility:hidden
和visibility:visible
。我以前在使用循环插件制作 YouTube 循环时遇到过您的问题。
我认为这并不重要,所以我就保持原样。
示例如下:
http://jsfiddle.net/blowsie/HMKTS/
YouTube Videos take a second or two to initiate. When the css changes from
display:none
todisplay:block
or similar. A fix for this would be to make a modification to the plugin or your own plugin which makes use ofvisibility:hidden
andvisibility:visible
instead.I have encountered your problem before when making a YouTube cycle, using the cycle plugin.
I decided it didn't matter so much so I left it as it was.
Example Here:
http://jsfiddle.net/blowsie/HMKTS/