Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
NJ_usercenter
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
NJ_usercenter
Commits
3ed0d56e
Commit
3ed0d56e
authored
Jun 21, 2022
by
liujiangnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 视频相关问题
parent
e6e8ae29
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
281 additions
and
82 deletions
+281
-82
NJ_usercenter.fire
assets/NJ_usercenter/scene/NJ_usercenter.fire
+268
-72
NJ_usercenter.ts
assets/NJ_usercenter/scene/NJ_usercenter.ts
+1
-1
videoHandler.ts
assets/NJ_usercenter/script/videoHandler.ts
+8
-5
video_process.png.meta
...NJ_usercenter/textures/learndetail/video_process.png.meta
+2
-2
video_process_bg.png.meta
...usercenter/textures/learndetail/video_process_bg.png.meta
+2
-2
No files found.
assets/NJ_usercenter/scene/NJ_usercenter.fire
View file @
3ed0d56e
This diff is collapsed.
Click to expand it.
assets/NJ_usercenter/scene/NJ_usercenter.ts
View file @
3ed0d56e
...
...
@@ -41,7 +41,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
initData
()
{
const
middleLayer
=
cc
.
find
(
'
middleLayer
'
);
if
(
!
middleLayer
)
{
cc
.
sys
.
localStorage
.
setItem
(
'
token
'
,
'
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6NCwicGhvbmUiOiIxNTUwMDAwMDAwMSIsInNpZ24iOiI
2NjAyMDk3ZS1iNjdmLTQ2ZjEtOTEyNC1lZmM4N2QzMmNmMjIiLCJpYXQiOjE2NTU4MDE1NzEsImV4cCI6MTY1ODM5MzU3MX0.JSdRYQKkzxQHAUqwvh4T9Rd8fe511wO92Dlk-R97EQg
'
);
cc
.
sys
.
localStorage
.
setItem
(
'
token
'
,
'
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6NCwicGhvbmUiOiIxNTUwMDAwMDAwMSIsInNpZ24iOiI
yNWRmYjI4NS1mODIxLTRlMmQtOWI5NS1kM2I3ZDU5YmRjZDUiLCJpYXQiOjE2NTU4MDQ3MTAsImV4cCI6MTY1ODM5NjcxMH0.V2LzxdxnyWKF1rnbXAK8zyslurzOUq0bE_DEdWD5Cv0
'
);
}
this
.
token
=
cc
.
sys
.
localStorage
.
getItem
(
"
token
"
);
}
...
...
assets/NJ_usercenter/script/videoHandler.ts
View file @
3ed0d56e
...
...
@@ -79,7 +79,7 @@ export default class NewClass extends MyCocosSceneComponent {
closeVideo
()
{
this
.
videoplayer
.
stop
();
if
(
this
.
playAudioId
)
{
if
(
this
.
playAudioId
!=
null
)
{
cc
.
audioEngine
.
stop
(
this
.
playAudioId
);
}
this
.
dot
.
x
=
this
.
dotX
;
...
...
@@ -97,15 +97,16 @@ export default class NewClass extends MyCocosSceneComponent {
buttonOnClick
(
this
.
playBtn
,
()
=>
{
this
.
videoplayer
.
play
();
if
(
this
.
playAudioId
)
{
if
(
this
.
playAudioId
!=
null
)
{
cc
.
audioEngine
.
resume
(
this
.
playAudioId
);
}
});
this
.
videoplayer
.
node
.
on
(
'
clicked
'
,
()
=>
{
const
mask
=
cc
.
find
(
`Canvas/videoContainer/mask`
);
mask
.
on
(
'
click
'
,
()
=>
{
if
(
this
.
videoplayer
.
isPlaying
())
{
this
.
videoplayer
.
pause
();
if
(
this
.
playAudioId
)
{
if
(
this
.
playAudioId
!=
null
)
{
cc
.
audioEngine
.
pause
(
this
.
playAudioId
);
}
this
.
playBtn
.
active
=
true
;
...
...
@@ -140,7 +141,9 @@ export default class NewClass extends MyCocosSceneComponent {
console
.
error
(
err
);
return
;
}
if
(
this
.
videoplayer
.
isPlaying
())
{
this
.
playAudioId
=
cc
.
audioEngine
.
play
(
audioClip
,
false
,
1
);
}
});
}
...
...
assets/NJ_usercenter/textures/learndetail/video_process.png.meta
View file @
3ed0d56e
...
...
@@ -28,8 +28,8 @@
"rawHeight": 10,
"borderTop": 0,
"borderBottom": 0,
"borderLeft":
0
,
"borderRight":
0
,
"borderLeft":
5
,
"borderRight":
5
,
"subMetas": {}
}
}
...
...
assets/NJ_usercenter/textures/learndetail/video_process_bg.png.meta
View file @
3ed0d56e
...
...
@@ -28,8 +28,8 @@
"rawHeight": 10,
"borderTop": 0,
"borderBottom": 0,
"borderLeft":
0
,
"borderRight":
0
,
"borderLeft":
5
,
"borderRight":
5
,
"subMetas": {}
}
}
...
...
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