网页视频代码修改
在网页中镶嵌视频播放器后,在打开网页的时候,因为视频较大,需要缓冲,
但是我的播放器不显示缓冲状态,哪位高手能帮忙改下代码,让网页中的播放器在没有播放视频的时候,在下面显示缓冲状态,当缓冲状态为100%时,自动开始播放,代码如下:
<%
Sub SelPlay(strUrl,strWidth,StrHeight) '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=""true"" autostart=""1""> </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=""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>"
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=""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("video/kengqiang.wmv",458,367)
%>