Commit 52a702ee authored by Li Mingzhe's avatar Li Mingzhe

feat: 音频

parent 7f4b5187
......@@ -2063,11 +2063,18 @@ export class PlayComponent implements OnInit, OnDestroy {
}
const curData = this.picArr[index];
const audio = this.audioObj[curData.audio_url];
let audio = this.audioObj[curData.audio_url];
if (audio) {
console.log('answerIdIndex: ', this.answerIdIndex);
console.log('audio: ', audio)
audio = new Audio();
audio.play();
audio.pause();
audio.src = curData.audio_url;
if (!audio.hasEndedEvent) {
audio.onended = () => {
console.log(' in ended')
......
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