diff --git a/src/apps/AppBroadcast/LiveBroadcast.vue b/src/apps/AppBroadcast/LiveBroadcast.vue index c6120ebf..f66a6842 100644 --- a/src/apps/AppBroadcast/LiveBroadcast.vue +++ b/src/apps/AppBroadcast/LiveBroadcast.vue @@ -157,6 +157,7 @@ }, onLongtap () { + this.time = 60 if (!this.equipmentList.length) { return this.$u.toast('请选择播发设备') } @@ -174,7 +175,6 @@ }, record () { - this.time = 60 this.recorder = Recorder({ type: 'mp3', sampleRate: 16000, @@ -191,11 +191,13 @@ }, timing () { - this.time = this.time - 1 - if (this.time === 0) { this.stop() + + return false } + this.time = this.time - 1 + this.timingTimeout = setTimeout(() => { this.timing() }, 1000) @@ -275,7 +277,6 @@ this.isShow = false }) - this.time = 60 console.log(blob, (window.URL || webkitURL).createObjectURL(blob), '时长:' + duration + 'ms') }, msg => { console.log('录音失败:' + msg)