{"remainingRequest":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\bzzgj-fvue\\src\\views\\Device\\deviceMonitor\\components\\easyPlayerPlugin.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\src\\views\\Device\\deviceMonitor\\components\\easyPlayerPlugin.vue","mtime":1688548248725},{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\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//\n//\n//\n//\n//\n\r\nimport EasyPlayer from '@easydarwin/easyplayer'\r\nconst headersUrlencoded = {\r\n 'Content-type': 'application/x-www-form-urlencoded',\r\n}\r\nexport default {\r\n name: 'easyPlayer',\r\n components: {\r\n EasyPlayer,\r\n },\r\n props: {},\r\n data() {\r\n return {\r\n player: null,\r\n muted: true,\r\n activePlayer: {\r\n name: '',\r\n url: '',\r\n videoTitle: '',\r\n },\r\n url: '',\r\n playerList: [\r\n {\r\n name: 'easyPlayer-01',\r\n url: '',\r\n videoTitle: '',\r\n },\r\n {\r\n name: 'easyPlayer-02',\r\n url: '',\r\n videoTitle: '',\r\n },\r\n {\r\n name: 'easyPlayer-03',\r\n url: '',\r\n videoTitle: '',\r\n },\r\n {\r\n name: 'easyPlayer-04',\r\n url: '',\r\n videoTitle: '',\r\n },\r\n ],\r\n }\r\n },\r\n methods: {\r\n getUrlAndPlay(code, title) {\r\n if (!this.activePlayer.name) {\r\n this.$message.warning('请选择播放窗口')\r\n return\r\n }\r\n let data = this.qs.stringify({\r\n code,\r\n scheme: 'HLS',\r\n })\r\n let param = {\r\n url: '${portal}/biz/catalog/base/point/previewURLs',\r\n data,\r\n method: 'post',\r\n headers: headersUrlencoded,\r\n }\r\n this.$http.request(param).then(\r\n (resp) => {\r\n if (resp.data && resp.data.value) {\r\n let value = JSON.parse(resp.data.value)\r\n this.url = value.url\r\n this.activePlayer.videoTitle = title\r\n this.activePlayer.url = this.url\r\n this.play(this.activePlayer)\r\n }\r\n },\r\n (error) => {\r\n console.log('获取播放地址', error)\r\n this.$message({\r\n message: '获取播放地址失败,请重试!',\r\n type: 'error',\r\n })\r\n }\r\n )\r\n },\r\n play(player) {\r\n this.$nextTick(() => {\r\n this.$refs[player.name].play()\r\n })\r\n },\r\n handleActive(player) {\r\n this.activePlayer = player\r\n },\r\n },\r\n}\r\n",null]}