当前位置: 首页 > 图文教程 > 网络编程 > 网页播放器 > 网页视频播放器程序代码(通用代码)

网页播放器
歌词编辑器和选择歌曲可播放的网页
非常全的javascript控制MediaPlayer的属性集合
1ting的歌词同步,所用到的代码
关于网页媒体播放器兼容性的问题(附原码) 下载
[翻译] JW Media Player 中文文档
在线FLV播放器实现方法
flv播放器 在网页中播放flv
宝丽通3.90播放器调用代码
电影系统调用“宝丽通”加速播放器,任意拖动不会卡
FireFox下的MediaPlayer插件(可以正常播放mediaplayer)
js 网页视频播放器程序代码(通用代码),支持avi,wmv,asf,mov,rm,ra,ram等
WMV网页播放器参数中文详解
网页播放器 windowsmediaplay中控制从wmv的指定时间开始播放,指定时间停止播放
MediaPlayer 在线播放器代码
FCKeditor 源代码分析附中文注释
网上比较常用的嵌入网页中的播放器代码收藏
tinyMCE插件开发之插入html,php,sql,js代码 并代码高亮显示

网页播放器 中的 网页视频播放器程序代码(通用代码)


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2010-01-10   浏览: 98 ::
收藏到网摘: n/a

'***********************************************
'函数名:SelPlay
'作 用:在网页中播放视频
'参 数:strUrl ---- 视频地址
strWidth ---显示视频宽
strHeight ---显示视频高
'***********************************************
Sub SelPlay(strUrl,strWidth,StrHeight)
Dim Exts,isExt
If strUrl <> "" Then
isExt = LCase(Mid(strUrl,InStrRev(strUrl, ".")+1))
Else
isExt = ""
End If
Exts = "avi,wmv,asf,mov,rm,ra,ram"
If Instr(Exts,isExt)=0 Then
Response.write "非法视频文件"
Else
Select Case isExt
Case "avi","wmv","asf","mov"
Response.write "<EMBED id=MediaPlayer src="&strUrl&" width="&strWidth&" height="&strHeight&" loop=""false"" autostart=""true""></EMBED>"
Case "mov","rm","ra","ram"
Response.Write "<OBJECT height="&strHeight&" width="&strWidth&" classid=clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA>"
Response.Write "<PARAM NAME=""_ExtentX"" VALUE=""12700"">"
Response.Write "<PARAM NAME=""_ExtentY"" VALUE=""9525"">"
Response.Write "<PARAM NAME=""AUTOSTART"" VALUE=""-1"">"
Response.Write "<PARAM NAME=""SHUFFLE"" VALUE=""0"">"
Response.Write "<PARAM NAME=""PREFETCH"" VALUE=""0"">"
Response.Write "<PARAM NAME=""NOLABELS"" VALUE=""0"">"
Response.Write "<PARAM NAME=""SRC"" VALUE="""&strUrl&""">"
Response.Write "<PARAM NAME=""CONTROLS"" VALUE=""ImageWindow"">"
Response.Write "<PARAM NAME=""CONSOLE"" VALUE=""Clip"">"
Response.Write "<PARAM NAME=""LOOP"" VALUE=""0"">"
Response.Write "<PARAM NAME=""NUMLOOP"" VALUE=""0"">"
Response.Write "<PARAM NAME=""CENTER"" VALUE=""0"">"
Response.Write "<PARAM NAME=""MAINTAINASPECT"" VALUE=""0"">"
Response.Write "<PARAM NAME=""BACKGROUNDCOLOR"" VALUE=""#000000"">"
Response.Write "</OBJECT>"
Response.Write "<BR>"
Response.Write "<OBJECT height=32 width="&strWidth&" classid=clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA>"
Response.Write "<PARAM NAME=""_ExtentX"" VALUE=""12700"">"
Response.Write "<PARAM NAME=""_ExtentY"" VALUE=""847"">"
Response.Write "<PARAM NAME=""AUTOSTART"" VALUE=""0"">"
Response.Write "<PARAM NAME=""SHUFFLE"" VALUE=""0"">"
Response.Write "<PARAM NAME=""PREFETCH"" VALUE=""0"">"
Response.Write "<PARAM NAME=""NOLABELS"" VALUE=""0"">"
Response.Write "<PARAM NAME=""CONTROLS"" VALUE=""ControlPanel,StatusBar"">"
Response.Write "<PARAM NAME=""CONSOLE"" VALUE=""Clip"">"
Response.Write "<PARAM NAME=""LOOP"" VALUE=""0"">"
Response.Write "<PARAM NAME=""NUMLOOP"" VALUE=""0"">"
Response.Write "<PARAM NAME=""CENTER"" VALUE=""0"">"
Response.Write "<PARAM NAME=""MAINTAINASPECT"" VALUE=""0"">"
Response.Write "<PARAM NAME=""BACKGROUNDCOLOR"" VALUE=""#000000"">"
Response.Write "</OBJECT>"
End Select
End If
End Sub
调用程序代码
Call SelPlay(DvUrl,280,220)