{"version":3,"sources":["webpack:///./src/components/Audio/player.vue?10e2","webpack:///src/components/Audio/D:/Softwares/工作平台源码/对外版本地存储/网站前端/src/components/Audio/player.vue","webpack:///./src/components/Audio/player.vue?41a3","webpack:///./src/components/Audio/player.vue","webpack:///./src/components/Audio/player.vue?7f0d"],"names":["render","_vm","this","_h","$createElement","_c","_self","attrs","on","$event","stopPropagation","playVoice","apply","arguments","_t","directives","name","rawName","value","status","expression","staticClass","volPic","_v","_s","getDuration","ref","audioURL","_f","staticRenderFns","props","file","type","Object","default","link","size","duration","Number","computed","second","parseInt","minute","data","time","message","filters","reName","filename","replace","watch","handler","newVal","mounted","audio","$refs","_this","comm","err","console","log","error","clearInterval","addEventListener","e","methods","mapActions","start","setAudio","obj","index","_uid","play","catch","setInterval","load","$notify","paused","pause","component"],"mappings":"yHAAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACE,MAAM,CAAC,GAAK,UAAUC,GAAG,CAAC,MAAQ,SAASC,GAAiC,OAAzBA,EAAOC,kBAAyBT,EAAIU,UAAUC,MAAM,KAAMC,cAAc,CAACZ,EAAIa,GAAG,WAAU,WAAW,MAAO,CAACT,EAAG,MAAM,CAACU,WAAW,CAAC,CAACC,KAAK,OAAOC,QAAQ,SAASC,MAAsB,YAAfjB,EAAIkB,OAAsBC,WAAW,yBAAyBC,YAAY,eAAe,CAAChB,EAAG,IAAI,CAACgB,YAAY,sBAAsBhB,EAAG,MAAM,CAACU,WAAW,CAAC,CAACC,KAAK,OAAOC,QAAQ,SAASC,MAAsB,SAAfjB,EAAIkB,OAAmBC,WAAW,sBAAsBC,YAAY,eAAe,CAAChB,EAAG,IAAI,CAACgB,YAAY,sBAAsBhB,EAAG,MAAM,CAACU,WAAW,CAAC,CAACC,KAAK,OAAOC,QAAQ,SAASC,MAAsB,YAAfjB,EAAIkB,OAAsBC,WAA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ACA,WACA,MAIa,aAAAkD,E,kECnBf","file":"js/chunk-1386b6d6.436180a9.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{attrs:{\"id\":\"player\"},on:{\"click\":function($event){$event.stopPropagation();return _vm.playVoice.apply(null, arguments)}}},[_vm._t(\"default\",function(){return [_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.status === 'waiting'),expression:\"status === 'waiting'\"}],staticClass:\"player-item\"},[_c('i',{staticClass:\"hiFont hi-vol-0\"})]),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.status === 'info'),expression:\"status === 'info'\"}],staticClass:\"player-item\"},[_c('i',{staticClass:\"el-icon-loading\"})]),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.status === 'success'),expression:\"status === 'success'\"}],staticClass:\"player-item\"},[(_vm.volPic == -1)?_c('i',{staticClass:\"hiFont hi-vol-1\"}):(_vm.volPic == 0)?_c('i',{staticClass:\"hiFont hi-vol-2\"}):(_vm.volPic == 1)?_c('i',{staticClass:\"hiFont hi-vol-3\"}):_c('i',{staticClass:\"hiFont hi-vol-0\"})])]}),_c('p',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.status === 'success' || _vm.status === 'waiting'),expression:\"status === 'success' || status === 'waiting'\"}]},[_vm._v(_vm._s(_vm.getDuration))]),_c('audio',{ref:\"audio\"},[_c('source',{attrs:{\"src\":_vm.audioURL,\"type\":\"audio/ogg\"}}),_c('source',{attrs:{\"src\":_vm._f(\"reName\")(_vm.audioURL),\"type\":\"audio/mpeg\"}}),_vm._v(\" Your browser does not support the audio element. \")])],2)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\r\nimport { mapActions } from 'vuex';\r\nexport default {\r\n\tprops: {\r\n\t\tfile: {\r\n\t\t\ttype: Object,\r\n\t\t\tdefault: function() {\r\n\t\t\t\treturn {\r\n\t\t\t\t\tlink: '',\r\n\t\t\t\t\tsize: 0\r\n\t\t\t\t};\r\n\t\t\t}\r\n\t\t},\r\n\t\tduration: {\r\n\t\t\ttype: Number,\r\n\t\t\tdefault: null\r\n\t\t}\r\n\t},\r\n\tcomputed: {\r\n\t\tgetDuration() {\r\n\t\t\tif (this.duration) {\r\n\t\t\t\tlet second = parseInt(this.duration % 60)<10&&this.duration / 60 >= 1 ?`0${parseInt(this.duration % 60)}''` :`${parseInt(this.duration %60)}''`;\r\n\t\t\t\tlet minute = this.duration / 60 >= 1 ? `${parseInt(this.duration / 60)}'` : '';\r\n\t\t\t\treturn minute + second;\r\n\t\t\t}\r\n\t\t\treturn null;\r\n\t\t}\r\n\t},\r\n\tdata() {\r\n\t\treturn {\r\n\t\t\tvolPic: null,\r\n\t\t\ttime: null,\r\n\t\t\taudioURL: null,\r\n\t\t\tstatus: 'waiting',\r\n\t\t\tmessage: '加载中,请稍后'\r\n\t\t};\r\n\t},\r\n\tfilters: {\r\n\t\treName(filename) {\r\n\t\t\tif (filename) {\r\n\t\t\t\treturn filename.replace(/ogg$|amr$|wave$/, 'mp3');\r\n\t\t\t}\r\n\t\t\treturn filename;\r\n\t\t}\r\n\t},\r\n\twatch: {\r\n\t\t'file.link': {\r\n\t\t\thandler(newVal) {\r\n\t\t\t\tthis.status = 'waiting';\r\n\t\t\t\tthis.message = '加载中,请稍后';\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tmounted() {\r\n\t\tlet audio = this.$refs.audio;\r\n\t\tlet _this = this;\r\n\t\tconst comm = err => {\r\n\t\t\tif (err.type === 'error') {\r\n\t\t\t\tconsole.log(audio.error);\r\n\t\t\t}\r\n\t\t\tclearInterval(_this.time);\r\n\t\t\t_this.volPic = null;\r\n\t\t};\r\n\t\taudio.addEventListener('error', comm, false);\r\n\t\taudio.addEventListener('ended', comm, false);\r\n\r\n\t\taudio.addEventListener(\r\n\t\t\t'canplay',\r\n\t\t\tfunction(e) {\r\n\t\t\t\t_this.status = 'success';\r\n\t\t\t},\r\n\t\t\tfalse\r\n\t\t);\r\n\t\taudio.addEventListener(\r\n\t\t\t'pause',\r\n\t\t\tfunction() {\r\n\t\t\t\tclearInterval(_this.time);\r\n\t\t\t},\r\n\t\t\tfalse\r\n\t\t);\r\n\t},\r\n\tmethods: {\r\n\t\t...mapActions(['setAudio']),\r\n\t\tstart(audio) {\r\n\t\t\tthis.setAudio({\r\n\t\t\t\tobj: audio,\r\n\t\t\t\tindex: this._uid\r\n\t\t\t});\r\n\t\t\taudio.play().catch(e => {\r\n\t\t\t\t// 音频加载失败\r\n\t\t\t\tconsole.log(e);\r\n\t\t\t});\r\n\t\t\tthis.time = setInterval(() => {\r\n\t\t\t\tthis.volPic += 1;\r\n\t\t\t\tif (this.volPic == 2) {\r\n\t\t\t\t\tthis.volPic = -1;\r\n\t\t\t\t}\r\n\t\t\t}, 500);\r\n\t\t},\r\n\t\tplayVoice() {\r\n\t\t\tlet audio = this.$refs.audio;\r\n\t\t\tif (this.status === 'waiting') {\r\n\t\t\t\tthis.audioURL = this.file.link;\r\n\t\t\t\tthis.status = 'info';\r\n\t\t\t\taudio.load();\r\n\t\t\t\tthis.start(audio);\r\n\t\t\t} else {\r\n\t\t\t\tif (this.status !== 'success') {\r\n\t\t\t\t\tthis.$notify({\r\n\t\t\t\t\t\ttype: this.status,\r\n\t\t\t\t\t\tmessage: this.message\r\n\t\t\t\t\t});\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tif (audio.paused) {\r\n\t\t\t\t\tthis.start(audio);\r\n\t\t\t\t} else {\r\n\t\t\t\t\taudio.pause();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n};\r\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./player.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./player.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./player.vue?vue&type=template&id=26bb18ba&scoped=true&\"\nimport script from \"./player.vue?vue&type=script&lang=js&\"\nexport * from \"./player.vue?vue&type=script&lang=js&\"\nimport style0 from \"./player.vue?vue&type=style&index=0&id=26bb18ba&lang=less&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"26bb18ba\",\n null\n \n)\n\nexport default component.exports","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--11-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--11-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--11-oneOf-1-2!../../../node_modules/less-loader/dist/cjs.js??ref--11-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./player.vue?vue&type=style&index=0&id=26bb18ba&lang=less&scoped=true&\""],"sourceRoot":""}