Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
et_21
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
et_21
Commits
8cc8e1fe
Commit
8cc8e1fe
authored
Mar 05, 2021
by
liujiaxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: bind event & ended delay
parent
7b5a6164
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
10 deletions
+13
-10
lrc-editor.component.ts
form/src/app/common/lrc-editor/lrc-editor.component.ts
+9
-8
karaoke.js
play/assets/et_21/components/karaoke/scripts/karaoke.js
+4
-2
No files found.
form/src/app/common/lrc-editor/lrc-editor.component.ts
View file @
8cc8e1fe
...
@@ -109,7 +109,7 @@ export class LrcEditorComponent implements OnInit, OnChanges, OnDestroy, AfterVi
...
@@ -109,7 +109,7 @@ export class LrcEditorComponent implements OnInit, OnChanges, OnDestroy, AfterVi
}
}
ngOnInit
()
{
ngOnInit
()
{
window
[
'
lrc
'
]
=
this
;
window
[
'
lrc
'
]
=
this
;
//
console.log('this.LRCData 1', this.LRCData);
console
.
log
(
'
this.LRCData 1
'
,
this
.
LRCData
);
if
(
!
this
.
LRCData
)
{
if
(
!
this
.
LRCData
)
{
this
.
LRCData
=
{};
this
.
LRCData
=
{};
}
}
...
@@ -229,13 +229,14 @@ export class LrcEditorComponent implements OnInit, OnChanges, OnDestroy, AfterVi
...
@@ -229,13 +229,14 @@ export class LrcEditorComponent implements OnInit, OnChanges, OnDestroy, AfterVi
// console.log('ngOnChanges', JSON.stringify(value)); // this.ngOnInit();
// console.log('ngOnChanges', JSON.stringify(value)); // this.ngOnInit();
}
}
ngOnDestroy
():
void
{
ngOnDestroy
():
void
{
// this.audioPlayBarPositionSub.unsubscribe();
console
.
log
(
'
destory
'
)
// this. audioDataLoadedSub.unsubscribe();
this
.
audioPlayBarPositionSub
&&
this
.
audioPlayBarPositionSub
.
unsubscribe
();
// this. audioPlayTimestampSub.unsubscribe();
this
.
audioDataLoadedSub
&&
this
.
audioDataLoadedSub
.
unsubscribe
();
// this. audioPlayEndSub.unsubscribe();
this
.
audioPlayTimestampSub
&&
this
.
audioPlayTimestampSub
.
unsubscribe
();
// this. dragMoveBarSub.unsubscribe();
this
.
audioPlayEndSub
&&
this
.
audioPlayEndSub
.
unsubscribe
();
// this. arrowKeyUpSub.unsubscribe();
this
.
dragMoveBarSub
&&
this
.
dragMoveBarSub
.
unsubscribe
();
// this. loadAudioSub.unsubscribe();
this
.
arrowKeyUpSub
&&
this
.
arrowKeyUpSub
.
unsubscribe
();
this
.
loadAudioSub
&&
this
.
loadAudioSub
.
unsubscribe
();
}
}
ngAfterViewInit
()
{
ngAfterViewInit
()
{
...
...
play/assets/et_21/components/karaoke/scripts/karaoke.js
View file @
8cc8e1fe
...
@@ -114,8 +114,10 @@ cc.Class({
...
@@ -114,8 +114,10 @@ cc.Class({
this
.
_audioSource
=
new
cc
.
AudioSource
();
this
.
_audioSource
=
new
cc
.
AudioSource
();
this
.
_audioSource
.
clip
=
this
.
_audioClip
;
this
.
_audioSource
.
clip
=
this
.
_audioClip
;
this
.
_audioSource
.
audio
.
on
(
'
ended
'
,
()
=>
{
this
.
_audioSource
.
audio
.
on
(
'
ended
'
,
()
=>
{
setTimeout
(()
=>
{
console
.
log
(
'
_audioClip ended
'
);
console
.
log
(
'
_audioClip ended
'
);
this
.
_audioSource
.
setCurrentTime
(
0
)
this
.
_audioSource
.
setCurrentTime
(
0
)
},
1000
);
});
});
this
.
_audioSource
.
audio
.
on
(
'
stop
'
,
()
=>
{
this
.
_audioSource
.
audio
.
on
(
'
stop
'
,
()
=>
{
console
.
log
(
'
_audioClip stop
'
);
console
.
log
(
'
_audioClip stop
'
);
...
...
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