[心缘地方]同学录
首页 | 功能说明 | 站长通知 | 最近更新 | 编码查看转换 | 代码下载 | 常见问题及讨论 | 《深入解析ASP核心技术》 | 王小鸭自动发工资条VBA版
登录系统:用户名: 密码: 如果要讨论问题,请先注册。

[整理]在网页中HTML内嵌 Vcastr 播放器,播放FLV~~

上一篇:[整理]从网易新闻的专题弄下来的JS代码,图片上一张下一张展示的
下一篇:[整理]Java的ExecutorService简单范例理解~~

添加日期:2013/8/22 14:55:23 快速返回   返回列表 阅读4542次
试了下,支持FLV和MP4,别的没试~~


<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="500" height="400">
<param name="movie" value="flvplayer.swf" />
<param name="quality" value="high" />
<param name="allowFullScreen" value="true" />

<embed src="flvplayer.swf" allowfullscreen="true" flashvars="vcastr_file=2.flv&IsAutoPlay=0&LogoUrl=images/logo.jpg" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="500" height="400"></embed>

</object>



参数说明:


 Flvplayer.swf 参数详细说明:
vcastr_file 方法2传递影片flv文件地址参数,多个使用|分开 空
vcastr_title 影片标题参数,多个使用|分开,与方法2配合使用 空
vcastr_xml 方法3 传递影片flv文件地址参数,样板参考 vcastr.xml
IsAutoPlay 影片自动播放参数:0表示不自动播放,1表示自动播放 0
IsContinue 影片连续播放参数:0表示不连续播放,1表示连续循环播 1
IsRandom 影片随机播放参数:0表示不随机播放,1表示随机播放 0
DefaultVolume 默认音量参数 :0-100 的数值,设置影片开始默认音量大小 100
BarPosition 控制栏位置参数 :0表示在影片上浮动显示,1表示在影片下方显示 0
IsShowBar 控制栏显示参数 :0表示不显示;1表示一直显示;2表示鼠标悬停时显示;3表示开始不显示,鼠标悬停后显示 2
BarColor 播放控制栏颜色,颜色都以0x开始16进制数字表示 0x000033
BarTransparent 播放控制栏透明度 60
GlowColor 按键图标颜色,颜色都以0x开始16进制数字表示 0x66ff00
IconColor 鼠标悬停时光晕颜色,颜色都以0x开始16进制数字表示 0xFFFFFF
TextColor 播放器文字颜色,颜色都以0x开始16进制数字表示 0xFFFFFF
LogoText 可以添加自己网站名称等信息(英文) 空
LogoUrl 可以从外部读取logo图片,注意自己调整logo大小,支持图片格式和swf格式 空
EndSwf 影片播放结束后,从外部读取swf文件,可以添加相关影片信息,影片分享等信息,需自己制作 空
BeginSwf 影片开始播放之前,从外部读取swf文件,可以添加广告,或者网站信息,需自己制作 空
IsShowTime 是否显示时间 : 0表示不显示时间,1表示显示时间 1
BufferTime 影片缓冲时间,单位(秒) 2



下载地址:
http://pan.baidu.com/share/link?shareid=1524154112&uk=2130982071
====================================================
嵌入的播放器在某些版本的浏览器(比如IE)可能不好使,那么可以试试用JS创建,兼容性较好。

类似这样:


<div id="flashcontent">
This text is replaced by the Flash movie.
</div>
<script type="text/javascript" src="/special/swfobject.js"></script>
<script type="text/javascript">
var swf_width=800;
var swf_height=600;
var files='video/2.flv';
var texts='2222';

var so = new SWFObject("/special/flvplayer.swf", "mymovie", swf_width, swf_height, "8");

//设置参数和变量
so.addVariable("vcastr_file", files); 
so.addVariable("vcastr_title", texts);
so.addVariable("IsAutoPlay", "1");
so.addParam("quality", "high");
so.addParam("allowfullscreen", "true"); 
so.write("flashcontent");
</script>



swfobject.js在此:
https://code.google.com/p/swfobject/wiki/documentation
==========================================================
另外,Vcastr 3.0 - flash flv video player on web
在此:
https://code.google.com/p/vcastr/

调用方法:


        <object type="application/x-shockwave-flash" data="/special/vcastr3.swf" width="650" height="500" id="vcastr3">
            <param name="movie" value="/special/vcastr3.swf"/> 
            <param name="allowFullScreen" value="true" />
            <param name="FlashVars" value="xml=
                <vcastr>
                    <channel>
                        <item>
                            <source>/special/video/3.mp4</source>
                            <duration></duration>
                            <title>xxxx</title>
                        </item>
                    </channel>
                    <config>
                    </config>
                    <plugIns>
                        <logoPlugIn>
                            <url>/special/logoPlugIn.swf</url>
                            <logoText>www.xxx.com</logoText>
                            <logoTextAlpha>0.75</logoTextAlpha>
                            <logoTextFontSize>30</logoTextFontSize>
                            <logoTextLink>http://www.xxxx.com</logoTextLink>
                            <logoTextColor>0xffffff</logoTextColor>
                            <textMargin>20 20 auto auto</textMargin>
                        </logoPlugIn>
                    </plugIns>
                </vcastr>"/>
        </object>



配置文件范例:


<vcastr>
    <channel>
        <item>
            <source>http://vcastr.ruochi.com/video/happy_feet.flv</source>
            <duration></duration>
            <title>Happy Feet Trailer</title>
            <link>http://www.ruochi.com/</link>
        </item>
        <item>
            <source>http://www.transformersmovie.com/transformers_640.flv</source>
            <duration></duration>
            <title>Transformersmovie Trailer</title>
        </item>
    </channel>
    <config>
        <bufferTime>4</bufferTime>
        <contralPanelAlpha>0.75</contralPanelAlpha>
        <controlPanelBgColor>0xff6600</controlPanelBgColor>
        <controlPanelBtnColor>0xffffff</controlPanelBtnColor>
        <contralPanelBtnGlowColro>0xffff00</contralPanelBtnGlowColro>
        <controlPanelMode>normal</controlPanelMode>
        <defautVolume>0.7</defautVolume>
        <isAutoPlay>true</isAutoPlay>
        <isLoadBegin>true</isLoadBegin>
        <isShowAbout>true</isShowAbout>
        <scaleMode>showAll</scaleMode>
        <isRepeat>false</isRepeat>
    </config>
    <plugIns>
        <!--logoPlugIn>
            <url>logoPlugIn.swf</url>
            <logoText>www.ruochi.com</logoText>
            <logoTextAlpha>0.75</logoTextAlpha>
            <logoTextFontSize>30</logoTextFontSize>
            <logoTextLink>http://www.ruochigroup.com</logoTextLink>
            <logoTextColor>0xffffff</logoTextColor>
            <textMargin>20 20 auto auto</textMargin>
            <logoClipUrl></logoClipUrl>
            <logoClipAlpha>1</logoClipAlpha>
            <clipMargin>20 auto auto 20</clipMargin>
        </logoPlugIn-->
        <!--javaScriptPlugIn>
            <url>javaScriptPlugIn.swf</url>
        </javaScriptPlugIn-->
        <!--formatSourceUrlPlugIn>
            <url>formatSourceUrlPlugIn.swf</url>
        </formatSourceUrlPlugIn-->
    </plugIns>
</vcastr>


=============================================================
以下是一些免费的嵌入flv 播放器


JW FlvPlayer    http://www.longtailvideo.com/
很牛掰,非商业使用是免费的,商业使用要付费

http://flv-player.net/
开源、免费、可定制~~FLV文件必须是1.1版本的~~

Fullscreen 只在Flash Player>9.0.16时可用。
Fullscreen 不兼容 wmode transparency,别和这个一起用
<param name="wmode" value="transparent" />

Flayr player
http://www.flayr.net/
The Flayr player 是非常古老,不提供支持服务,使用Flash。

Free Flv Player in flash
http://www.webestools.com/flv-player-free-flash-mp4-mov-h264-put-videos-on-your-website-streaming-video-player-flv.html
免费,可以在线生成参数

http://www.platipus.nl/flvplayer/
免费的

http://www.osflv.com/
开源的,界面不太帅

http://flvplayer.com/free-flv-player/
免费

http://flowplayer.org/designer/
在线生成参数
 

评论 COMMENTS
没有评论 No Comments.

添加评论 Add new comment.
昵称 Name:
评论内容 Comment:
验证码(不区分大小写)
Validation Code:
(not case sensitive)
看不清?点这里换一张!(Change it here!)
 
评论由管理员查看后才能显示。the comment will be showed after it is checked by admin.
CopyRight © 心缘地方 2005-2999. All Rights Reserved