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
14b30b16
Commit
14b30b16
authored
Nov 15, 2022
by
李维
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复时间进度错误的问题
parent
efda089f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
12 deletions
+1
-12
MRBR_video.js
assets/MRBR_video/scene/MRBR_video.js
+1
-12
No files found.
assets/MRBR_video/scene/MRBR_video.js
View file @
14b30b16
...
...
@@ -1068,11 +1068,9 @@ cc.Class({
console
.
log
(
"
this.curQues:
"
,
this
.
curQues
);
if
(
currentTime
)
{
video
.
currentTime
=
currentTime
;
console
.
log
(
"
Set video current time-1:
"
,
this
.
video
.
currentTime
);
video
.
currentTime
=
Number
(
currentTime
);
}
else
{
video
.
currentTime
=
Number
(
this
.
curQues
.
ques_start
);
console
.
log
(
"
Set video current time-2:
"
,
this
.
video
.
currentTime
);
}
if
(
this
.
playTimes
>
0
)
{
...
...
@@ -1114,7 +1112,6 @@ cc.Class({
const
video
=
this
.
video
;
video
.
node
.
name
=
"
wait_video
"
;
video
.
currentTime
=
Number
(
this
.
curQues
.
wait_start
);
console
.
log
(
"
Set video current time-3:
"
,
this
.
video
.
currentTime
);
this
.
curEndTime
=
Number
(
this
.
curQues
.
wait_end
);
delayCall
(
0.01
,
()
=>
{
video
.
play
();
...
...
@@ -1142,7 +1139,6 @@ cc.Class({
console
.
log
(
"
in continueWaitVideo
"
);
this
.
video
.
currentTime
=
Number
(
this
.
curQues
.
wait_start
);
console
.
log
(
"
Set video current time-4:
"
,
this
.
video
.
currentTime
);
this
.
curEndTime
=
Number
(
this
.
curQues
.
wait_end
);
delayCall
(
0.01
,
()
=>
{
...
...
@@ -1165,7 +1161,6 @@ cc.Class({
const
video
=
this
.
video
;
video
.
node
.
name
=
"
right_video
"
;
video
.
currentTime
=
Number
(
this
.
curQues
.
right_start
);
console
.
log
(
"
Set video current time-5:
"
,
this
.
video
.
currentTime
);
this
.
curEndTime
=
Number
(
this
.
curQues
.
right_end
);
delayCall
(
0.01
,
()
=>
{
...
...
@@ -1190,11 +1185,9 @@ cc.Class({
if
(
this
.
wrongStartTime
&&
this
.
wrongEndTime
)
{
video
.
currentTime
=
this
.
wrongStartTime
;
console
.
log
(
"
Set video current time-6:
"
,
this
.
video
.
currentTime
);
this
.
curEndTime
=
this
.
wrongEndTime
;
}
else
{
video
.
currentTime
=
Number
(
this
.
curQues
.
wrong_start
);
console
.
log
(
"
Set video current time-7:
"
,
this
.
video
.
currentTime
);
this
.
curEndTime
=
Number
(
this
.
curQues
.
wrong_end
);
}
...
...
@@ -1223,7 +1216,6 @@ cc.Class({
const
video
=
this
.
video
;
video
.
node
.
name
=
"
end_video
"
;
video
.
currentTime
=
Number
(
this
.
curQues
.
end_start
);
console
.
log
(
"
Set video current time-8:
"
,
this
.
video
.
currentTime
);
this
.
curEndTime
=
Number
(
this
.
curQues
.
end_end
);
delayCall
(
0.01
,
()
=>
{
video
.
play
();
...
...
@@ -1503,7 +1495,6 @@ cc.Class({
this
.
video
.
pause
();
this
.
videoControlBar
.
emit
(
"
update_video_status
"
,
0
);
this
.
video
.
currentTime
=
this
.
curEndTime
;
console
.
log
(
"
Set video current time-9:
"
,
this
.
video
.
currentTime
);
this
.
curEndTime
=
-
1
;
this
.
curVideoPlayEnd
();
// this.videoControlBar.active = false;
...
...
@@ -1540,7 +1531,6 @@ cc.Class({
this
.
curEndTime
=
-
1
;
}
this
.
video
.
currentTime
=
userDragTime
;
console
.
log
(
"
Set video current time-10:
"
,
this
.
video
.
currentTime
);
},
// 是否正在拖动进度条
...
...
@@ -1656,7 +1646,6 @@ cc.Class({
// 监听组件发来的拖动百分比
this
.
videoControlBar
.
on
(
"
on_drag_percent
"
,
(
percent
)
=>
{
this
.
video
.
currentTime
=
percent
*
this
.
videoDuration
;
console
.
log
(
"
Set video current time-11:
"
,
this
.
video
.
currentTime
);
})
// 监听组件发来视频播放、暂停事件
...
...
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