Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
ns_video_map
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
ns_video_map
Commits
502f448c
Commit
502f448c
authored
May 02, 2022
by
limingzhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 加载结束后 hide loading
parent
f80f4ef9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
34 deletions
+24
-34
ns_video_map.ts
assets/ns_video_map/scene/ns_video_map.ts
+23
-33
MyCocosSceneComponent.ts
assets/ns_video_map/script/MyCocosSceneComponent.ts
+1
-1
No files found.
assets/ns_video_map/scene/ns_video_map.ts
View file @
502f448c
...
@@ -187,29 +187,24 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -187,29 +187,24 @@ export default class SceneComponent extends MyCocosSceneComponent {
// }
// }
video
.
play
();
video
.
play
();
this
.
refreshBtnState
();
this
.
refreshBtnState
();
window
[
"
air
"
].
hideAirClassLoading
();
//
checkIsPlaying();
checkIsPlaying
();
})
})
const
checkIsPlaying
=
()
=>
{
const
checkIsPlaying
=
async
()
=>
{
delayCall
(
0.001
,
()
=>
{
console
.
log
(
'
bbbb 2
'
);
console
.
log
(
'
in checkIsPlaying 1
'
)
await
asyncDelay
(
0.1
);
if
(
video
.
currentTime
)
{
console
.
log
(
'
in aaaa
'
);
// if (this.isDestroy) {
// video.pause();
// return;
}
else
{
// }
checkIsPlaying
();
}
if
(
video
.
currentTime
)
{
video
.
pause
();
// this.isVideoPlayerReady = true;
// this.checkCanShowRecordList();
}
else
{
checkIsPlaying
();
}
})
}
}
}
}
...
@@ -264,28 +259,23 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -264,28 +259,23 @@ export default class SceneComponent extends MyCocosSceneComponent {
// }
// }
video
.
play
();
video
.
play
();
this
.
refreshBtnState
();
this
.
refreshBtnState
();
// checkIsPlaying();
window
[
"
air
"
].
hideAirClassLoading
();
})
const
checkIsPlaying
=
()
=>
{
checkIsPlaying
();
})
delayCall
(
0.001
,
()
=>
{
const
checkIsPlaying
=
async
()
=>
{
console
.
log
(
'
in checkIsPlaying 1
'
)
console
.
log
(
'
bbbb
'
);
// if (this.isDestroy) {
await
asyncDelay
(
0.1
);
// return;
if
(
video
.
currentTime
)
{
// }
console
.
log
(
'
in aaaa
'
);
// video.pause();
}
else
{
checkIsPlaying
();
}
if
(
video
.
currentTime
)
{
video
.
pause
();
// this.isVideoPlayerReady = true;
// this.checkCanShowRecordList();
}
else
{
checkIsPlaying
();
}
})
}
}
}
}
...
...
assets/ns_video_map/script/MyCocosSceneComponent.ts
View file @
502f448c
...
@@ -96,7 +96,7 @@ export class MyCocosSceneComponent extends cc.Component {
...
@@ -96,7 +96,7 @@ export class MyCocosSceneComponent extends cc.Component {
// next();
// next();
// };
// };
this
.
onLoadEnd
();
this
.
onLoadEnd
();
window
[
"
air
"
].
hideAirClassLoading
();
//
window["air"].hideAirClassLoading();
}
else
{
}
else
{
this
.
onLoadEnd
();
this
.
onLoadEnd
();
}
}
...
...
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