简体   繁体   English

在SWF对象中播放FLV视频

[英]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. 旧站点使用带有透明背景的flv视频文件的swf对象。 I have the flv video, but I can't embed it on the page. 我有flv视频,但无法将其嵌入页面中。 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? 还是我必须创建嵌入视频的新swf对象?

<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. SWFObject不是视频播放器,它是用于将SWF文件嵌入HTML文档的实用程序。 FLV files can only play when loaded into a SWF-based player. FLV文件仅在加载到基于SWF的播放器中时才能播放。

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 . 您需要构建一个可以加载/播放FLV的SWF(在线上有很多教程 ),或者使用第三方视频播放器(例如Flowplayer)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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