开发者

How to make video autostart with AC_FL_RunContent on IE?

开发者 https://www.devze.com 2023-02-18 00:21 出处:网络
I\'m using the following code 开发者_运维百科to run a video on our website. Example: http://www.ipsofacto.net/4078/how-to-backup-a-mac-os-x-server/

I'm using the following code 开发者_运维百科to run a video on our website. Example: http://www.ipsofacto.net/4078/how-to-backup-a-mac-os-x-server/

My question is: how to make the video autostart on IE?

It works on Firefox and Chrome.

<video width='500' height='282' autoplay=\"autoplay\" controls=\"controls\" preload=\"none\">
    <source src='$h264'  type='video/mp4' />
    <source src='$webm'  type='video/webm' />
    <source src='$theora'  type='video/ogg' />  

    <script language='javascript'>
        AC_FL_RunContent('codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0', 'width', '500', 'height', '281', 'src', 'player', 'pluginspage', 'http://www.macromedia.com/go/getflashplayer', 'allowFullScreen', 'true', 'play', 'true', 'autoplay', 'true', 'movie', '".site_url( '/wp-content/plugins/ewp-blog/ewpb-videos-files/' )."player', 'FlashVars', 'file=".urlencode($flash)."&image=".urlencode($png)."&volume=25');
    </script>

    <noscript>
        <object width='500' height='281' type='application/x-shockwave-flash' data='".site_url( '/wp-content/plugins/ewp-blog/ewpb-videos-files/' )."player.swf'>
            <embed src='".site_url( '/wp-content/plugins/ewp-blog/ewpb-videos-files/' )."player.swf?file=".urlencode($flash)."&image=".urlencode($png)."&volume=25' width='500' height='281' allowFullScreen='true' type='application/x-shockwave-flash' autostart='true' />
        </object>
    </noscript>
</video>

Thank you!


As Bosworth99 said, use SWFObject.

http://code.google.com/p/swfobject/

Download the SWFObject tag generator here:

http://code.google.com/p/swfobject/downloads/detail?name=swfobject_generator_1_2_air.zip&can=2&q=

It's very straight forward to use, it will generate code for you to embed your SWF using SWFObject and also allows you to visually set/edit every possible property you could need to set with embed params.

Please note you will need the Adobe AIR Runtime installed to use the above application:

http://get.adobe.com/air/

0

精彩评论

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