手机
当前位置:查字典教程网 >编程开发 >网页播放器 >网页视频播放器程序代码(通用代码)
网页视频播放器程序代码(通用代码)
摘要:'***********************************************'函数名:SelPlay'作用:在网页中播放...

'***********************************************

'函数名:SelPlay

'作用:在网页中播放视频

'参数:strUrl----视频地址

strWidth---显示视频宽

strHeight---显示视频高

'***********************************************

SubSelPlay(strUrl,strWidth,StrHeight)

DimExts,isExt

IfstrUrl<>""Then

isExt=LCase(Mid(strUrl,InStrRev(strUrl,".")+1))

Else

isExt=""

EndIf

Exts="avi,wmv,asf,mov,rm,ra,ram"

IfInstr(Exts,isExt)=0Then

Response.write"非法视频文件"

Else

SelectCaseisExt

Case"avi","wmv","asf","mov"

Response.write"<EMBEDid=MediaPlayersrc="&strUrl&"width="&strWidth&"height="&strHeight&"loop=""false""autostart=""true""></EMBED>"

Case"mov","rm","ra","ram"

Response.Write"<OBJECTheight="&strHeight&"width="&strWidth&"classid=clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA>"

Response.Write"<PARAMNAME=""_ExtentX""VALUE=""12700"">"

Response.Write"<PARAMNAME=""_ExtentY""VALUE=""9525"">"

Response.Write"<PARAMNAME=""AUTOSTART""VALUE=""-1"">"

Response.Write"<PARAMNAME=""SHUFFLE""VALUE=""0"">"

Response.Write"<PARAMNAME=""PREFETCH""VALUE=""0"">"

Response.Write"<PARAMNAME=""NOLABELS""VALUE=""0"">"

Response.Write"<PARAMNAME=""SRC""VALUE="""&strUrl&""">"

Response.Write"<PARAMNAME=""CONTROLS""VALUE=""ImageWindow"">"

Response.Write"<PARAMNAME=""CONSOLE""VALUE=""Clip"">"

Response.Write"<PARAMNAME=""LOOP""VALUE=""0"">"

Response.Write"<PARAMNAME=""NUMLOOP""VALUE=""0"">"

Response.Write"<PARAMNAME=""CENTER""VALUE=""0"">"

Response.Write"<PARAMNAME=""MAINTAINASPECT""VALUE=""0"">"

Response.Write"<PARAMNAME=""BACKGROUNDCOLOR""VALUE=""#000000"">"

Response.Write"</OBJECT>"

Response.Write"<BR>"

Response.Write"<OBJECTheight=32width="&strWidth&"classid=clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA>"

Response.Write"<PARAMNAME=""_ExtentX""VALUE=""12700"">"

Response.Write"<PARAMNAME=""_ExtentY""VALUE=""847"">"

Response.Write"<PARAMNAME=""AUTOSTART""VALUE=""0"">"

Response.Write"<PARAMNAME=""SHUFFLE""VALUE=""0"">"

Response.Write"<PARAMNAME=""PREFETCH""VALUE=""0"">"

Response.Write"<PARAMNAME=""NOLABELS""VALUE=""0"">"

Response.Write"<PARAMNAME=""CONTROLS""VALUE=""ControlPanel,StatusBar"">"

Response.Write"<PARAMNAME=""CONSOLE""VALUE=""Clip"">"

Response.Write"<PARAMNAME=""LOOP""VALUE=""0"">"

Response.Write"<PARAMNAME=""NUMLOOP""VALUE=""0"">"

Response.Write"<PARAMNAME=""CENTER""VALUE=""0"">"

Response.Write"<PARAMNAME=""MAINTAINASPECT""VALUE=""0"">"

Response.Write"<PARAMNAME=""BACKGROUNDCOLOR""VALUE=""#000000"">"

Response.Write"</OBJECT>"

EndSelect

EndIf

EndSub

调用程序代码

CallSelPlay(DvUrl,280,220)

【网页视频播放器程序代码(通用代码)】相关文章:

flvplayer.swf flv视频播放器使用方法

网上比较常用的嵌入网页中的播放器代码收藏

FireFox下的MediaPlayer插件(可以正常播放mediaplayer)

歌词编辑器和选择歌曲可播放的网页

利用JAVASCRIPT控制MEDIA PLAYER的功能实现

flv播放器 在网页中播放flv

超级REAL视频播放器

网页播放器Object使用详解

在html中插入mpg格式视频文件的代码

在线FLV播放器实现方法

精品推荐
分类导航