简体   繁体   中英

play FLV video in a SWF object

Here is the problem: I have to redo the site, with less flash as possible. Old site used swf object with flv video file which had transparent background. I have the flv video, but I can't embed it on the page. Is there a way to do this using code below, or something similar to this? Or I have to create new swf object with video embedded into it?

<script type="text/javascript">
        var flashvars = {};
        var params = {
            allowScriptAccess:'sameDomain',
            wmode: "transparent",
            scale: "allowscale"
        };
        var attributes = {
        id:'logo',
        name:'logo'
        };
        swfobject.embedSWF("logo.flv", 
                       "flash_content", 
                       "126px", "117px", "9.0.0", 
                       "expressInstall.swf", 
                        flashvars, 
                        params, 
                        attributes);
</script>

SWFObject is not a video player, it is a utility for embedding SWF files into HTML documents. FLV files can only play when loaded into a SWF-based player.

You need to either build a SWF that can load/play your FLV (there are many tutorials online), or use a 3rd party video player, such as Flowplayer .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM