当前位置:首页 > 代码 > 正文

网站flv播放代码(html5播放flv)

admin 发布:2022-12-19 07:45 116


本篇文章给大家谈谈网站flv播放代码,以及html5播放flv对应的知识点,希望对各位有所帮助,不要忘了收藏本站喔。

本文目录一览:

求flv播放器全屏按钮的代码

function setFullScreen() {

//fscommand("fullscreen", true); if (_root.logoCoolRabbit._visible == false) {

if (Stage["displayState"] == "normal") {

fscommand("fullscreen", true);

Stage["displayState"] = "fullScreen";

}

else if (Stage["displayState"] == "fullScreen") {

fscommand("fullscreen", false);

Stage["displayState"] = "normal";

}

rootWidth = Stage.width;

rootHeight = Stage.height;

//复位控制栏

clearInterval(controlBuffCoolTime);

controlBuffCoolTime = null;

clearInterval(controlBuff);

controlBuffCool = 0;

controlBuffEstimate = null;

//复位标题栏

clearInterval(playTitleBuffCoolTime);

playTitleBuffCoolTime = null;

clearInterval(playTitleBuff);

playTitleBuffCool = 0;

playTitleBuffEstimate = null;

//重新设置组件位置

moduleSet();

//重新计算和设置播放组件尺寸比

videoWidthSet = rootWidth;

videoHeightvideoHeightSet = videoHeight/videoWidth*rootWidth;

playAllModule.playFlvWindow._width = videoWidthSet;

playAllModule.playFlvWindow._height = videoHeightSet;

playAllModule.playFlvWindow._y = (rootHeight-playAllModule.playFlvWindow._height)/2;

}

//全屏模式切换

playAllModule.controlSet.buttonFullScreen.onPress = function() {

setFullScreen();

};

//创建右键全屏及退出全屏菜单

//var newnewMenu:ContextMenu = new ContextMenu();

var newnewMenu:ContextMenu = new ContextMenu(menuHandler);

//隐藏右键的一些标准菜单

newMenu.hideBuiltInItems();

// 在右键菜单中加入菜单项

//var fs:ContextMenuItem = new ContextMenuItem("全屏", goFullScreen);

var fs:ContextMenuItem = new ContextMenuItem("全屏", setFullScreen);

newMenu.customItems.push(fs);

//var xfs:ContextMenuItem = new ContextMenuItem("退出全屏", exitFullScreen);

var xfs:ContextMenuItem = new ContextMenuItem("退出全屏", setFullScreen);

newMenu.customItems.push(xfs);

// 现在将右键菜单指定给场景中的movieclip.我当前指定给场景中的box.你也可以指定给_root

this.menu = newMenu;

function goFullScreen() {

//Stage["displayState"] = "fullScreen";

}

function exitFullScreen() {

//Stage["displayState"] = "normal";

}

// 定义开启和关闭全屏功能,取决于你当前处于哪一种状态下

function menuHandler(obj, menuObj) {

if (Stage["displayState"] == "normal") {

// 如果你当前处在正常模式下,则goFullscreen可点击

menuObj.customItems[0].enabled = true;

menuObj.customItems[1].enabled = false;

} else {

// 如果你当前片在全屏模式下,则exitFullScreen可点击

menuObj.customItems[0].enabled = false;

menuObj.customItems[1].enaenabled = true;

}

}

网站播放flv文件的问题

一、IIS6.0设置:

1、对于FLV类型:

打开Internet Information Services Manager(IIS),选择“本地计算机”--用户站点--打开“属性”--“HTTP头”--“MIME类型”- -“新建”。扩展名=“.flv”MIME类型=“flv-application/octet-stream”,保存退出即可。

2、对于RMVB类型:

打开Internet Information Services Manager(IIS),选择“本地计算机”--用户站点--打开“属性”--“HTTP头”--“MIME类型”- -“新建”。扩展名=“.rmvb”MIME类型=“application”,保存退出即可。

;cl=3

二、网页中调用flv播放器代码

;cl=3

三、访问服务器的电脑一定要装有flash控件

安装页

四、防火墙一定要对IIS开放

五、其他相关知识

如何在网页中播放flv视频?

推荐几种在网页中播放FLV视频文件的代码

方法一、js嵌入

直接copy下面代码,修改其中红色部分,即:swf_width、 swf_height、texts、files 参数

引用

script type="text/javascript"

var swf_width=240

var swf_height=240

var texts=’群英传WEB版宣传视频’

var files=’’

document.write(’object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="" width="’+ swf_width +’" height="’+ swf_height +’"’);

document.write(’param name="movie" value=""param name="quality" value="high"’);

document.write(’param name="menu" value="false"param name="allowFullScreen" value="true" /’);

document.write(’param name="FlashVars" value="vcastr_file=’+files+’vcastr_title=’+texts+’"’);

document.write(’embed src="" allowFullScreen="true" FlashVars="vcastr_file=’+files+’vcastr_title=’+texts+’" menu="false" quality="high" width="’+ swf_width +’" height="’+ swf_height +’" type="application/x-shockwave-flash" pluginspage="" /’); document.write(’/object’);

/script

其中:

群英传WEB版宣传视频 是标题。

是FLV文件地址。

是FLV文件播放器地址(如果你不会制作,可下载别人的然后上传到自己的空间再调用)。

方法 二、简单直接传递影片地址

引用

object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="" width="240" height="180"

param name="movie" value=""

param name="quality" value="high"

param name="allowFullScreen" value="true" /

embed src="" allowFullScreen="true" quality="high" pluginspage="" type="application/x-shockwave-flash" width="240" height="180"/embed

网站flv播放代码的介绍就聊到这里吧,感谢你花时间阅读本站内容,更多关于html5播放flv、网站flv播放代码的信息别忘了在本站进行查找喔。

版权说明:如非注明,本站文章均为 AH站长 原创,转载请注明出处和附带本文链接;

本文地址:http://www.ahzz.com.cn/post/4737.html


取消回复欢迎 发表评论:

分享到

温馨提示

下载成功了么?或者链接失效了?

联系我们反馈

立即下载