You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
109 KiB
JavaScript

2 weeks ago
!function(){if(!window.WebVideoCtrl){var e=function(){var h="100%",f="100%",u="",c="";oSecurityCap={};var p={szContainerID:szAESKey="",szColorProperty:"",szOcxClassId:"clsid:FDF0038A-CF64-4634-81AB-80F0A7946D6C",szMimeTypes:"application/webvideo-plugin-kit",szBasePath:"",iWndowType:1,iPlayMode:2,bWndFull:!0,iPackageType:2,bDebugMode:!1,bNoPlugin:!0,cbSelWnd:null,cbDoubleClickWnd:null,cbEvent:null,cbRemoteConfig:null,cbInitPluginComplete:null,proxyAddress:null},y=null,P=0,s=!1,I=[],m=[],t=null,S=null,C=null,v=null,o=this,g=null,x=1,d="IPCamera",D="IPDome",z="IPZoom";window.GetSelectWndInfo=function(e){if(Z()){P=e,(t=[]).push("<RealPlayInfo>"),t.push("<SelectWnd>"+e+"</SelectWnd>"),t.push("</RealPlayInfo>"),p.cbSelWnd&&p.cbSelWnd(v.loadXML(t.join("")))}else{var t,n=v.loadXML(e);if(0<re.$XML(n).find("SelectWnd",!0).length)P=parseInt(re.$XML(n).find("SelectWnd").eq(0).text(),10),null===g&&R(),(t=[]).push("<RealPlayInfo>"),t.push("<SelectWnd>"+P+"</SelectWnd>"),t.push("</RealPlayInfo>"),p.cbSelWnd&&p.cbSelWnd(v.loadXML(t.join("")));else if(0<re.$XML(n).find("DoubleClickWnd",!0).length){var r=parseInt(re.$XML(n).find("DoubleClickWnd").eq(0).text(),10);s="0"===re.$XML(n).find("IsFullScreen").eq(0).text(),p.cbDoubleClickWnd&&p.cbDoubleClickWnd(r,s)}}},window.WindowDblClick=function(e){s=e,p.cbDoubleClickWnd&&p.cbDoubleClickWnd(P,s)},window.ZoomInfoCallback=function(e){var t=o.findWndIndexByIndex(P);if(-1!=t){var n=m[t];if(-1!=(t=o.findDeviceIndexByIP(n.szDeviceIdentify))){var r=I[t];r.oProtocolInc.set3DZoom(r,n,e,{success:function(e){},error:function(){}})}}},window.PluginEventHandler=function(e,t,n){Z()?p.cbEvent&&p.cbEvent(e,t,n):(0==t||2==t?o.I_Stop(e):21==t?o.I_StopRecord(e):3==t&&o.I_StopVoiceTalk(),p.cbEvent&&p.cbEvent(t,e,n))},window.GetHttpInfo=function(e,t,n){K.prototype.processCallback(e,t)},window.RemoteConfigInfo=function(e){p.cbRemoteConfig&&p.cbRemoteConfig(e)},window.KeyBoardEventInfo=function(e){100===parseInt(e,10)&&(s=!1,p.cbDoubleClickWnd&&p.cbDoubleClickWnd(P,s))};var T=function(){if(p.bDebugMode){var e=b(arguments);t._alert(e)}},b=function(){for(var e=arguments[0],t=1;t<arguments.length;t++)e=e.replace("%s",arguments[t]);return e},A=function(e){var t=e.indexOf(":");return-1<t?e.substring(0,t):e},M=function(e){return void 0===e},a=function(e){return"[object Object]"===Object.prototype.toString.call(e)},L=function(e,t){var n="",r={type:"GET",async:!1,success:function(e){e&&e.Token&&(n=e.Token.value)}};return o.I_SendHTTPRequest(t,"ISAPI/Security/token?format=json",r),n},l=function(e,t,n){o.I_GetSecurityVersion(e,{success:function(e){oSecurityCap.iKeyIterateNum=parseInt(re.$XML(e).find("keyIterateNum").eq(0).text(),10),oSecurityCap.oIrreversibleEncrypt={bSupport:"true"===re.$XML(e).find("isIrreversible").eq(0).text(),salt:re.$XML(e).find("salt").eq(0).text()},szAESKey=v.strToAESKey(t,n)}})},q=function(){var e="";if(v.browser().msie)e="<object classid='"+p.szOcxClassId+"' codebase='' standby='Waiting...' id='"+u+"' width='"+h+"' height='"+f+"' align='center' ><param name='wndtype' value='"+p.iWndowType+"'><param name='playmode' value='"+p.iPlayMode+"'><param name='colors' value='"+p.szColorProperty+"'></object>";else for(var t=navigator.mimeTypes.length,n=0;n<t;n++)navigator.mimeTypes[n].type.toLowerCase()==p.szMimeTypes&&(e="<embed align='center' type='"+p.szMimeTypes+"' width='"+h+"' height='"+f+"' name='"+c+"' wndtype='"+p.iWndowType+"' playmode='"+p.iPlayMode+"' colors='"+p.szColorProperty+"'>");return e},R=function(){if(!Z()&&null!==y){var e=y.HWP_GetLocalConfig();g=v.loadXML(e)}},w=function(s){o.I_GetDeviceInfo(s.szIP,{success:function(e){s.szDeviceType=re.$XML(e).find("deviceType").eq(0).text()}}),o.I_GetAnalogChannelInfo(s.szIP,{success:function(e){}}),o.I_GetAudioInfo(s.szIP,{success:function(e){var t=re.$XML(e).find("audioCompressionType",!0);if(0<t.length){var n=re.$XML(t).eq(0).text(),r=0;"G.711ulaw"==n?r=1:"G.711alaw"==n?r=2:"G.726"==n?r=3:"MP2L2"==n||"MPEL2"==n?r=4:"G.722.1"==n?r=0:"AAC"==n?r=5:"PCM"==n&&(r=6),s.iAudioType=r}""!==re.$XML(e).find("audioBitRate").eq(0).text()?s.m_iAudioBitRate=1e3*p