Commit 5a8e0df1 authored by Li Mingzhe's avatar Li Mingzhe

feat: 去掉点击按钮音效

parent 06996326
......@@ -1786,13 +1786,13 @@ export class PlayComponent implements OnInit, OnDestroy {
if (this.soundPlay.visible) {
if (this.checkClickTarget(this.soundPlay)) {
this.playAudio(this.clickAudio);
// this.playAudio(this.clickAudio);
this.clickSoundPlay();
return;
}
} else {
if (this.checkClickTarget(this.soundReplay)) {
this.playAudio(this.clickAudio);
// this.playAudio(this.clickAudio);
this.clickSoundReplay();
return;
}
......@@ -2059,31 +2059,26 @@ export class PlayComponent implements OnInit, OnDestroy {
return;
}
const curData = this.picArr[index];
const audio = this.audioObj[curData.audio_url];
if (audio && !audio.hasEndedEvent) {
audio.onended = () => {
setTimeout(() => {
this.showPicSound();
}, this.delayPicSoundShowTime);
};
audio.hasEndedEvent = true;
}
if (audio) {
if (!audio.hasEndedEvent) {
audio.onended = () => {
setTimeout(() => {
this.showPicSound();
}, this.delayPicSoundShowTime);
};
audio.hasEndedEvent = true;
}
audio.play();
// else {
// this.showPicSound();
// }
audio.play();
} else {
this.showPicSound();
}
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