Fix(云灵AI):[#5394]在云灵ai历史记录对话窗口,点击【语音播放】,播放中时点击重新生成,语音播放还在继续
This commit is contained in:
@@ -100,10 +100,7 @@ export const chatMixins = {
|
|||||||
}.bind(this)).exec()
|
}.bind(this)).exec()
|
||||||
},
|
},
|
||||||
onUnload() {
|
onUnload() {
|
||||||
if (this.audioContext) {
|
this.audioStopHandle()
|
||||||
this.audioContext.stop()
|
|
||||||
}
|
|
||||||
wx.getBackgroundAudioManager().stop()
|
|
||||||
this.closeWsFn()
|
this.closeWsFn()
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@@ -447,9 +444,15 @@ export const chatMixins = {
|
|||||||
this.audioAyy = []
|
this.audioAyy = []
|
||||||
if (this.audioContext) {
|
if (this.audioContext) {
|
||||||
this.audioContext.stop()
|
this.audioContext.stop()
|
||||||
|
this.audioContext.destroy() // 强制销毁释放资源
|
||||||
|
this.audioContext = null
|
||||||
}
|
}
|
||||||
this.isPlayAudio = false
|
this.isPlayAudio = false
|
||||||
wx.getBackgroundAudioManager().stop()
|
|
||||||
|
// 强制关闭微信小程序背景音频
|
||||||
|
if (typeof wx !== 'undefined' && wx.getBackgroundAudioManager) {
|
||||||
|
wx.getBackgroundAudioManager().stop()
|
||||||
|
}
|
||||||
},
|
},
|
||||||
ttsHandle(item) {
|
ttsHandle(item) {
|
||||||
this.audioAyy = []
|
this.audioAyy = []
|
||||||
|
|||||||
@@ -81,10 +81,7 @@ export const chatMixinsV2 = {
|
|||||||
}.bind(this)).exec()
|
}.bind(this)).exec()
|
||||||
},
|
},
|
||||||
onUnload() {
|
onUnload() {
|
||||||
if (this.audioContext) {
|
this.audioStopHandle()
|
||||||
this.audioContext.stop()
|
|
||||||
}
|
|
||||||
wx.getBackgroundAudioManager().stop()
|
|
||||||
this.closeWsFn()
|
this.closeWsFn()
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@@ -670,9 +667,15 @@ export const chatMixinsV2 = {
|
|||||||
this.audioAyy = []
|
this.audioAyy = []
|
||||||
if (this.audioContext) {
|
if (this.audioContext) {
|
||||||
this.audioContext.stop()
|
this.audioContext.stop()
|
||||||
|
this.audioContext.destroy() // 强制销毁释放资源
|
||||||
|
this.audioContext = null
|
||||||
}
|
}
|
||||||
this.isPlayAudio = false
|
this.isPlayAudio = false
|
||||||
wx.getBackgroundAudioManager().stop()
|
|
||||||
|
// 强制关闭微信小程序背景音频
|
||||||
|
if (typeof wx !== 'undefined' && wx.getBackgroundAudioManager) {
|
||||||
|
wx.getBackgroundAudioManager().stop()
|
||||||
|
}
|
||||||
},
|
},
|
||||||
ttsHandle(item) {
|
ttsHandle(item) {
|
||||||
this.audioAyy = []
|
this.audioAyy = []
|
||||||
|
|||||||
Reference in New Issue
Block a user