{"remainingRequest":"D:\\jenkins\\workspace\\yhxt-web\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\yhxt-web\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\yhxt-web\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\yhxt-web\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\yhxt-web\\src\\views\\bigScreen\\components\\videoPlayer.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\yhxt-web\\src\\views\\bigScreen\\components\\videoPlayer.vue","mtime":1720548822842},{"path":"D:\\jenkins\\workspace\\yhxt-web\\babel.config.js","mtime":1667326389982},{"path":"D:\\jenkins\\workspace\\yhxt-web\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\yhxt-web\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\yhxt-web\\node_modules\\babel-loader\\lib\\index.js","mtime":456789000000},{"path":"D:\\jenkins\\workspace\\yhxt-web\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\yhxt-web\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["//\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; // 是否移动设备\nvar MSE_IS_SUPPORT = !!window.MediaSource; // 是否支持mse\nexport default {\n name: 'video-player',\n components: {\n ScreenDialog: function ScreenDialog() {\n return import(\"./ScreenDialog.vue\");\n } // 解决组件递归问题\n },\n\n props: {\n isShowScreen: {\n type: Boolean,\n default: false\n },\n cameraIndexCode: {\n type: String,\n default: ''\n },\n resources: {\n type: Array,\n default: function _default() {\n return [];\n }\n },\n playerId: {\n type: String,\n default: ''\n }\n },\n data: function data() {\n return {\n isMoveDevice: IS_MOVE_DEVICE,\n player: null,\n splitNum: IS_MOVE_DEVICE ? 1 : 2,\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 isShowIcon: false,\n time: null,\n showDialog: false\n };\n },\n computed: {\n mode: function mode() {\n return this.tabActive === 'mse' ? 0 : 1;\n }\n },\n // watch: {\n // cameraIndexCode(newVal, oldVal) {\n // this.cameraIndexCode = newVal\n // this.getVideoURL()\n // },\n // },\n mounted: function mounted() {\n // this.time = setInterval(() => {\n // this.createPlayer()\n // clearInterval(this.time)\n // }, 100)\n this.createPlayer();\n },\n methods: {\n init: function init() {\n var _this = this;\n window.addEventListener('resize', function () {\n if (_this.player) {\n _this.player.JS_Resize();\n }\n });\n },\n createPlayer: function createPlayer(val) {\n var _this2 = this;\n this.player = new window.JSPlugin({\n szId: 'playerId',\n szBasePath: '/',\n iMaxSplit: 1,\n iCurrentSplit: IS_MOVE_DEVICE ? 1 : 2,\n openDebug: true,\n oStyle: {\n borderSelect: IS_MOVE_DEVICE ? '#000' : '#037db4'\n }\n });\n this.init();\n // this.getVideoURL(val)\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 //鼠标移过回调\n //console.log(iWndIndex);\n },\n windowEventOut: function windowEventOut(iWndIndex) {\n //鼠标移出回调\n //console.log(iWndIndex);\n },\n windowEventUp: function windowEventUp(iWndIndex) {\n //鼠标mouseup事件回调\n //console.log(iWndIndex);\n },\n windowFullCcreenChange: function windowFullCcreenChange(bFull) {\n //全屏切换回调\n console.log('fullScreen callback: ', bFull);\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 }).then(function () {\n _this2.player.JS_SetOptions({\n bSupportSound: true,\n // 是否支持音频,默认支持\n bSupportDoubleClickFull: true,\n // 是否双击窗口全屏,默认支持\n bOnlySupportMSE: false,\n // 只支持 MSE\n bOnlySupportJSDecoder: true // 只支持 JSDecoder\n }).then(function () {\n console.log('JS_SetOptions');\n });\n });\n },\n /* 预览&对讲 */realplay: function realplay() {\n var _this3 = this;\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 if (_this3.isShowScreen) {\n _this3.isShowIcon = true;\n }\n console.log('realplay success');\n _this3.videoinfo = '';\n }, function (e) {\n _this3.videoinfo = '播放失败,请重试';\n console.error(e);\n });\n },\n stopPlay: function stopPlay() {\n var _this4 = this;\n if (!this.player) return;\n this.player.JS_Stop().then(function () {\n _this4.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 },\n getVideoURL: function getVideoURL(val) {\n var _this5 = this;\n if (!val) return this.videoinfo = '暂无视频';\n this.videoinfo = '视频加载中...';\n var query = {\n cameraIndexCode: val // '50035800001310713876', // 监控点编码\n };\n\n this.$http.post('${yhxt}/baseDataStatistics/v1/getPreviewURLs', query).then(function (res) {\n if (res.data.state && res.data.value) {\n var data = JSON.parse(res.data.value);\n _this5.urls.realplay = data.url;\n _this5.realplay();\n } else {\n _this5.videoinfo = '获取监控点资源失败!';\n _this5.$message.warning('获取监控点资源失败!');\n }\n });\n },\n openDialog: function openDialog() {\n var _this6 = this;\n this.showDialog = true;\n var cameraIndexCode = this.cameraIndexCode,\n resources = this.resources;\n this.$nextTick(function () {\n _this6.$refs.dialog.open(cameraIndexCode, resources);\n });\n }\n }\n};",null]}