开发者

jwPlayer in IE does not auto start video on display of rolling banner

开发者 https://www.devze.com 2023-02-06 10:46 出处:网络
I got a probleme with the famous jwPlayer. In fact the probleme is with the way IE (8 or 7) handle the flash player.

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 expe开发者_JS百科ct 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&amp;autostart=true&amp" 
                /> 
        </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?


You should try FlowPlayer

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

0

精彩评论

暂无评论...
验证码 换一张
取 消