IE 中的 jwPlayer 在显示滚动横幅时不会自动启动视频

发布于 2024-10-14 01:32:42 字数 2321 浏览 4 评论 0原文

我在使用著名的 jwPlayer 时遇到了问题。事实上,问题在于 IE(8 或 7)处理 Flash 播放器的方式。

他们的问题是:我有一个滚动横幅(使用 jquery 循环),在这个横幅中我有 2 个图像和一个视频。视频是使用jwPlayer驱动的。我期望横幅工作的方式是这样的:

  1. 在每个横幅上滚动
  2. 如果横幅是视频,则

以启动它。这是 javascript:

 $('#slideshow')
        .before('<div id="nav">')
        .cycle({
            fx: 'fade',
            timeoutFn: calculateTimeout,
            timeout: 20000,
            pause: 1,
            pager: '#nav'
        });


function calculateTimeout(currElement, nextElement, opts, isForward) {
        if ($(nextElement).attr("class") == "video-banner") {
             return 20000;
        } else {
            return 8000;
        }

我已将循环变量设置为 true,并将自动启动设置为 true,如您所见:

<div runat="server" id="video" class="video-banner">
        <!-- START OF THE PLAYER EMBEDDING TO COPY-PASTE --> 
        <object id="Object1" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" name="player" height="384" type="video/mp4"> 
                <param name="movie" value="/uploads/Banner/Rainmaker.mp4" /> 
                <param name="wmode" value="window" />
                <param name="allowfullscreen" value="false" /> 
                <param name="allowscriptaccess" value="always" /> 
                <param name="loop" value="true" />
                <param name="flashvars" value="file=/uploads/Banner/Durp.mp4&autostart=true" />
                <embed 
                    type="application/x-shockwave-flash"
                    id="player2"
                    name="player2"
                    src="/jwplayer/player.swf" 
                    width="612"
                    height="384"
                    allowscriptaccess="always" 
                    allowfullscreen="false"
                    autostart="true"
                    wmode="window"
                    loop="true"
                    flashvars="file=/uploads/Banner/Durp.mp4&amp;autostart=true&amp" 
                /> 
        </object> 
        <!-- END OF THE PLAYER EMBEDDING -->    
        <img style="border-width: 0px;" src="/Uploads/Banner/banner.jpg">
    </div> 

在所有正常的浏览器中,当视频出现在横幅中时,他会自行启动。

有人可以帮助我让我在 IE(7 和 8)中执行与普通浏览器相同的行为吗?

I got a probleme with the famous jwPlayer. In fact the probleme is with the way IE (8 or 7) handle the flash player.

Their's the probleme: I got a rolling banner (using jquery cycle), in this banner i got 2 images an a video. The video is drive using jwPlayer. The way I expect the banner work is this:

  1. roll on each banner
  2. if the banner is the video start it.

This is the javascript:

 $('#slideshow')
        .before('<div id="nav">')
        .cycle({
            fx: 'fade',
            timeoutFn: calculateTimeout,
            timeout: 20000,
            pause: 1,
            pager: '#nav'
        });


function calculateTimeout(currElement, nextElement, opts, isForward) {
        if ($(nextElement).attr("class") == "video-banner") {
             return 20000;
        } else {
            return 8000;
        }

I have set the loop variable at true and the autostart at true either as you can see:

<div runat="server" id="video" class="video-banner">
        <!-- START OF THE PLAYER EMBEDDING TO COPY-PASTE --> 
        <object id="Object1" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" name="player" height="384" type="video/mp4"> 
                <param name="movie" value="/uploads/Banner/Rainmaker.mp4" /> 
                <param name="wmode" value="window" />
                <param name="allowfullscreen" value="false" /> 
                <param name="allowscriptaccess" value="always" /> 
                <param name="loop" value="true" />
                <param name="flashvars" value="file=/uploads/Banner/Durp.mp4&autostart=true" />
                <embed 
                    type="application/x-shockwave-flash"
                    id="player2"
                    name="player2"
                    src="/jwplayer/player.swf" 
                    width="612"
                    height="384"
                    allowscriptaccess="always" 
                    allowfullscreen="false"
                    autostart="true"
                    wmode="window"
                    loop="true"
                    flashvars="file=/uploads/Banner/Durp.mp4&autostart=true&" 
                /> 
        </object> 
        <!-- END OF THE PLAYER EMBEDDING -->    
        <img style="border-width: 0px;" src="/Uploads/Banner/banner.jpg">
    </div> 

In all normal browser, when the video come in the banner he start by himself.

Can someone help me to me make me doing the same behavior in IE (7 and 8) as in normal browser?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

梦回旧景 2024-10-21 01:32:48

您应该尝试 FlowPlayer

这是网站:http://flowplayer.org/

You should try FlowPlayer

Here is the website: http://flowplayer.org/

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文