{"remainingRequest":"D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\bbsl-fvue\\src\\views\\frontScreens\\components\\videoPlayer.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\src\\views\\frontScreens\\components\\videoPlayer.vue","mtime":1684458238824},{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/es6.regexp.split\";\nimport \"core-js/modules/es6.number.constructor\";\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nvar IS_MOVE_DEVICE = document.body.clientWidth < 992; // 是否移动设备\n\nvar MSE_IS_SUPPORT = !!window.MediaSource; // 是否支持mse\n\nexport default {\n props: {\n split: {\n type: String\n },\n defaultSplit: {\n type: Number,\n default: 2\n },\n hadSiteOption: {\n type: Boolean,\n default: false\n },\n siteOption: {\n type: Array,\n default: function _default() {\n return [];\n }\n },\n siteCode: {\n type: String,\n default: ''\n }\n },\n data: function data() {\n return {\n splitDataDefault: [{\n value: 1,\n icon: 'yifenping',\n text: '1X1'\n }, {\n value: 2,\n icon: 'sifenping',\n text: '2X2'\n }, {\n value: 3,\n icon: 'jiufenping',\n text: '3X3'\n }, {\n value: 4,\n icon: 'shiliufenping',\n text: '4X4'\n }],\n splitData2: [{\n value: 1,\n icon: 'yifenping',\n text: '1X1'\n }, {\n value: 2,\n icon: 'sifenping',\n text: '2X2'\n }],\n isMoveDevice: IS_MOVE_DEVICE,\n player: null,\n splitNum: IS_MOVE_DEVICE ? 1 : this.defaultSplit,\n mseSupport: MSE_IS_SUPPORT,\n tabActive: MSE_IS_SUPPORT ? 'mse' : 'decoder',\n labelCol: {\n span: 5\n },\n wrapperCol: {\n span: 18\n },\n urls: {\n realplay: 'ws://183.64.175.153:559/openUrl/pxvGV5C',\n talk: 'ws://183.64.175.153:559/openUrl/pxvGV5C',\n playback: 'ws://183.64.175.153:559/openUrl/pxvGV5C'\n },\n playback: {\n startTime: '2021-07-26T00:00:00',\n endTime: '2021-07-26T23:59:59',\n // valueFormat: moment.HTML5_FMT.DATETIME_LOCAL_SECONDS,\n seekStart: '2021-07-26T12:00:00',\n rate: ''\n },\n muted: true,\n volume: 50,\n volumeOnSvg: {\n template: ''\n },\n volumeOffSvg: {\n template: ''\n },\n videoinfo: '视频加载中...'\n };\n },\n computed: {\n mode: function mode() {\n return this.tabActive === 'mse' ? 0 : 1;\n },\n splitData: function splitData() {\n if (this.split == 1) {\n return [];\n } else if (this.split == 2) {\n return this.splitData2;\n } else {\n return this.splitDataDefault;\n }\n }\n },\n methods: {\n init: function init() {\n var _this = this;\n\n window.addEventListener('resize', function () {\n _this.player.JS_Resize();\n });\n },\n arrangeWindow: function arrangeWindow(num) {\n var _this2 = this;\n\n console.log(1);\n this.splitNum = num;\n this.player.JS_ArrangeWindow(this.splitNum).then(function () {\n console.log(\"arrangeWindow to \".concat(_this2.splitNum, \"x\").concat(_this2.splitNum, \" success\"));\n }, function (e) {\n console.error(e);\n });\n },\n createPlayer: function createPlayer() {\n var vm = this;\n this.player = new window.JSPlugin({\n szId: 'player',\n szBasePath: '/',\n iMaxSplit: 4,\n //this.split == 1 ? 1 : 4,\n iCurrentSplit: IS_MOVE_DEVICE ? 1 : this.defaultSplit,\n openDebug: true,\n oStyle: {\n borderSelect: IS_MOVE_DEVICE ? '#000' : '#FFCC00'\n }\n }); // 事件回调绑定\n\n this.player.JS_SetWindowControlCallback({\n windowEventSelect: function windowEventSelect(iWndIndex) {\n //插件选中窗口回调\n console.log('windowSelect callback: ', iWndIndex);\n },\n pluginErrorHandler: function pluginErrorHandler(iWndIndex, iErrorCode, oError) {\n //插件错误回调\n console.log('pluginError callback: ', iWndIndex, iErrorCode, oError);\n },\n windowEventOver: function windowEventOver(iWndIndex) {//鼠标移过回调\n //console.log(iWndIndex);\n },\n windowEventOut: function windowEventOut(iWndIndex) {//鼠标移出回调\n //console.log(iWndIndex);\n },\n windowEventUp: function windowEventUp(iWndIndex) {//鼠标mouseup事件回调\n //console.log(iWndIndex);\n },\n windowFullCcreenChange: function windowFullCcreenChange(bFull) {\n //全屏切换回调\n console.log(this, vm);\n console.log('fullScreen callback: ', bFull);\n\n if (!bFull && vm.defaultSplit == 1) {\n vm.arrangeWindow(1);\n }\n },\n firstFrameDisplay: function firstFrameDisplay(iWndIndex, iWidth, iHeight) {\n //首帧显示回调\n console.log('firstFrame loaded callback: ', iWndIndex, iWidth, iHeight);\n },\n performanceLack: function performanceLack() {\n //性能不足回调\n console.log('performanceLack callback: ');\n }\n });\n },\n wholeFullScreen: function wholeFullScreen() {\n console.log(this.siteOption, 'siteOption');\n\n if (this.siteOption && this.siteOption.length) {\n var length = this.siteOption.length;\n var split = 1;\n\n if (length > 9) {\n split = 4;\n } else if (length > 4) {\n split = 3;\n } else if (length > 1) {\n split = 2;\n }\n\n this.arrangeWindow(split);\n }\n\n this.player.JS_FullScreenDisplay(true).then(function () {\n console.log(\"wholeFullScreen success\");\n }, function (e) {\n console.error(e);\n });\n },\n\n /* 预览&对讲 */\n realplay: function realplay() {\n var _this3 = this;\n\n var player = this.player,\n mode = this.mode,\n urls = this.urls,\n index = player.currentWindowIndex,\n playURL = urls.realplay;\n player.JS_Play(playURL, {\n playURL: playURL,\n mode: mode\n }, index).then(function () {\n console.log('realplay success');\n _this3.videoinfo = ''; // 将index下移\n\n console.log(index);\n index++;\n\n _this3.moveIndex(index);\n }, function (e) {\n _this3.videoinfo = '播放失败,请重试';\n console.error(e);\n });\n },\n moveIndex: function moveIndex(windowIndex) {\n var _this4 = this;\n\n console.log(windowIndex);\n this.player.JS_SelectWnd(windowIndex).then(function () {\n _this4.playback.rate = 0;\n console.log('stop realplay success');\n }, function (e) {\n console.error(e);\n });\n },\n stopPlay: function stopPlay() {\n var _this5 = this;\n\n this.player.JS_Stop().then(function () {\n _this5.playback.rate = 0;\n console.log('stop realplay success');\n }, function (e) {\n console.error(e);\n });\n },\n closeVideo: function closeVideo() {\n this.stopPlay();\n this.videoinfo = '视频已关闭';\n this.$emit('close');\n },\n // 根据监控点获取视频流地址\n getSiteVideoURL: function getSiteVideoURL(cameraIndexCode) {\n var _this6 = this;\n\n var query = {\n cameraIndexCode: cameraIndexCode // 监控点编码\n\n };\n this.$http.post('${portal}/biz/catalog/base/previewURLs', query).then(function (res) {\n if (res.data.state && res.data.value) {\n var data = res.data.value;\n\n _this6.$nextTick(function () {\n _this6.useVideoURL(data);\n });\n } else {\n _this6.$message.warning('获取监控点资源失败!');\n }\n });\n },\n changeSite: function changeSite(val) {\n this.currentSite = val;\n this.getSiteVideoURL(val);\n },\n useVideoURL: function useVideoURL(url) {\n this.videoinfo = '视频加载中...';\n console.log(url);\n this.urls.realplay = url;\n this.realplay(); // todo 这个解开就是播放\n // let query = {\n // cameraIndexCode: '110090628241674360', // 监控点编码\n // }\n // return new Promise((resolve,reject)=>{\n // this.$http\n // .post('${yhxt}/baseDataStatistics/v1/getPreviewURLs', query)\n // .then((res) => {\n // if (res.data.state && res.data.value) {\n // let data = JSON.parse(res.data.value)\n // this.urls.realplay = data.url\n // this.realplay()\n // } else {\n // this.videoinfo = '获取监控点资源失败!'\n // this.$message.warning('获取监控点资源失败!')\n // }\n // })\n // })\n }\n },\n mounted: function mounted() {\n this.init();\n this.createPlayer();\n }\n};",null]}