IntelligentRecognition/ah-jjsp-web/bns/js/video/uvp-bai.js

1 line
100 KiB
JavaScript
Raw Normal View History

2024-05-24 16:09:40 +08:00
"use strict";function _createForOfIteratorHelper(e,o){var t,r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=_unsupportedIterableToArray(e))||o&&e&&"number"==typeof e.length)return r&&(e=r),t=0,{s:o=function(){},n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:o};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var n,a=!0,i=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){i=!0,n=e},f:function(){try{a||null==r.return||r.return()}finally{if(i)throw n}}}}function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,o){if(e){if("string"==typeof e)return _arrayLikeToArray(e,o);var t=Object.prototype.toString.call(e).slice(8,-1);return"Map"===(t="Object"===t&&e.constructor?e.constructor.name:t)||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(e,o):void 0}}function _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _arrayLikeToArray(e,o){(null==o||o>e.length)&&(o=e.length);for(var t=0,r=new Array(o);t<o;t++)r[t]=e[t];return r}var _version="v1.0.0",url=(consoleLog("当前组件版本",1,_version),consoleLog("最后更新日期",1,"2023-03-23 16:45"),window.top.__BASE_LOCATION__=document.currentScript.src.slice(0,-10),"".concat(window.top.__BASE_LOCATION__,"/script/ailabel.js")),script=document.createElement("script");function VideoObj(e,o,t,r,n,a,i,c,s){if(!o||"number"!=typeof o||16<o||o<1)throw new Error("窗口数应当在1-16之间");if("video"===a?a=1:"replay"===a&&(a=2),![1,2].includes(a))throw new Error("objType参数不合法");try{var l=this;this.color="rgba(135,206,235,1)",this.selectWidth="1",this.transType265="websocket",this.rongqiId=e,this.isTuchuScreen=1,this.returnFuc=i,this.showMenuArr=[],this.showCircleCloud=!1,this.showDefaultCloud=!1,this.show3dCloud=!1,this.isDrag=!0,this.gMap=null,this.gkInfo=!0,this.winNum=o,this.ip=t||window.location.hostname,this.port=r||window.location.port||"80",this.ak=s,this.downloadFileTpye="ps",this.token=n,this.refreshToken=null,this.errorList=null,this.objType=2===a?"replay":"video",this.flvType="websocket",this.proxyIp=null,this.isMp4="flv",this.isWaterMark=!1,this.hasAudio=!1,this.cloudRowSpeed=5,this.cloudColSpeed=5,this.remoteVersion=null,this.loopInterval=null,this.PTZSpeed=5,this.playingSelectedWinNum=null,this.playingSelecteddevCode=null,this.screenNum=1,this.isAllScreen=0,this.isPlayCodeList=[],this.isTalkingDevCode="",this.videoWidth=0,this.videoHeight=0,this.argarr=[],this.menuArr=[{menuCode:"rightMenu01",menuName:"软解播放"},{menuCode:"rightMenu02",menuName:"关闭当前视频"},{menuCode:"rightMenu03",menuName:"关闭所有视频"},{menuCode:"rightMenu04",menuName:"工况信息"},{menuCode:"rightMenu05",menuName:"开启箭头云台"}],this.errorMap={1:"视频设备故障",2:"视频设备网络故障",3:"视频平台故障",4:"发现一个错误"},this.myUserName=s||"piadmin",this.errorCodeType="inner",0<=window.origin.indexOf("https://")?0<=this.ip.indexOf("http://")?this.gatewayURL=window._gateWayUrl=this.ip+":"+this.port:this.gatewayURL=window._gateWayUrl="https://"+this.ip+":"+this.port:0<=this.ip.indexOf("http://")?this.gatewayURL=window._gateWayUrl=this.ip+":"+this.port:this