{"remainingRequest":"D:\\jenkins\\workspace\\sfz-lh-fvue\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\sfz-lh-fvue\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\sfz-lh-fvue\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\sfz-lh-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\sfz-lh-fvue\\src\\views\\Normal\\components\\videoPlayerHK.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\sfz-lh-fvue\\src\\views\\Normal\\components\\videoPlayerHK.vue","mtime":1712171298892},{"path":"D:\\jenkins\\workspace\\sfz-lh-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\sfz-lh-fvue\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\sfz-lh-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\sfz-lh-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\sfz-lh-fvue\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"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//\nvar MSE_IS_SUPPORT = !!window.MediaSource; // 是否支持mse\n\nvar portal = window.context.portal;\nexport default {\n name: 'videoPlayerDH',\n props: {\n wrapperName: {\n type: String,\n default: 'h5-play-wrap'\n },\n showWdn: {\n type: Boolean,\n default: true\n },\n showFull: {\n type: Boolean,\n default: true\n },\n maxSplit: {\n type: Number,\n default: 4\n },\n currentSplit: {\n type: Number,\n default: 2\n }\n },\n data: function data() {\n return {\n player: null,\n videoinfo: '',\n urls: {\n realplay: ''\n },\n mode: MSE_IS_SUPPORT ? 0 : 1\n };\n },\n mounted: function mounted() {\n this.createPlayer();\n },\n methods: {\n getVideoURL: function getVideoURL(val) {\n var _this = this;\n\n if (!val) return this.videoinfo = '暂无视频';\n this.videoinfo = '视频加载中...';\n var query = {\n cameraIndexCode: val // '50035800001310713876', // 监控点编码\n\n };\n this.$http.post(portal + '/cameras/manager/v1/getPreviewURLs', query).then(function (res) {\n if (res.data.state && res.data.value) {\n var data = JSON.parse(res.data.value);\n _this.urls.realplay = data.url;\n\n _this.realplay();\n } else {\n _this.videoinfo = '获取监控点资源失败!';\n\n _this.$message.warning('获取监控点资源失败!');\n }\n });\n },\n realplay: function realplay() {\n var _this2 = this;\n\n var player = this.player,\n mode = this.mode,\n urls = this.urls,\n index = player.currentWindowIndex,\n playURL = urls.realplay;\n console.log(player, 'player');\n player.JS_Play(playURL, {\n playURL: playURL,\n mode: mode\n }, index).then(function () {\n console.log('realplay success');\n }, function (e) {\n _this2.videoinfo = '播放失败,请重试!';\n console.error(e);\n });\n },\n stopPlay: function stopPlay() {\n var _this3 = this;\n\n this.player.JS_Stop().then(function () {\n _this3.playback.rate = 0;\n console.log('stop realplay success');\n }, function (e) {\n console.error(e);\n });\n },\n init: function init() {\n var _this4 = this;\n\n // 设置播放容器的宽高并监听窗口大小变化\n window.addEventListener('resize', function () {\n if (_this4.player) {\n _this4.player.JS_Resize();\n }\n });\n },\n createPlayer: function createPlayer() {\n this.player = new window.JSPlugin({\n szId: 'player',\n szBasePath: '/',\n iMaxSplit: this.maxSplit,\n iCurrentSplit: this.currentSplit,\n openDebug: true,\n oStyle: {\n borderSelect: '#FFCC00'\n }\n });\n this.init(); // 事件回调绑定\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('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 });\n },\n onChangeWdnNum: function onChangeWdnNum(item) {\n var splitNum = item;\n this.player.JS_ArrangeWindow(splitNum).then(function () {\n console.log(\"arrangeWindow to \".concat(splitNum, \"x\").concat(splitNum, \" success\"));\n }, function (e) {\n console.error(e);\n });\n },\n onSetFull: function onSetFull() {\n this.player.JS_FullScreenDisplay(true).then(function () {\n console.log(\"wholeFullScreen success\");\n }, function (e) {\n console.error(e);\n });\n }\n },\n beforeDestroy: function beforeDestroy() {}\n};",null]}