您现在的位置是:网站首页> 编程资料编程资料

asp 网页视频播放器程序代码(通用代码),支持avi,wmv,asf,mov,rm,ra,ram等_网页播放器_

2023-05-27 136人已围观

简介 asp 网页视频播放器程序代码(通用代码),支持avi,wmv,asf,mov,rm,ra,ram等_网页播放器_

思路是先取得文件的类型,并根据类型选择不同的网页播放器代码..三下五去二.....同时为了代码在以后的复用性,写成了通用的调用函数.方便以后在别的系统中调用..
现发布源代码如下:
复制代码 代码如下:

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 ""
Case "mov","rm","ra","ram"
Response.Write ""
Response.Write ""
Response.Write ""
Response.Write ""
Response.Write ""
Response.Write ""
Response.Write ""
Response.Write ""
Response.Write ""
Response.Write ""
Response.Write ""
Response.Write ""
Response.Write ""
Response.Write ""
Response.Write ""
Response.Write "
"
Response.Write "
"
Response.Write ""
Response.Write ""
Response.Write ""
Response.Write ""
Response.Write ""
Response.Write ""
Response.Write ""
Response.Write ""
Response.Write ""
Response.Write ""
Response.Write ""
Response.Write ""
Response.Write ""
Response.Write ""
Response.Write "
"
End Select
End If
End Sub

调用方式:
复制代码 代码如下:

Call SelPlay(DvUrl,280,220)

其实更好的代码,在一些比较不错的在线播放器源码等,可以参考下,如:马克斯等视频播放系统。

-六神源码网