点击第二次后,Fancybox视频无法播放(错误?)

Fancybox video doesn't play after clicking a second time (error?)

本文关键字:播放 错误 视频 第二次 Fancybox      更新时间:2023-09-26

我最近建的一个Wordpress网站有一些问题。我已经实现了fanybox进入页面,从Vimeo打开一个iframe。这一切似乎都很好,除了当我点击按钮,使Fancybox弹出视频。如果我关闭Fancybox并再次打开它,它只显示一个白框,几乎就像视频无法再次加载一样。

下面是HTML:

        <a href="#introVideoContent" class="mainBtn viewAllEventsBtn">Or view our complete range of Events</a>
    <div id="introVideo">
        <a href="#introVideoContent" class="various1">Click here to watch oa teaser video!</a>
    </div>
<div style="display: none;">
            <div id="introVideoContent" class="video-js-box">
                <iframe src="http://player.vimeo.com/video/31444322?title=0&amp;byline=0&amp;portrait=0&amp;color=ad221d" width="916" height="515" frameborder="0" webkitAllowFullScreen allowFullScreen></iframe>
            </div>
        </div>

…和Fancybox jquery:

$(document).ready(function() {
    $(".various1").fancybox({
        'titlePosition'    : 'inside',
        'transitionIn'     : 'elastic',
        'transitionOut'    : 'elastic',
        'titleShow'        : false
    });
});

我使用的是Fancybox 1.3.4和最新版本的jQuery。

真的不知道这里发生了什么,但我怀疑这是相当直接的事情。如有任何帮助,我将不胜感激。

谢谢

使用内联iframe有一个bug你可以编辑未压缩版本的fancybox js文件(第946行)看到http://groups.google.com/group/fancybox/browse_thread/thread/feec524b4c0199bc

或检查自定义脚本中的解决方案http://groups.google.com/group/fancybox/browse_thread/thread/1fd249d5f2bbd88e/(查看我6月6日下午1:23的帖子)