This commit is contained in:
yanran200730
2022-06-11 12:12:44 +08:00
parent 4b3962fefa
commit c0e2ff2fe0
2 changed files with 23 additions and 11 deletions

View File

@@ -129,8 +129,9 @@
this.innerAudioContext.autoplay = true
this.innerAudioContext.onEnded(() => {
if (this.currIndex > -1) {
this.$set(this.recordList[this.currIndex], 'isPlay', false)
// this.innerAudioContext.destroy()
this.recordList.forEach((v, index) => {
this.$set(this.recordList[index], 'isPlay', false)
})
this.currIndex = -1
}
})
@@ -139,7 +140,6 @@
})
uni.$on('chooseEquipment', e => {
console.log(e)
this.equipmentList = e.equipmentList
})
},
@@ -203,6 +203,10 @@
},
play (url, index) {
this.innerAudioContext.destroy()
this.recordList.forEach((v, index) => {
this.$set(this.recordList[index], 'isPlay', false)
})
this.currIndex = index
this.$nextTick(() => {
@@ -240,6 +244,7 @@
serialNo: this.equipmentList.map(v => v.serialNo).join(',')
}).then(res => {
if (res.code === 0) {
!this.broadcastId && (this.broadcastId = res.data.broadcastId)
this.$u.toast('播发成功')
this.recordList.push({
src: (window.URL || webkitURL).createObjectURL(blob),