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
458fb94c
Commit
458fb94c
authored
Nov 21, 2022
by
李维
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加进度条的起始结束时间
parent
8d8ddfb6
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
763 additions
and
88 deletions
+763
-88
VideoControlBar.prefab
.../MRBR_video/prefab/VideoControlBar/VideoControlBar.prefab
+300
-3
myVideoControlScript.js
...R_video/prefab/VideoControlBar/js/myVideoControlScript.js
+56
-9
MRBR_video.fire
assets/MRBR_video/scene/MRBR_video.fire
+373
-76
MRBR_video.js
assets/MRBR_video/scene/MRBR_video.js
+34
-0
No files found.
assets/MRBR_video/prefab/VideoControlBar/VideoControlBar.prefab
View file @
458fb94c
...
...
@@ -31,19 +31,22 @@
},
{
"__id__": 24
},
{
"__id__": 27
}
],
"_active": true,
"_components": [
{
"__id__":
27
"__id__":
35
},
{
"__id__":
28
"__id__":
36
}
],
"_prefab": {
"__id__":
29
"__id__":
37
},
"_opacity": 255,
"_color": {
...
...
@@ -997,6 +1000,300 @@
"fileId": "359axb3wRFnpR16d4pl6Xc",
"sync": false
},
{
"__type__": "cc.Node",
"_name": "time_label",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [
{
"__id__": 28
},
{
"__id__": 31
}
],
"_active": true,
"_components": [],
"_prefab": {
"__id__": 34
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
-40,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": ""
},
{
"__type__": "cc.Node",
"_name": "start",
"_objFlags": 0,
"_parent": {
"__id__": 27
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 29
}
],
"_prefab": {
"__id__": 30
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 80.08,
"height": 40.32
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-420,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": ""
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 28
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_string": "00:00",
"_N$string": "00:00",
"_fontSize": 32,
"_lineHeight": 32,
"_enableWrapText": true,
"_N$file": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_batchAsBitmap": false,
"_styleFlags": 0,
"_underlineHeight": 0,
"_N$horizontalAlign": 1,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "a1cb871b-6ef5-410e-802f-f3a1c2d185e9"
},
"fileId": "ccNtS6tAREr6Sy5ZaTAO9J",
"sync": false
},
{
"__type__": "cc.Node",
"_name": "end",
"_objFlags": 0,
"_parent": {
"__id__": 27
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 32
}
],
"_prefab": {
"__id__": 33
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 80.08,
"height": 40.32
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
600,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": ""
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 31
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_string": "59:59",
"_N$string": "59:59",
"_fontSize": 32,
"_lineHeight": 32,
"_enableWrapText": true,
"_N$file": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_batchAsBitmap": false,
"_styleFlags": 0,
"_underlineHeight": 0,
"_N$horizontalAlign": 1,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "a1cb871b-6ef5-410e-802f-f3a1c2d185e9"
},
"fileId": "c84DQy/K9PAYM9A6xIjUsz",
"sync": false
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "a1cb871b-6ef5-410e-802f-f3a1c2d185e9"
},
"fileId": "0fp0R7vBRMBo86syd5lDDT",
"sync": false
},
{
"__type__": "28e11HTXPtGa7wWg93PflND",
"_name": "",
...
...
assets/MRBR_video/prefab/VideoControlBar/js/myVideoControlScript.js
View file @
458fb94c
...
...
@@ -5,6 +5,25 @@
// Learn life-cycle callbacks:
// - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html
/**
* 视频进度条控制组件
* 发送消息的方式
* video_play_end - 视频播放完成后发送,可以将播放按钮调整为结束状态
* update_video_progress - 视频进度更新时调用,传入一个0-1之间的数值
* update_video_status - 更新按钮状态,需要一个参数 0:播放状态 1:暂停状态 2:停止状态
* hide_bar - 隐藏进度条
* show_bar - 显示进度条
* set_mark_points - 设置关键点标记 传入一个数组 [0.2, 0.25, 0.6, 1]
* set_start_end_label - 设置起始和结束,接受两个字符串类型的参数,如果不传参数或者传了空字符串就不显示标签, 第一个参数是起始时间,第二个是结束时间
*
* 直接script调用
* refreshVideoBtnState - 更新按钮状态,需要一个参数 0:播放状态 1:暂停状态 2:停止状态
* showBar - 显示进度条
* hideBar - 隐藏进度条
* setProgress - 设置进度,参数为0-1之间的一个数字
* setMarkPoints - 设置关键点标记 传入一个数组 [0.2, 0.25, 0.6, 1]
* setStartEndTimeLabel - 设置起始和结束,接受两个字符串类型的参数,如果不传参数或者传了空字符串就不显示标签, 第一个参数是起始时间,第二个是结束时间
*/
cc
.
Class
({
extends
:
cc
.
Component
,
...
...
@@ -179,15 +198,11 @@ cc.Class({
})
this
.
node
.
on
(
"
set_mark_points
"
,
(
data
)
=>
{
// console.log("set_mark_points")
const
markPoint
=
cc
.
find
(
"
markPoint
"
,
this
.
node
);
const
markPointsContainer
=
cc
.
find
(
"
markNode
"
,
this
.
node
);
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
const
newPoint
=
cc
.
instantiate
(
markPoint
);
newPoint
.
x
=
-
420
+
this
.
bgProgress
.
width
*
data
[
i
];
newPoint
.
active
=
true
;
markPointsContainer
.
addChild
(
newPoint
);
}
this
.
setMarkPoints
(
data
);
})
this
.
node
.
on
(
"
set_start_end_label
"
,
(
start
,
end
)
=>
{
this
.
setStartEndTimeLabel
(
start
,
end
);
})
this
.
node
.
off
(
cc
.
Node
.
EventType
.
TOUCH_START
);
...
...
@@ -270,6 +285,38 @@ cc.Class({
},
1
);
},
// 设置标记点
setMarkPoints
(
pArr
)
{
// console.log("set_mark_points")
const
markPoint
=
cc
.
find
(
"
markPoint
"
,
this
.
node
);
const
markPointsContainer
=
cc
.
find
(
"
markNode
"
,
this
.
node
);
for
(
let
i
=
0
;
i
<
pArr
.
length
;
i
++
)
{
const
newPoint
=
cc
.
instantiate
(
markPoint
);
newPoint
.
x
=
-
420
+
this
.
bgProgress
.
width
*
pArr
[
i
];
newPoint
.
active
=
true
;
markPointsContainer
.
addChild
(
newPoint
);
}
},
// 设置开始和结束标签
setStartEndTimeLabel
(
start
,
end
)
{
const
startLabel
=
cc
.
find
(
"
time_label/start
"
,
this
.
node
).
getComponent
(
cc
.
Label
);
const
endLabel
=
cc
.
find
(
"
time_label/end
"
,
this
.
node
).
getComponent
(
cc
.
Label
);
if
(
start
!=
null
&&
start
!=
undefined
&&
startLabel
!=
""
)
{
startLabel
.
active
=
true
;
startLabel
.
string
=
start
;
}
else
{
startLabel
.
active
=
false
;
}
if
(
end
!=
null
&&
end
!=
undefined
&&
endLabel
!=
""
)
{
endLabel
.
active
=
true
;
endLabel
.
string
=
end
;
}
else
{
endLabel
.
active
=
false
;
}
},
onDestroy
()
{
for
(
let
i
=
0
;
i
<
this
.
setIntervalIDs
.
length
;
i
++
)
{
clearInterval
(
this
.
setIntervalIDs
[
i
]);
...
...
assets/MRBR_video/scene/MRBR_video.fire
View file @
458fb94c
...
...
@@ -84,19 +84,19 @@
"__id__": 15
},
{
"__id__":
44
"__id__":
52
}
],
"_active": true,
"_components": [
{
"__id__": 7
0
"__id__": 7
8
},
{
"__id__": 7
1
"__id__": 7
9
},
{
"__id__":
72
"__id__":
80
}
],
"_prefab": null,
...
...
@@ -713,19 +713,22 @@
},
{
"__id__": 38
},
{
"__id__": 41
}
],
"_active": true,
"_components": [
{
"__id__": 4
1
"__id__": 4
9
},
{
"__id__":
42
"__id__":
50
}
],
"_prefab": {
"__id__":
43
"__id__":
51
},
"_opacity": 255,
"_color": {
...
...
@@ -772,7 +775,7 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "
21rpQCUqBCvbe7O7Wk5wcb
"
"_id": "
18wvXfXB5Cwo8QL+jVcBjY
"
},
{
"__type__": "cc.Node",
...
...
@@ -840,7 +843,7 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "
474Uowh/xOHJd22j20YApZ
"
"_id": "
75zHytK0tK/pdDsZHqZNEk
"
},
{
"__type__": "cc.Node",
...
...
@@ -904,7 +907,7 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "
37yopM59xFlLWK/vID3Lbg
"
"_id": "
damCZ8eCxJsYqn0ow3egZl
"
},
{
"__type__": "cc.Sprite",
...
...
@@ -936,7 +939,7 @@
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "
14JdGAam9M66cwIbuJyzZ6
"
"_id": "
c528XF7zpHQa4kqckpmh8b
"
},
{
"__type__": "cc.PrefabInfo",
...
...
@@ -979,7 +982,7 @@
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "
fcCbueXrNPxpwsa6Abpub5
"
"_id": "
17o3O6KgxEDYcYlEZ0JqrW
"
},
{
"__type__": "cc.PrefabInfo",
...
...
@@ -1050,7 +1053,7 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "
9fFz0gochDlYPemMcZFuCR
"
"_id": "
64zgRpqO9DlKgeOWPTd591
"
},
{
"__type__": "cc.PrefabInfo",
...
...
@@ -1131,7 +1134,7 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "
3bpHkpqkNCtYh/od0ep7YP
"
"_id": "
ecGsRA3Z1DbpdcOzk1Yjyh
"
},
{
"__type__": "cc.Node",
...
...
@@ -1195,7 +1198,7 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "
9fI35lFoxD972EEJEH5oxR
"
"_id": "
17wXv1xctMobrrTVfBHOOk
"
},
{
"__type__": "cc.Sprite",
...
...
@@ -1227,7 +1230,7 @@
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "
b7J4OBYa9JWJN5iikZ3V15
"
"_id": "
3aSXfDmEdHi6maTNIUx+Mo
"
},
{
"__type__": "cc.PrefabInfo",
...
...
@@ -1302,7 +1305,7 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "
e4NHDZuy9OT73CBimdt5FH
"
"_id": "
213RrRdg5NPo22dTWIcqxN
"
},
{
"__type__": "cc.Sprite",
...
...
@@ -1334,7 +1337,7 @@
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "
79nHWiiU9HLoCyNVU2FDqj
"
"_id": "
c3HArlkPJM55xJ/NwztX6b
"
},
{
"__type__": "cc.PrefabInfo",
...
...
@@ -1409,7 +1412,7 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "
0fKG0W0mRJTLbM6Ez2ueos
"
"_id": "
a8du5MrB9Or63eVWuDWMDx
"
},
{
"__type__": "cc.Sprite",
...
...
@@ -1441,7 +1444,7 @@
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "
102miMb6NNRIBR7v06aLfX
"
"_id": "
910vs4l8pJqpuqaPEcSD8P
"
},
{
"__type__": "cc.PrefabInfo",
...
...
@@ -1527,7 +1530,7 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "3
5mhAF3PtDvZgnLcGZUCHq
"
"_id": "3
8rYuVbZBBRIsDa/h14CcR
"
},
{
"__type__": "cc.Sprite",
...
...
@@ -1559,7 +1562,7 @@
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "
50YSLLZ7BIAJVFt/WntkXW
"
"_id": "
256jITMFtKQ4iBbTmNUw1H
"
},
{
"__type__": "cc.PrefabInfo",
...
...
@@ -1634,7 +1637,7 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "7
bvtlGqqVPBqQKzkx5Rdzh
"
"_id": "7
7uilrG/BIzbPAb3H5RfJl
"
},
{
"__type__": "cc.Sprite",
...
...
@@ -1666,7 +1669,7 @@
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "
244QufgmdFw4iTGwnLQTPr
"
"_id": "
3e5fCcZ+dHD7usxPRFWk3n
"
},
{
"__type__": "cc.PrefabInfo",
...
...
@@ -1679,6 +1682,300 @@
"fileId": "359axb3wRFnpR16d4pl6Xc",
"sync": false
},
{
"__type__": "cc.Node",
"_name": "time_label",
"_objFlags": 0,
"_parent": {
"__id__": 15
},
"_children": [
{
"__id__": 42
},
{
"__id__": 45
}
],
"_active": true,
"_components": [],
"_prefab": {
"__id__": 48
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
-40,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "4bmRbhjWZJ34K3IlJPpIFO"
},
{
"__type__": "cc.Node",
"_name": "start",
"_objFlags": 0,
"_parent": {
"__id__": 41
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 43
}
],
"_prefab": {
"__id__": 44
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 80.08,
"height": 40.32
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-420,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "feFXfoRCJJUa/IbsDDbKxb"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 42
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_string": "00:00",
"_N$string": "00:00",
"_fontSize": 32,
"_lineHeight": 32,
"_enableWrapText": true,
"_N$file": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_batchAsBitmap": false,
"_styleFlags": 0,
"_underlineHeight": 0,
"_N$horizontalAlign": 1,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "c7RfxYi6pOspQP4ZgD4DUL"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 15
},
"asset": {
"__uuid__": "a1cb871b-6ef5-410e-802f-f3a1c2d185e9"
},
"fileId": "ccNtS6tAREr6Sy5ZaTAO9J",
"sync": false
},
{
"__type__": "cc.Node",
"_name": "end",
"_objFlags": 0,
"_parent": {
"__id__": 41
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 46
}
],
"_prefab": {
"__id__": 47
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 80.08,
"height": 40.32
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
600,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "83UPH6mJZJkof+aJOxYwTq"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 45
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_string": "59:59",
"_N$string": "59:59",
"_fontSize": 32,
"_lineHeight": 32,
"_enableWrapText": true,
"_N$file": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_batchAsBitmap": false,
"_styleFlags": 0,
"_underlineHeight": 0,
"_N$horizontalAlign": 1,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "9fnSoJot1Jao7QFhWAH08f"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 15
},
"asset": {
"__uuid__": "a1cb871b-6ef5-410e-802f-f3a1c2d185e9"
},
"fileId": "c84DQy/K9PAYM9A6xIjUsz",
"sync": false
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 15
},
"asset": {
"__uuid__": "a1cb871b-6ef5-410e-802f-f3a1c2d185e9"
},
"fileId": "0fp0R7vBRMBo86syd5lDDT",
"sync": false
},
{
"__type__": "28e11HTXPtGa7wWg93PflND",
"_name": "",
...
...
@@ -1689,7 +1986,7 @@
"_enabled": true,
"setTimeoutIDs": [],
"setIntervalIDs": [],
"_id": "
b61/p/myFAzY+He2+Sq7Ie
"
"_id": "
2figol3sBEd4MymazBOzhf
"
},
{
"__type__": "cc.Button",
...
...
@@ -1757,7 +2054,7 @@
"hoverSprite": null,
"_N$disabledSprite": null,
"_N$target": null,
"_id": "
c0dkbMUnVBfbdJeIxQi3k8
"
"_id": "
6dCn+abaxCSYT2RulaNFo4
"
},
{
"__type__": "cc.PrefabInfo",
...
...
@@ -1779,13 +2076,13 @@
},
"_children": [
{
"__id__":
45
"__id__":
53
},
{
"__id__": 6
0
"__id__": 6
8
},
{
"__id__":
63
"__id__":
71
}
],
"_active": false,
...
...
@@ -1843,29 +2140,29 @@
"_name": "img",
"_objFlags": 0,
"_parent": {
"__id__":
44
"__id__":
52
},
"_children": [
{
"__id__":
46
"__id__":
54
},
{
"__id__":
48
"__id__":
56
},
{
"__id__": 5
0
"__id__": 5
8
},
{
"__id__":
52
"__id__":
60
},
{
"__id__":
54
"__id__":
62
},
{
"__id__":
56
"__id__":
64
},
{
"__id__":
58
"__id__":
66
}
],
"_active": true,
...
...
@@ -1923,13 +2220,13 @@
"_name": "go_1",
"_objFlags": 0,
"_parent": {
"__id__":
45
"__id__":
53
},
"_children": [],
"_active": true,
"_components": [
{
"__id__":
47
"__id__":
55
}
],
"_prefab": null,
...
...
@@ -1985,7 +2282,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
46
"__id__":
54
},
"_enabled": true,
"_materials": [],
...
...
@@ -2013,13 +2310,13 @@
"_name": "black",
"_objFlags": 0,
"_parent": {
"__id__":
45
"__id__":
53
},
"_children": [],
"_active": true,
"_components": [
{
"__id__":
49
"__id__":
57
}
],
"_prefab": null,
...
...
@@ -2075,7 +2372,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
48
"__id__":
56
},
"_enabled": true,
"_materials": [],
...
...
@@ -2103,13 +2400,13 @@
"_name": "go_3",
"_objFlags": 0,
"_parent": {
"__id__":
45
"__id__":
53
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 5
1
"__id__": 5
9
}
],
"_prefab": null,
...
...
@@ -2165,7 +2462,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 5
0
"__id__": 5
8
},
"_enabled": true,
"_materials": [],
...
...
@@ -2193,13 +2490,13 @@
"_name": "go_2",
"_objFlags": 0,
"_parent": {
"__id__":
45
"__id__":
53
},
"_children": [],
"_active": true,
"_components": [
{
"__id__":
53
"__id__":
61
}
],
"_prefab": null,
...
...
@@ -2255,7 +2552,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
52
"__id__":
60
},
"_enabled": true,
"_materials": [],
...
...
@@ -2283,13 +2580,13 @@
"_name": "start_title",
"_objFlags": 0,
"_parent": {
"__id__":
45
"__id__":
53
},
"_children": [],
"_active": true,
"_components": [
{
"__id__":
55
"__id__":
63
}
],
"_prefab": null,
...
...
@@ -2345,7 +2642,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
54
"__id__":
62
},
"_enabled": true,
"_materials": [],
...
...
@@ -2373,13 +2670,13 @@
"_name": "go_0",
"_objFlags": 0,
"_parent": {
"__id__":
45
"__id__":
53
},
"_children": [],
"_active": true,
"_components": [
{
"__id__":
57
"__id__":
65
}
],
"_prefab": null,
...
...
@@ -2435,7 +2732,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
56
"__id__":
64
},
"_enabled": true,
"_materials": [],
...
...
@@ -2463,13 +2760,13 @@
"_name": "light",
"_objFlags": 0,
"_parent": {
"__id__":
45
"__id__":
53
},
"_children": [],
"_active": true,
"_components": [
{
"__id__":
59
"__id__":
67
}
],
"_prefab": null,
...
...
@@ -2525,7 +2822,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
58
"__id__":
66
},
"_enabled": true,
"_materials": [],
...
...
@@ -2553,11 +2850,11 @@
"_name": "font",
"_objFlags": 0,
"_parent": {
"__id__":
44
"__id__":
52
},
"_children": [
{
"__id__": 6
1
"__id__": 6
9
}
],
"_active": true,
...
...
@@ -2615,13 +2912,13 @@
"_name": "GOTHICB_1",
"_objFlags": 0,
"_parent": {
"__id__": 6
0
"__id__": 6
8
},
"_children": [],
"_active": true,
"_components": [
{
"__id__":
62
"__id__":
70
}
],
"_prefab": null,
...
...
@@ -2677,7 +2974,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 6
1
"__id__": 6
9
},
"_enabled": true,
"_materials": [
...
...
@@ -2712,17 +3009,17 @@
"_name": "audio",
"_objFlags": 0,
"_parent": {
"__id__":
44
"__id__":
52
},
"_children": [
{
"__id__":
64
"__id__":
72
},
{
"__id__":
66
"__id__":
74
},
{
"__id__":
68
"__id__":
76
}
],
"_active": true,
...
...
@@ -2780,13 +3077,13 @@
"_name": "goodjob",
"_objFlags": 0,
"_parent": {
"__id__":
63
"__id__":
71
},
"_children": [],
"_active": true,
"_components": [
{
"__id__":
65
"__id__":
73
}
],
"_prefab": null,
...
...
@@ -2842,7 +3139,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
64
"__id__":
72
},
"_enabled": true,
"_clip": {
...
...
@@ -2861,13 +3158,13 @@
"_name": "ready",
"_objFlags": 0,
"_parent": {
"__id__":
63
"__id__":
71
},
"_children": [],
"_active": true,
"_components": [
{
"__id__":
67
"__id__":
75
}
],
"_prefab": null,
...
...
@@ -2923,7 +3220,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
66
"__id__":
74
},
"_enabled": true,
"_clip": {
...
...
@@ -2942,13 +3239,13 @@
"_name": "go",
"_objFlags": 0,
"_parent": {
"__id__":
63
"__id__":
71
},
"_children": [],
"_active": true,
"_components": [
{
"__id__":
69
"__id__":
77
}
],
"_prefab": null,
...
...
@@ -3004,7 +3301,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
68
"__id__":
76
},
"_enabled": true,
"_clip": {
...
...
assets/MRBR_video/scene/MRBR_video.js
View file @
458fb94c
...
...
@@ -1365,6 +1365,10 @@ cc.Class({
// 时长获取到以后 可以计算题目点
this
.
setProgressBarMarkPoints
();
// 设置进度条的起始和结束标签
this
.
videoControlBar
.
emit
(
"
set_start_end_label
"
,
"
00:00
"
,
this
.
getEndTimeLabel
(
this
.
videoDuration
))
if
(
this
.
jumpTime
)
{
this
.
resetQuesIndex
(
this
.
jumpTime
);
this
.
initCurQues
();
...
...
@@ -1400,6 +1404,36 @@ cc.Class({
}
},
//秒数转化为时分秒
getEndTimeLabel
(
value
)
{
var
secondTime
=
parseInt
(
value
);
// 秒
var
minuteTime
=
0
;
// 分
var
hourTime
=
0
;
// 小时
if
(
secondTime
>
60
)
{
//如果秒数大于60,将秒数转换成整数
//获取分钟,除以60取整数,得到整数分钟
minuteTime
=
parseInt
(
secondTime
/
60
);
//获取秒数,秒数取余,得到整数秒数
secondTime
=
parseInt
(
secondTime
%
60
);
//如果分钟大于60,将分钟转换成小时
if
(
minuteTime
>
60
)
{
//获取小时,获取分钟除以60,得到整数小时
hourTime
=
parseInt
(
minuteTime
/
60
);
//获取小时后取余的分,获取分钟除以60取余的分
minuteTime
=
parseInt
(
minuteTime
%
60
);
}
}
var
result
=
""
+
parseInt
(
secondTime
);
if
(
minuteTime
>
0
)
{
result
=
""
+
parseInt
(
minuteTime
)
+
"
:
"
+
result
;
}
if
(
hourTime
>
0
)
{
result
=
""
+
parseInt
(
hourTime
)
+
"
:
"
+
result
;
}
return
result
;
},
curVideoPlayEnd
()
{
if
(
this
.
playTimes
==
0
)
{
return
;
...
...
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