优化
This commit is contained in:
@@ -157,6 +157,7 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
onLongtap () {
|
onLongtap () {
|
||||||
|
this.time = 60
|
||||||
if (!this.equipmentList.length) {
|
if (!this.equipmentList.length) {
|
||||||
return this.$u.toast('请选择播发设备')
|
return this.$u.toast('请选择播发设备')
|
||||||
}
|
}
|
||||||
@@ -174,7 +175,6 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
record () {
|
record () {
|
||||||
this.time = 60
|
|
||||||
this.recorder = Recorder({
|
this.recorder = Recorder({
|
||||||
type: 'mp3',
|
type: 'mp3',
|
||||||
sampleRate: 16000,
|
sampleRate: 16000,
|
||||||
@@ -191,11 +191,13 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
timing () {
|
timing () {
|
||||||
this.time = this.time - 1
|
|
||||||
|
|
||||||
if (this.time === 0) {
|
if (this.time === 0) {
|
||||||
this.stop()
|
this.stop()
|
||||||
|
|
||||||
|
return false
|
||||||
}
|
}
|
||||||
|
this.time = this.time - 1
|
||||||
|
|
||||||
this.timingTimeout = setTimeout(() => {
|
this.timingTimeout = setTimeout(() => {
|
||||||
this.timing()
|
this.timing()
|
||||||
}, 1000)
|
}, 1000)
|
||||||
@@ -275,7 +277,6 @@
|
|||||||
this.isShow = false
|
this.isShow = false
|
||||||
})
|
})
|
||||||
|
|
||||||
this.time = 60
|
|
||||||
console.log(blob, (window.URL || webkitURL).createObjectURL(blob), '时长:' + duration + 'ms')
|
console.log(blob, (window.URL || webkitURL).createObjectURL(blob), '时长:' + duration + 'ms')
|
||||||
}, msg => {
|
}, msg => {
|
||||||
console.log('录音失败:' + msg)
|
console.log('录音失败:' + msg)
|
||||||
|
|||||||
Reference in New Issue
Block a user