Commit 5639b3a2 authored by Tt's avatar Tt

fix(play): 修复音频播放问题并更新默认音频URL

parent d64bc800
...@@ -56,7 +56,7 @@ let defaultFormData: FormData = { ...@@ -56,7 +56,7 @@ let defaultFormData: FormData = {
imgSize: 'big', imgSize: 'big',
"questions": [ "questions": [
{ {
"type": "txt", "audio": "http://staging-teach.cdn.ireadabc.com/736c616e8b66a3ae03c8e8636ca46f0f.mp3", "text": "", "image": "http://staging-teach.cdn.ireadabc.com/bde25b1b2a7fdf976f17ae80b6a20a25.png", "time": null, "duration": "", "audioName": "", "imgSize": "big" "type": "txt", "audio": "https://staging-teach.cdn.ireadabc.com/a050401ba53e74ede17b5c49635a977a.mp3", "text": "", "image": "http://staging-teach.cdn.ireadabc.com/bde25b1b2a7fdf976f17ae80b6a20a25.png", "time": null, "duration": "", "audioName": "", "imgSize": "big"
}, { }, {
"type": "img", "imgSize": "big", "audio": "http://staging-teach.cdn.ireadabc.com/89060c9eddd5f0f67908cce77ee74f94.mp3", "image": "http://staging-teach.cdn.ireadabc.com/761e1b17e16fa4674db9ad5344676bb9.png", "time": null, "audioName": "" "type": "img", "imgSize": "big", "audio": "http://staging-teach.cdn.ireadabc.com/89060c9eddd5f0f67908cce77ee74f94.mp3", "image": "http://staging-teach.cdn.ireadabc.com/761e1b17e16fa4674db9ad5344676bb9.png", "time": null, "audioName": ""
}, { }, {
...@@ -1014,10 +1014,12 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -1014,10 +1014,12 @@ export class PlayComponent implements OnInit, OnDestroy {
if (currentQuestion.correctQuestion && currentQuestion.correctQuestion.audio) { if (currentQuestion.correctQuestion && currentQuestion.correctQuestion.audio) {
if ((this.g_formData.doubleModal || this.currentStageIndex !== 0)) { if ((this.g_formData.doubleModal || this.currentStageIndex !== 0)) {
setTimeout(() => { setTimeout(() => {
this.g_cartoon.playAudio(currentQuestion.correctQuestion.audio); this.g_cartoon.stopAllAudio();
this.g_cartoon.playAudio(currentQuestion.correctQuestion.audio, true);
}, 500); }, 500);
} else { } else {
this.g_cartoon.playAudio(currentQuestion.correctQuestion.audio); this.g_cartoon.stopAllAudio();
this.g_cartoon.playAudio(currentQuestion.correctQuestion.audio, true);
} }
} }
} }
...@@ -1059,7 +1061,8 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -1059,7 +1061,8 @@ export class PlayComponent implements OnInit, OnDestroy {
const currentStage = this.gameStages[this.currentStageIndex]; const currentStage = this.gameStages[this.currentStageIndex];
if (currentStage && currentStage.correctQuestion && currentStage.correctQuestion.audio) { if (currentStage && currentStage.correctQuestion && currentStage.correctQuestion.audio) {
// 播放当前正确问题的音频 // 播放当前正确问题的音频
this.g_cartoon.playAudio(currentStage.correctQuestion.audio); this.g_cartoon.stopAllAudio();
this.g_cartoon.playAudio(currentStage.correctQuestion.audio, true);
} }
// 注销该鱼的点击事件 // 注销该鱼的点击事件
this.unsubscribeFishEvent(fish.fishId); this.unsubscribeFishEvent(fish.fishId);
...@@ -1931,7 +1934,8 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -1931,7 +1934,8 @@ export class PlayComponent implements OnInit, OnDestroy {
console.log("btn_fa_yin", currentStage) console.log("btn_fa_yin", currentStage)
if (currentStage && currentStage.correctQuestion && currentStage.correctQuestion.audio) { if (currentStage && currentStage.correctQuestion && currentStage.correctQuestion.audio) {
// 播放当前正确问题的音频 // 播放当前正确问题的音频
this.g_cartoon.playAudio(currentStage.correctQuestion.audio); this.g_cartoon.stopAllAudio();
this.g_cartoon.playAudio(currentStage.correctQuestion.audio, true);
} }
}) })
} }
......
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