Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
YM4-13
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
YM4-13
Commits
bc8e89a6
Commit
bc8e89a6
authored
Nov 10, 2020
by
李维
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add slience audio
parent
f9105bc9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
1 deletion
+15
-1
play.component.ts
src/app/play/play.component.ts
+13
-0
resources.js
src/app/play/resources.js
+2
-1
sm-slience.mp3
src/assets/default/audio/sm-slience.mp3
+0
-0
No files found.
src/app/play/play.component.ts
View file @
bc8e89a6
...
@@ -88,6 +88,7 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -88,6 +88,7 @@ export class PlayComponent implements OnInit, OnDestroy {
g_partTitle_x
=
null
;
g_partTitle_x
=
null
;
g_mainTitle_x
=
null
;
g_mainTitle_x
=
null
;
g_dragDelay
=
300
//放置拖拽事件触发播放音效
g_dragDelay
=
300
//放置拖拽事件触发播放音效
g_playSlienceAudio
=
false
;
// ------------------------------------
// ------------------------------------
// ------------ 私有数据 ------------
// ------------ 私有数据 ------------
...
@@ -535,6 +536,7 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -535,6 +536,7 @@ export class PlayComponent implements OnInit, OnDestroy {
element
.
timeoutID
=
null
element
.
timeoutID
=
null
this
.
subscribeMapDragEvent
(
element
.
id
,
()
=>
{
this
.
subscribeMapDragEvent
(
element
.
id
,
()
=>
{
this
.
triggerSlienceAudio
()
element
.
timeoutID
=
setTimeout
(()
=>
{
element
.
timeoutID
=
setTimeout
(()
=>
{
if
(
item
.
media
.
audio_url
)
{
if
(
item
.
media
.
audio_url
)
{
this
.
g_cartoon
.
stopAllAudio
()
this
.
g_cartoon
.
stopAllAudio
()
...
@@ -592,6 +594,8 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -592,6 +594,8 @@ export class PlayComponent implements OnInit, OnDestroy {
element
.
timeoutID
=
null
element
.
timeoutID
=
null
this
.
subscribeMapDragEvent
(
element
.
id
,
()
=>
{
this
.
subscribeMapDragEvent
(
element
.
id
,
()
=>
{
text
.
ref
.
alpha
=
0.5
;
text
.
ref
.
alpha
=
0.5
;
this
.
triggerSlienceAudio
()
this
.
triggerSlienceAudio
()
element
.
timeoutID
=
setTimeout
(()
=>
{
element
.
timeoutID
=
setTimeout
(()
=>
{
this
.
g_cartoon
.
stopAllAudio
()
this
.
g_cartoon
.
stopAllAudio
()
this
.
g_cartoon
.
playAudio
(
this
.
g_formData
.
wordLeft_audio_url
)
this
.
g_cartoon
.
playAudio
(
this
.
g_formData
.
wordLeft_audio_url
)
...
@@ -650,6 +654,7 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -650,6 +654,7 @@ export class PlayComponent implements OnInit, OnDestroy {
element
.
timeoutID
=
null
element
.
timeoutID
=
null
this
.
subscribeMapDragEvent
(
element
.
id
,
()
=>
{
this
.
subscribeMapDragEvent
(
element
.
id
,
()
=>
{
text
.
ref
.
alpha
=
0.5
;
text
.
ref
.
alpha
=
0.5
;
this
.
triggerSlienceAudio
()
element
.
timeoutID
=
setTimeout
(()
=>
{
element
.
timeoutID
=
setTimeout
(()
=>
{
this
.
g_cartoon
.
stopAllAudio
()
this
.
g_cartoon
.
stopAllAudio
()
this
.
g_cartoon
.
playAudio
(
this
.
g_formData
.
wordMiddle_audio_url
)
this
.
g_cartoon
.
playAudio
(
this
.
g_formData
.
wordMiddle_audio_url
)
...
@@ -707,6 +712,7 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -707,6 +712,7 @@ export class PlayComponent implements OnInit, OnDestroy {
element
.
timeoutID
=
null
element
.
timeoutID
=
null
this
.
subscribeMapDragEvent
(
element
.
id
,
()
=>
{
this
.
subscribeMapDragEvent
(
element
.
id
,
()
=>
{
text
.
ref
.
alpha
=
0.5
;
text
.
ref
.
alpha
=
0.5
;
this
.
triggerSlienceAudio
()
element
.
timeoutID
=
setTimeout
(()
=>
{
element
.
timeoutID
=
setTimeout
(()
=>
{
this
.
g_cartoon
.
stopAllAudio
()
this
.
g_cartoon
.
stopAllAudio
()
this
.
g_cartoon
.
playAudio
(
this
.
g_formData
.
wordRight_audio_url
)
this
.
g_cartoon
.
playAudio
(
this
.
g_formData
.
wordRight_audio_url
)
...
@@ -1125,6 +1131,13 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -1125,6 +1131,13 @@ export class PlayComponent implements OnInit, OnDestroy {
}
}
}
}
triggerSlienceAudio
()
{
if
(
!
this
.
g_playSlienceAudio
)
{
this
.
g_cartoon
.
playAudio
(
"
sm-slience
"
,
false
,
()
=>
{
this
.
g_playSlienceAudio
=
true
;
})
}
}
...
...
src/app/play/resources.js
View file @
bc8e89a6
...
@@ -78,7 +78,8 @@ const localAudios = {
...
@@ -78,7 +78,8 @@ const localAudios = {
'
sm-choice-timeup-3
'
:
'
assets/default/audio/sm-choice-timeup-3.mp3
'
,
'
sm-choice-timeup-3
'
:
'
assets/default/audio/sm-choice-timeup-3.mp3
'
,
'
sm-go
'
:
'
assets/default/audio/sm-go.mp3
'
,
'
sm-go
'
:
'
assets/default/audio/sm-go.mp3
'
,
'
sm-ready
'
:
'
assets/default/audio/sm-ready.mp3
'
,
'
sm-ready
'
:
'
assets/default/audio/sm-ready.mp3
'
,
'
sm-slience
'
:
'
assets/default/audio/sm-slience.mp3
'
,
'
cuowu
'
:
'
assets/play/sound/cuowu.mp3
'
'
cuowu
'
:
'
assets/play/sound/cuowu.mp3
'
};
};
...
...
src/assets/default/audio/sm-slience.mp3
0 → 100644
View file @
bc8e89a6
File added
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