BUG: 如果是文本会话消息没有audioPath时跳过自动播放
This commit is contained in:
parent
4323ed274e
commit
80687fd3f0
@ -146,8 +146,13 @@ export default {
|
|||||||
playAllAudio() {
|
playAllAudio() {
|
||||||
this.$nextTick(function() {
|
this.$nextTick(function() {
|
||||||
this.currentMessage = this.currentAudioList.shift();
|
this.currentMessage = this.currentAudioList.shift();
|
||||||
|
console.log(this.currentMessage, '************');
|
||||||
|
if (this.currentMessage.type === 'Text') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
document.querySelector('#audioPlay').src = this.currentMessage.audioPath;
|
document.querySelector('#audioPlay').src = this.currentMessage.audioPath;
|
||||||
document.querySelector('#audioPlay').play();
|
document.querySelector('#audioPlay').play();
|
||||||
|
console.log(document.querySelector('#audioPlay'), '--------------');
|
||||||
this.$set(this.currentMessage, 'activeAuto', true);
|
this.$set(this.currentMessage, 'activeAuto', true);
|
||||||
this.play = true;
|
this.play = true;
|
||||||
document.querySelector('#audioPlay').onended = () => {
|
document.querySelector('#audioPlay').onended = () => {
|
||||||
|
Loading…
Reference in New Issue
Block a user