|
|
@ -244,8 +244,8 @@ export default { |
|
|
|
} |
|
|
|
// 当前资源是 - 视频 - 时,即销毁音频(防止干扰) |
|
|
|
if (this.show_materials[this.itemIndex].material_type == 1) { |
|
|
|
innerAudioContext.destroy() |
|
|
|
innerAudioContext.src = '' |
|
|
|
innerAudioContext.destroy(); |
|
|
|
innerAudioContext.src = ''; |
|
|
|
} |
|
|
|
// 销毁-创建音频-播放音频 |
|
|
|
innerAudioContext = uni.createInnerAudioContext(); |
|
|
@ -267,17 +267,17 @@ export default { |
|
|
|
console.log("play_video") |
|
|
|
let currentId = e.target.id; // 获取当前视频id |
|
|
|
this.videoCtx = uni.createVideoContext(currentId); |
|
|
|
innerAudioContext.destroy() |
|
|
|
innerAudioContext.destroy(); |
|
|
|
}, |
|
|
|
loading(){ |
|
|
|
console.log('play_loading') |
|
|
|
console.log('play_loading'); |
|
|
|
}, |
|
|
|
waitingVideo(){ |
|
|
|
console.log('waiting-video') |
|
|
|
this.videoCtx.pause() |
|
|
|
console.log('waiting-video'); |
|
|
|
this.videoCtx.pause(); |
|
|
|
}, |
|
|
|
timeupdateEvent(event) { |
|
|
|
console.log('timeupdateEvent') |
|
|
|
console.log('timeupdateEvent'); |
|
|
|
}, |
|
|
|
// 禁止拖动进度条快进 |
|
|
|
timeUpdate(e) { |
|
|
@ -303,7 +303,7 @@ export default { |
|
|
|
icon: 'none', |
|
|
|
duration: 2000 |
|
|
|
}); |
|
|
|
videoContext.stop() |
|
|
|
videoContext.stop(); |
|
|
|
videoContext.seek(0); |
|
|
|
} |
|
|
|
} |
|
|
@ -312,9 +312,9 @@ export default { |
|
|
|
pauseAudio(){ |
|
|
|
this.isPauseAudio = !this.isPauseAudio; |
|
|
|
if(this.isPauseAudio){ |
|
|
|
innerAudioContext.pause() |
|
|
|
innerAudioContext.pause(); |
|
|
|
}else{ |
|
|
|
this.playVoice(this.audioSrc) |
|
|
|
this.playVoice(this.audioSrc); |
|
|
|
} |
|
|
|
}, |
|
|
|
// 音频 |
|
|
|