《安装播放器插件网页脚本.doc》由会员分享,可在线阅读,更多相关《安装播放器插件网页脚本.doc(4页珍藏版)》请在金锄头文库上搜索。
1、document.onkeydown = function()if(event.keyCode != 27)if(event.keyCode=16|event.keyCode=17)/IE7下shift,ctrl键不能重新赋值event.returnValue = false;elseevent.keyCode = 0;event.returnValue = false;function PlayerError()if(window.opener = undefined)history.back(-1);else self.close(); VIEWGOOD WebPlayer x = Che
2、ckPlayer();function PlayerInit(szServerHost)WebPlayer.ServerMode= 2;WebPlayer.UserName= !GUEST;WebPlayer.UserID= 93126456;WebPlayer.PlayMode= 1;/SendTypeWebPlayer.PlayModeValue= 926859437;/MultiIP_AddrWebPlayer.ChannelID= 926859437;WebPlayer.AuthenHost= 222.33.63.4:80;WebPlayer.ServerHost= 1.1.1.1;/
3、IpAddrWebPlayer.Session= ; /;WebPlayer.ProtocolType= 1;WebPlayer.EmbedMode= 1;WebPlayer.ProgName= 甜蜜绯闻/对我说谎试试 - 第 1 集;WebPlayer.VODVersion= 6000;WebPlayer.ContorlWidth = 322;WebPlayer.ContorlHeight= 320;/WebPlayer.PlayInExe = 1;WebPlayer.Start();function RestorePlayerWindow(iWidth, iHeight)window.re
4、sizeTo(iWidth, iHeight);availWidth= screen.Width;availHeight= screen.availHeight;iTmpPix= availWidth - iWidth;iWinLeft= iTmpPix / 2;iTmpPix= availHeight - iHeight;iWinHeight= iTmpPix / 2;window.moveTo(iWinLeft, iWinHeight);function GetHostName(szUrl)iNameSize= szUrl.indexOf(/, 7) - 7;szUrl= szUrl.su
5、bstr(7, iNameSize);if(szUrl.indexOf(:) 0)iNameSize = szUrl.indexOf(:);szHostName= szUrl.substr(0, iNameSize);return szHostName;function GetHostPort(szUrl)var szHostPort, iPortPos, iPortSize;if(szUrl.indexOf(:, 5) 0)iPortPos = szUrl.indexOf(:, 5) + 1;if(szUrl.indexOf(/, iPortPos) 0)iPortSize = szUrl.
6、indexOf(/, iPortPos) - iPortPos;szHostPort = szUrl.substr(iPortPos, iPortSize);elseszHostPort = 80;return szHostPort;function CheckPlayer()tryvar oTest = new ActiveXObject(VGPlayer.WebVGPlayer.1);catch(e)if(window.opener = undefined)window.alert(首次点播将安装播放器插件.);/parent.window.location.href = ./downlo
7、ad/WebPlayer.exe;elsewindow.opener.alert(首次点播将安装播放器插件.);/window.opener.parent.location.href = ./download/WebPlayer.exe;self.close();return false;delete oTest;PlayerInit(1.1.1.1);/RestorePlayerWindow(334, 352);return true;function GetServerHost()szServerHost = ;if(szServerHost.length = 0)alert(n对不起,服务器集群负荷已满或您的地址不在服务范围内!);self.close();if(szServerHost = -1)szServerHost = GetHostName(this.location.href) + :80;return szServerHost;