|
@@ -74,7 +74,7 @@ import {apiVoiceList,apiVoiceSectionList,apiVoicePlayRecord,apiVoiceDel} from '@
|
|
|
import {apiGetSceneToParams} from '@/api/common'
|
|
|
import noAuth from './components/noAuth.vue'
|
|
|
const moment=require('@/utils/moment-with-locales.min')
|
|
|
-const innerAudioContext = uni.createInnerAudioContext();//播放音频实例
|
|
|
+let innerAudioContext = uni.createInnerAudioContext();//播放音频实例
|
|
|
export default {
|
|
|
components:{
|
|
|
noAuth
|
|
@@ -288,7 +288,7 @@ export default {
|
|
|
handlePlay(item){
|
|
|
|
|
|
//没有初始化时
|
|
|
- if(!innerAudioContext.src){
|
|
|
+ if(this.temAudio.id==0){
|
|
|
this.listenAudio()
|
|
|
this.temAudio.id=item.BroadcastId
|
|
|
this.temAudio.duration=item.VoicePlaySeconds
|
|
@@ -326,13 +326,14 @@ export default {
|
|
|
})
|
|
|
innerAudioContext.onEnded(()=>{
|
|
|
console.log('录音播放自然结束');
|
|
|
- this.temAudio.paused=true
|
|
|
setTimeout(() => {
|
|
|
+ this.temAudio.paused=true
|
|
|
this.temAudio.id=0
|
|
|
+ innerAudioContext.src=''
|
|
|
}, 100);
|
|
|
- innerAudioContext.src=''
|
|
|
})
|
|
|
innerAudioContext.onTimeUpdate(()=>{
|
|
|
+ // console.log('时间更新');
|
|
|
this.temAudio.curTime=parseInt(this.temAudio.duration)-parseInt(innerAudioContext.currentTime)
|
|
|
})
|
|
|
},
|