Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
LST-05
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
LST-05
Commits
0f9bc270
Commit
0f9bc270
authored
Nov 22, 2020
by
Chen Jiping
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:调整题干音频播放问题;调整正确和答案音频重叠问题
parent
0d999088
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
AudioAnimation.ts
src/app/play/AudioAnimation.ts
+5
-1
play.component.ts
src/app/play/play.component.ts
+4
-2
No files found.
src/app/play/AudioAnimation.ts
View file @
0f9bc270
...
@@ -203,7 +203,7 @@ export class AudioAnimation {
...
@@ -203,7 +203,7 @@ export class AudioAnimation {
* @param audio 播放音频
* @param audio 播放音频
* @param callback
* @param callback
*/
*/
playAudio
(
audio
,
callback
=
null
)
{
playAudio
(
audio
,
reset
=
true
,
callback
=
null
)
{
//console.log(audio);
//console.log(audio);
if
(
!
audio
)
{
if
(
!
audio
)
{
return
;
return
;
...
@@ -211,6 +211,10 @@ export class AudioAnimation {
...
@@ -211,6 +211,10 @@ export class AudioAnimation {
this
.
curAudio
=
audio
;
this
.
curAudio
=
audio
;
if
(
reset
)
{
this
.
curAudio
.
currentTime
=
0
;
}
audio
.
onended
=
()
=>
{
audio
.
onended
=
()
=>
{
this
.
playing
=
false
;
this
.
playing
=
false
;
...
...
src/app/play/play.component.ts
View file @
0f9bc270
...
@@ -1048,11 +1048,13 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -1048,11 +1048,13 @@ export class PlayComponent implements OnInit, OnDestroy {
if
(
card
.
curAnswer
.
isRight
==
'
1
'
)
{
if
(
card
.
curAnswer
.
isRight
==
'
1
'
)
{
this
.
playAudio
(
'
right
'
,
true
);
this
.
playAudio
(
'
right
'
,
true
,
()
=>
{
this
.
playAudio
(
card
.
curAnswer
.
audioUrl
,
true
);
});
card
.
curAnswer
.
endFlag
=
true
;
card
.
curAnswer
.
endFlag
=
true
;
this
.
playAudio
(
card
.
curAnswer
.
audioUrl
,
true
);
}
else
{
}
else
{
this
.
playAudio
(
'
wrong
'
,
true
);
this
.
playAudio
(
'
wrong
'
,
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