Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
DG_FAF
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
DG_FAF
Commits
a89d57ab
Commit
a89d57ab
authored
Apr 12, 2023
by
李维
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整视频提示按钮在提交以后再出现
parent
d8fe8927
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
4 deletions
+12
-4
DG_FAF.ts
assets/DG_FAF/scene/DG_FAF.ts
+12
-4
No files found.
assets/DG_FAF/scene/DG_FAF.ts
View file @
a89d57ab
...
@@ -2516,6 +2516,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -2516,6 +2516,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
// 视频播放题型
// 视频播放题型
currentVideoPlay
=
null
;
currentVideoPlay
=
null
;
videoDuration
=
0
;
videoDuration
=
0
;
allTipVideos
=
[];
setOneVideoBtn
(
contentData
,
hotZoneItemData
,
debugMode
=
false
)
{
setOneVideoBtn
(
contentData
,
hotZoneItemData
,
debugMode
=
false
)
{
const
rect
=
this
.
newRectNode
(
hotZoneItemData
,
layer_4
,
debugMode
);
const
rect
=
this
.
newRectNode
(
hotZoneItemData
,
layer_4
,
debugMode
);
const
aniAudio
=
cc
.
instantiate
(
this
.
aniVideoTips
)
const
aniAudio
=
cc
.
instantiate
(
this
.
aniVideoTips
)
...
@@ -2528,13 +2529,12 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -2528,13 +2529,12 @@ export default class SceneComponent extends MyCocosSceneComponent {
aniAudio
.
height
=
rect
.
height
;
aniAudio
.
height
=
rect
.
height
;
rect
.
addChild
(
aniAudio
);
rect
.
addChild
(
aniAudio
);
rect
.
on
(
"
click
"
,
async
()
=>
{
rect
.
on
(
"
click
"
,
async
()
=>
{
if
(
this
.
submitted
)
{
return
;
}
this
.
showVideoLayer
();
this
.
showVideoLayer
();
const
videoplayer
=
cc
.
find
(
"
Canvas/VideoPlayerContainer/videoPlayer
"
).
getComponent
(
cc
.
VideoPlayer
)
const
videoplayer
=
cc
.
find
(
"
Canvas/VideoPlayerContainer/videoPlayer
"
).
getComponent
(
cc
.
VideoPlayer
)
videoplayer
.
stayOnBottom
=
true
;
videoplayer
.
stayOnBottom
=
true
;
videoplayer
.
remoteURL
=
contentData
.
video_url
;
if
(
videoplayer
.
remoteURL
!=
contentData
.
video_url
)
{
videoplayer
.
remoteURL
=
contentData
.
video_url
;
}
this
.
videoDuration
=
await
asyncGetVideoDuration
(
videoplayer
);
this
.
videoDuration
=
await
asyncGetVideoDuration
(
videoplayer
);
// 设置进度条的起始和结束标签
// 设置进度条的起始和结束标签
this
.
videoControlBar
.
emit
(
"
set_duration
"
,
this
.
videoDuration
)
this
.
videoControlBar
.
emit
(
"
set_duration
"
,
this
.
videoDuration
)
...
@@ -2544,6 +2544,8 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -2544,6 +2544,8 @@ export default class SceneComponent extends MyCocosSceneComponent {
videoplayer
.
play
();
videoplayer
.
play
();
this
.
videoControlBar
.
emit
(
"
update_video_status
"
,
1
);
this
.
videoControlBar
.
emit
(
"
update_video_status
"
,
1
);
})
})
rect
.
active
=
false
;
this
.
allTipVideos
.
push
(
rect
);
};
};
// 画图计数,用于同时打开多个画图板控制页面滚动的
// 画图计数,用于同时打开多个画图板控制页面滚动的
...
@@ -3055,6 +3057,11 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -3055,6 +3057,11 @@ export default class SceneComponent extends MyCocosSceneComponent {
if
(
this
.
btnReplay
)
{
if
(
this
.
btnReplay
)
{
this
.
btnReplay
.
active
=
true
;
this
.
btnReplay
.
active
=
true
;
}
}
// 显示所有视频提示
this
.
allTipVideos
.
forEach
(
videoRect
=>
{
videoRect
.
active
=
true
;
})
}
}
// 重新玩
// 重新玩
...
@@ -3075,6 +3082,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -3075,6 +3082,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
this
.
currentVideoPlay
=
null
;
this
.
currentVideoPlay
=
null
;
this
.
videoDuration
=
null
;
this
.
videoDuration
=
null
;
this
.
drawingCount
=
0
;
this
.
drawingCount
=
0
;
this
.
allTipVideos
=
[];
this
.
startTimestamp
=
new
Date
().
getTime
();
this
.
startTimestamp
=
new
Date
().
getTime
();
// 停止当前正在播放的音乐
// 停止当前正在播放的音乐
...
...
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