Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MRBR_video
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
MRBR_video
Commits
17b939d7
Commit
17b939d7
authored
Nov 14, 2022
by
李维
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改进度条显示隐藏问题
parent
c791db39
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
14 deletions
+31
-14
MRBR_video.js
assets/MRBR_video/scene/MRBR_video.js
+31
-14
No files found.
assets/MRBR_video/scene/MRBR_video.js
View file @
17b939d7
...
...
@@ -1520,8 +1520,11 @@ cc.Class({
const
touchStart
=
(
e
)
=>
{
this
.
canvasTouchStart
(
e
);
console
.
log
(
"
touch start
"
);
// console.log("touch start");
if
(
e
.
target
.
name
!=
"
dragButton
"
)
{
this
.
showProgressBar
(
true
);
}
if
(
canvas
.
hasEventListener
(
cc
.
Node
.
EventType
.
MOUSE_DOWN
))
{
canvas
.
off
(
cc
.
Node
.
EventType
.
MOUSE_DOWN
,
mouseDown
);
}
...
...
@@ -1532,8 +1535,10 @@ cc.Class({
return
;
}
this
.
canvasTouchStart
(
e
);
console
.
log
(
"
mouse down
"
);
// console.log("mouse down");
if
(
e
.
target
.
name
!=
"
dragButton
"
)
{
this
.
showProgressBar
(
true
);
}
if
(
canvas
.
hasEventListener
(
cc
.
Node
.
EventType
.
TOUCH_MOVE
))
{
canvas
.
off
(
cc
.
Node
.
EventType
.
TOUCH_MOVE
,
touchMove
);
...
...
@@ -1606,11 +1611,13 @@ cc.Class({
this
.
isDragProgressBar
=
true
;
this
.
video
.
pause
();
this
.
videoControlBar
.
emit
(
"
update_video_status
"
,
0
);
this
.
cleanProgressBarTimer
();
}
else
{
this
.
restQuesData
(
this
.
video
.
currentTime
);
this
.
isDragProgressBar
=
false
;
this
.
video
.
play
();
this
.
videoControlBar
.
emit
(
"
update_video_status
"
,
1
);
this
.
setProgressBarTimer
();
}
})
...
...
@@ -1621,6 +1628,8 @@ cc.Class({
// 监听组件发来视频播放、暂停事件
this
.
videoControlBar
.
on
(
"
video_btn_click
"
,
(
isPlay
)
=>
{
this
.
cleanProgressBarTimer
();
this
.
setProgressBarTimer
();
if
(
isPlay
)
{
if
(
this
.
isWaitingUserAction
)
{
this
.
hideWaitingVideo
();
...
...
@@ -1639,9 +1648,7 @@ cc.Class({
// 隐藏进度条定时器
timeoutHideBarId
:
null
,
showProgressBar
(
withAnimation
=
false
)
{
if
(
this
.
timeoutHideBarId
)
{
clearTimeout
(
this
.
timeoutHideBarId
);
}
this
.
cleanProgressBarTimer
()
if
(
this
.
isShowProgressBar
)
{
// 如果当前显示进度条
...
...
@@ -1651,12 +1658,21 @@ cc.Class({
// 如果当前显示进度条
this
.
videoControlBar
.
emit
(
"
show_bar
"
,
withAnimation
);
this
.
isShowProgressBar
=
true
;
this
.
setProgressBarTimer
();
}
},
cleanProgressBarTimer
()
{
if
(
this
.
timeoutHideBarId
)
{
clearTimeout
(
this
.
timeoutHideBarId
);
}
},
setProgressBarTimer
()
{
this
.
timeoutHideBarId
=
setTimeout
(()
=>
{
this
.
videoControlBar
.
emit
(
"
hide_bar
"
,
true
);
this
.
isShowProgressBar
=
false
;
},
2000
)
}
},
canvasTouchStart
(
e
)
{
...
...
@@ -1761,6 +1777,7 @@ cc.Class({
hotZoneBg
:
null
,
initHotZoneBg
()
{
for
(
let
i
=
0
;
i
<
this
.
data
.
quesArr
.
length
;
i
++
)
{
this
.
data
.
quesArr
[
i
].
index
=
i
;
const
data
=
this
.
data
.
quesArr
[
i
];
const
hotZoneBg
=
new
cc
.
Node
();
...
...
@@ -2794,10 +2811,10 @@ cc.Class({
// this.startWrongVideo();
// }
const
id
=
data
.
i
ndex
;
const
id
=
this
.
quesI
ndex
;
bg
.
active
=
false
;
this
.
hand
.
active
=
false
;
console
.
log
(
"
跳转
"
,
data
.
index
)
console
.
log
(
"
跳转
"
,
id
)
this
.
showMask
(()
=>
{
if
(
!
this
.
isLocal
)
{
console
.
log
(
"
[MRBR_VIDEO] 调用系统方法:PSQS_jump_to_question
"
)
...
...
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