Commit 06996326 authored by Li Mingzhe's avatar Li Mingzhe

fix: 不播题干

parent 06aa2cf8
...@@ -2062,19 +2062,25 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -2062,19 +2062,25 @@ export class PlayComponent implements OnInit, OnDestroy {
const curData = this.picArr[index]; const curData = this.picArr[index];
const audio = this.audioObj[curData.audio_url]; const audio = this.audioObj[curData.audio_url];
if (audio) { if (audio && !audio.hasEndedEvent) {
audio.onended = () => { audio.onended = () => {
setTimeout(() => { setTimeout(() => {
this.showPicSound(); this.showPicSound();
}, this.delayPicSoundShowTime); }, this.delayPicSoundShowTime);
}; };
audio.play(); audio.hasEndedEvent = true;
} else {
this.showPicSound();
} }
audio.play();
// else {
// this.showPicSound();
// }
this.answerIdIndex ++; this.answerIdIndex ++;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment