(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["components/sound-recording/sound-recording"],{"1d3e":function(t,e,n){"use strict";n.r(e);var i=n("75dd"),r=n("82d2");for(var o in r)"default"!==o&&function(t){n.d(e,t,(function(){return r[t]}))}(o);n("541f");var s,a=n("f0c5"),c=Object(a["a"])(r["default"],i["b"],i["c"],!1,null,null,null,!1,i["a"],s);e["default"]=c.exports},"53d5":function(t,e,n){},"541f":function(t,e,n){"use strict";var i=n("53d5"),r=n.n(i);r.a},"75dd":function(t,e,n){"use strict";n.d(e,"b",(function(){return r})),n.d(e,"c",(function(){return o})),n.d(e,"a",(function(){return i}));var i={uCircleProgress:function(){return n.e("components/u-circle-progress/u-circle-progress").then(n.bind(null,"2bdb"))}},r=function(){var t=this,e=t.$createElement;t._self._c},o=[]},"82d2":function(t,e,n){"use strict";n.r(e);var i=n("a324"),r=n.n(i);for(var o in i)"default"!==o&&function(t){n.d(e,t,(function(){return i[t]}))}(o);e["default"]=r.a},a324:function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(){n.e("components/u-circle-progress/u-circle-progress").then(function(){return resolve(n("2bdb"))}.bind(null,n)).catch(n.oe)},r=t.getRecorderManager(),o=t.createInnerAudioContext(),s={components:{uCircleProgress:i},props:{width:{type:String,default:"60rpx"},height:{type:String,default:"60rpx"},showTop:{type:Boolean,default:!0},maximum:{type:[Number,String],default:15},duration:{type:Number,default:20},theme:{type:String,default:"#32b99d"},confirmText:{type:String,default:"完成"}},data:function(){return{reDate:"00:00",sec:0,min:0,finish:!1,voicePath:"",playProgress:100,playTimer:null,timer:null,playStatus:!1}},created:function(){this.onMonitorEvents()},computed:{calcProgress:function(){return(this.sec+60*this.min)/this.maximum*100}},methods:{confirm:function(){o.paused||o.stop(),this.$emit("confirm",this.voicePath)},cancel:function(){o.paused||o.stop(),this.$emit("cancel")},handle:function(){this.$emit("click")},reset:function(){this.voicePath="",this.min=0,this.sec=0,this.reDate="00:00",this.playProgress=100,this.finish=!1,this.$emit("reset")},playVoice:function(){o.src=this.voicePath,o.paused?(o.play(),this.playStatus=!0):o.stop(),this.$emit("playVoice",o.paused)},onEndRecoder:function(){r.stop()},onStartRecoder:function(){r.start({duration:1e3*this.maximum})},onMonitorEvents:function(){var e=this;r.onStart((function(){t.showLoading({title:"录制中..."}),e.startDate(),e.$emit("start")})),r.onStop((function(n){var i=n.tempFilePath;e.voicePath=i,clearInterval(e.timer),t.hideLoading(),e.finish=!0,e.$emit("end")})),o.onTimeUpdate((function(){var t=o.duration,n=o.currentTime,i=t-n;e.playProgress=i/t*100;var r=Math.floor(i/60);r<10&&(r="0"+r);var s=Math.floor(i%60);s<10&&(s="0"+s),e.reDate=r+":"+s})),o.onPause((function(){e.resetDate(),e.playProgress=100,e.playStatus=!1,console.log("播放暂停"),e.$emit("stop")})),o.onStop((function(){e.resetDate(),e.playProgress=100,e.playStatus=!1,console.log("播放停止"),e.$emit("stop")}))},startDate:function(){var t=this;clearInterval(this.timer),this.sec=0,this.min=0,this.timer=setInterval((function(){t.sec+=t.duration/1e3,t.sec>=60&&(t.min++,t.sec=0),t.resetDate()}),this.duration)},resetDate:function(){var t=this.sec<10?"0"+parseInt(this.sec):parseInt(this.sec),e=this.min<10?"0"+this.min:this.min;this.reDate=e+":"+t}}};e.default=s}).call(this,n("543d")["default"])}}]);
;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
    'components/sound-recording/sound-recording-create-component',
    {
        'components/sound-recording/sound-recording-create-component':(function(module, exports, __webpack_require__){
            __webpack_require__('543d')['createComponent'](__webpack_require__("1d3e"))
        })
    },
    [['components/sound-recording/sound-recording-create-component']]
]);
