ASP电影播放器(asf格式用什么播放器)新鲜出炉

随心笔谈3年前发布 admin
208 0 0

文章摘要

这篇文章主要介绍了一个播放器的错误处理功能,包括对几种常见错误的处理方法以及用户界面的反馈机制。文章详细描述了以下内容: 1. **错误提示与处理**: - 如果系统中没有安装Real Player播放器,提示用户下载并关闭播放器。 - 如果无法找到要播放的影片,提示用户更换其他影片。 - 如果IP地址无法观看电影,提示用户将网站地址发送给5位网友并返回观看。 - 如果电影地址错误,提示用户联系管理员修正地址。 2. **浏览器插件提示**: 如果浏览器无法自动下载最新的浏览器插件,提示用户下载并安装播放器。 3. **错误处理脚本**: 使用JavaScript脚本处理播放器的错误事件(如缓冲错误和未知错误),并在错误发生时通过MsgBox或alert函数向用户反馈。 文章整体内容围绕播放器的错误处理功能展开,重点描述了错误提示的类型和处理机制,以及如何通过脚本实现用户友好的错误反馈。



<%

MovURL=Request(“MovURL”)

%>

var ERR_NonePlayer=”播放器提示您: 您的系统中没有安装Real Player播放器,请到主页上下载。\n\n\nMovie播放器将关闭。”;

var ERR_FileNotFind=”播放器提示您: 对不起,未发现你要点播的影片。\n\n\n请您更换其他影片!”;

var ERR_NotLocateServer=”播放器提示您: 对不起,你的IP还不能观看此电影!\n\n\n请把本站的网址:http://www.zh1861.net/发给你QQ上的5位网友,你就可以看了。”;

var ERR_UnkownError=”播放器提示您: 影片地址错误,请给管理员留言,让管理员修正地址!\n\n\n请大家把本站的网址:http://www.zh1861.com/发给你QQ上的5位网友再回来观看哦。\n\n\n或者更换其它影片观看!”;

on error resume next

RealPlayerG2=(NOT IsNull(CreateObject(“rmocx.RealPlayer G2 Control”)))\n’);

RealPlayer5=(NOT IsNull(CreateObject(“RealPlayer.RealPlayer(tm) ActiveX Control (32-bit)”)))

RealPlayer4=(NOT IsNull(CreateObject(“RealVideo.RealVideo(tm) ActiveX Control (32-bit)”)))

if not RealPlayerG2 and RealPlayer5 and RealPlayer4 then

if MsgBox(“您的浏览器无法自动下载最新的浏览器插件,是否要下载播放器来播放?”, vbYesNo)=vbYes then

window.location=”http://www.i-movie.cn/tools/RealOnePlayer2GOLD.exe”

end if

end if

Sub player_OnBuffering(lFlags,lPercentage)

if (lPercentage=100) then

StartPlay=false

if (FirstPlay) then

FirstPlay=false

end if

exit sub

end if

End Sub

Sub player_OnErrorMessage(uSeverity, uRMACode, uUserCode, pUserString, pMoreInfoURL, pErrorString)

select case player.GetLastErrorRMACode()

case -2147221496

window.alert(ERR_FileNotFind)

case -2147221433,-2147221428,-2147221417,-2147217468

window.alert(ERR_NotLocateServer)

case else

window.alert(ERR_UnkownError)

end select

End Sub

</script>

<td height=”60″>

ASP电影播放器(asf格式用什么播放器)新鲜出炉

player.SetEnableContextMenu(false);

player.SetWantErrors(true);

function click(e) {

if (document.all) {

if (event.button==2||event.button==3) {

oncontextmenu=’return false’;

}

}

if (document.layers) {

if (e.which==3) {

oncontextmenu=’return false’;

}

}

}

if (document.layers) {

document.captureEvents(Event.MOUSEDOWN);

}

document.onmousedown=click;

document.oncontextmenu=new Function(“return false;”)

</table>

总算搞拈了

© 版权声明

相关文章