Jelajahi Sumber

fix: 语音矩阵兼容没有发音的

dusenyao 2 tahun lalu
induk
melakukan
437fef16fa
1 mengubah file dengan 3 tambahan dan 3 penghapusan
  1. 3 3
      src/components/Adult/preview/VoiceMatrix.vue

+ 3 - 3
src/components/Adult/preview/VoiceMatrix.vue

@@ -522,7 +522,7 @@ export default {
     Bus.$on("audioPause", (id) => {
       if (this.cid === id) return;
       this.$nextTick(() => {
-        if (this.$refs.luyin.microphoneStatus) this.$refs.luyin.microphone();
+        if (this.$refs.luyin?.microphoneStatus) this.$refs.luyin.microphone();
         this.handleParentPlay();
       });
     });
@@ -639,7 +639,7 @@ export default {
       if (type.length > 0 && index >= 0 && type === "row") {
         this.curQue.voiceMatrix.matrix[index].forEach((item) => {
           let data = this.getLrcData(item);
-          if (data) this.lrcArray.push(data);
+          if (data && "begin_time" in data) this.lrcArray.push(data);
         });
         if (this.lrcArray.length > 0) this.lrcPlay(this.lrcArray[0], 0);
         return;
@@ -648,7 +648,7 @@ export default {
       if (type.length > 0 && index >= 0 && type === "column") {
         this.curQue.voiceMatrix.matrix.forEach((item) => {
           let data = this.getLrcData(item[index]);
-          if (data) this.lrcArray.push(data);
+          if (data && "begin_time" in data) this.lrcArray.push(data);
         });
         if (this.lrcArray.length > 0) this.lrcPlay(this.lrcArray[0], 0);
         return;