Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
SSIWB2504
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
template admin
SSIWB2504
Commits
5639b3a2
Commit
5639b3a2
authored
Aug 23, 2025
by
Tt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(play): 修复音频播放问题并更新默认音频URL
parent
d64bc800
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
11 deletions
+15
-11
play.component.ts
src/app/play/play.component.ts
+15
-11
No files found.
src/app/play/play.component.ts
View file @
5639b3a2
...
...
@@ -56,7 +56,7 @@ let defaultFormData: FormData = {
imgSize
:
'
big
'
,
"
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
"
:
"
http
s://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
"
:
""
},
{
...
...
@@ -1014,10 +1014,12 @@ export class PlayComponent implements OnInit, OnDestroy {
if
(
currentQuestion
.
correctQuestion
&&
currentQuestion
.
correctQuestion
.
audio
)
{
if
((
this
.
g_formData
.
doubleModal
||
this
.
currentStageIndex
!==
0
))
{
setTimeout
(()
=>
{
this
.
g_cartoon
.
playAudio
(
currentQuestion
.
correctQuestion
.
audio
);
this
.
g_cartoon
.
stopAllAudio
();
this
.
g_cartoon
.
playAudio
(
currentQuestion
.
correctQuestion
.
audio
,
true
);
},
500
);
}
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 {
const
currentStage
=
this
.
gameStages
[
this
.
currentStageIndex
];
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
);
...
...
@@ -1931,7 +1934,8 @@ export class PlayComponent implements OnInit, OnDestroy {
console
.
log
(
"
btn_fa_yin
"
,
currentStage
)
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
);
}
})
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment