Commit cf96a462 authored by Chen Jiping's avatar Chen Jiping

fix:修复音频播放问题

parent 95625166
...@@ -598,6 +598,7 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -598,6 +598,7 @@ export class PlayComponent implements OnInit, OnDestroy {
} }
} }
for (let i = 0; i < this.data.zoneArr.length; ++i) { for (let i = 0; i < this.data.zoneArr.length; ++i) {
let zone = this.data.zoneArr[i]; let zone = this.data.zoneArr[i];
...@@ -607,9 +608,8 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -607,9 +608,8 @@ export class PlayComponent implements OnInit, OnDestroy {
let exercises = zone.exercisesArr[i]; let exercises = zone.exercisesArr[i];
if (exercises.answer && exercises.answer.audioUrl) { if (exercises.answer && exercises.answer.audioUrl) {
this.addUrlToAudioObj('exercises_' + i, exercises.answer.audioUrl); this.addUrlToAudioObj(exercises.answer.audioUrl);
} }
} }
} }
...@@ -969,7 +969,7 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -969,7 +969,7 @@ export class PlayComponent implements OnInit, OnDestroy {
clickExercises(exercises: Exercises, index: number) { clickExercises(exercises: Exercises, index: number) {
const play = () => { const play = () => {
let key = 'exercises_' + index; let key = exercises.data.answer.audioUrl;
const audio = this.audioObj[key]; const audio = this.audioObj[key];
......
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