Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
et_02
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
et_02
Commits
0ed55050
Commit
0ed55050
authored
Feb 24, 2021
by
智慧
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
style:将时间添加
parent
62a64252
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
128 additions
and
130 deletions
+128
-130
helloworld.fire
play/assets/sbox-video-ljx/Scene/helloworld.fire
+118
-119
VideoPlayer.js
play/assets/sbox-video-ljx/Script/VideoPlayer.js
+10
-11
No files found.
play/assets/sbox-video-ljx/Scene/helloworld.fire
View file @
0ed55050
...
@@ -509,6 +509,9 @@
...
@@ -509,6 +509,9 @@
{
{
"__id__": 11
"__id__": 11
},
},
{
"__id__": 16
},
{
{
"__id__": 19
"__id__": 19
}
}
...
@@ -585,7 +588,7 @@
...
@@ -585,7 +588,7 @@
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 1
8
"__id__": 1
5
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -643,18 +646,14 @@
...
@@ -643,18 +646,14 @@
"_parent": {
"_parent": {
"__id__": 11
"__id__": 11
},
},
"_children": [
"_children": [],
{
"__id__": 13
}
],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 1
6
"__id__": 1
3
},
},
{
{
"__id__": 1
7
"__id__": 1
4
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -705,21 +704,112 @@
...
@@ -705,21 +704,112 @@
"groupIndex": 0,
"groupIndex": 0,
"_id": "113R0zLXtFepxzac9K/CIC"
"_id": "113R0zLXtFepxzac9K/CIC"
},
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 12
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "88113a42-ecd9-4466-92f3-473d8d95f1df"
},
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "42AYfV7WRL06RjstJcX2QQ"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 12
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 32,
"_left": 0,
"_right": -47.60000000000002,
"_top": 0,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "c7R/FpdJRMBbiA2IUg5hOn"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 11
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "9c0a9a1c-f515-419f-a98b-d1926c0d9791"
},
"_type": 1,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "6aEBayL25NCYjiR2AaURHr"
},
{
{
"__type__": "cc.Node",
"__type__": "cc.Node",
"_name": "New Label",
"_name": "New Label",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 1
2
"__id__": 1
0
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 1
4
"__id__": 1
7
},
},
{
{
"__id__": 1
5
"__id__": 1
8
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -728,7 +818,7 @@
...
@@ -728,7 +818,7 @@
"__type__": "cc.Color",
"__type__": "cc.Color",
"r": 255,
"r": 255,
"g": 255,
"g": 255,
"b":
255
,
"b":
91
,
"a": 255
"a": 255
},
},
"_contentSize": {
"_contentSize": {
...
@@ -745,8 +835,8 @@
...
@@ -745,8 +835,8 @@
"__type__": "TypedArray",
"__type__": "TypedArray",
"ctor": "Float64Array",
"ctor": "Float64Array",
"array": [
"array": [
12
,
951.277
,
47
,
5.88
,
0,
0,
0,
0,
0,
0,
...
@@ -775,7 +865,7 @@
...
@@ -775,7 +865,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 1
3
"__id__": 1
6
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -811,7 +901,7 @@
...
@@ -811,7 +901,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 1
3
"__id__": 1
6
},
},
"_enabled": true,
"_enabled": true,
"_color": {
"_color": {
...
@@ -824,97 +914,6 @@
...
@@ -824,97 +914,6 @@
"_width": 4,
"_width": 4,
"_id": "eahGxjR3VJXJU5Vhkwp4DB"
"_id": "eahGxjR3VJXJU5Vhkwp4DB"
},
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 12
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "88113a42-ecd9-4466-92f3-473d8d95f1df"
},
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "42AYfV7WRL06RjstJcX2QQ"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 12
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 32,
"_left": 0,
"_right": -47.60000000000002,
"_top": 0,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "c7R/FpdJRMBbiA2IUg5hOn"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 11
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "9c0a9a1c-f515-419f-a98b-d1926c0d9791"
},
"_type": 1,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "6aEBayL25NCYjiR2AaURHr"
},
{
{
"__type__": "cc.Node",
"__type__": "cc.Node",
"_name": "TimeLabel",
"_name": "TimeLabel",
...
@@ -923,7 +922,7 @@
...
@@ -923,7 +922,7 @@
"__id__": 10
"__id__": 10
},
},
"_children": [],
"_children": [],
"_active":
tru
e,
"_active":
fals
e,
"_components": [
"_components": [
{
{
"__id__": 20
"__id__": 20
...
@@ -1076,7 +1075,7 @@
...
@@ -1076,7 +1075,7 @@
"_enabled": true,
"_enabled": true,
"_N$totalLength": 880,
"_N$totalLength": 880,
"_N$barSprite": {
"_N$barSprite": {
"__id__": 1
8
"__id__": 1
5
},
},
"_N$mode": 0,
"_N$mode": 0,
"_N$progress": 0,
"_N$progress": 0,
...
@@ -1304,7 +1303,7 @@
...
@@ -1304,7 +1303,7 @@
"_srcBlendFactor": 770,
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_dstBlendFactor": 771,
"_spriteFrame": {
"_spriteFrame": {
"__uuid__": "
76c13eac-4d66-46c4-9b35-b194026ff65b
"
"__uuid__": "
983c7b7f-af31-4ebc-9b2a-bafced30115c
"
},
},
"_type": 1,
"_type": 1,
"_sizeMode": 0,
"_sizeMode": 0,
...
@@ -1588,7 +1587,7 @@
...
@@ -1588,7 +1587,7 @@
"_srcBlendFactor": 770,
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_dstBlendFactor": 771,
"_spriteFrame": {
"_spriteFrame": {
"__uuid__": "
4cece7aa-9b9c-43e2-9069-d701fe305cf7
"
"__uuid__": "
cfdf000d-ca09-46fe-818d-375cc8540d28
"
},
},
"_type": 1,
"_type": 1,
"_sizeMode": 0,
"_sizeMode": 0,
...
@@ -1840,7 +1839,7 @@
...
@@ -1840,7 +1839,7 @@
1,
1,
1,
1,
1,
1,
1
0
]
]
},
},
"_eulerAngles": {
"_eulerAngles": {
...
@@ -1872,7 +1871,7 @@
...
@@ -1872,7 +1871,7 @@
"_srcBlendFactor": 770,
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_dstBlendFactor": 771,
"_spriteFrame": {
"_spriteFrame": {
"__uuid__": "
f90ba27d-8dd9-4b2f-97b3-5c1cd05549a
9"
"__uuid__": "
5ac42155-e9c8-436a-ac3d-8b36b12df53
9"
},
},
"_type": 1,
"_type": 1,
"_sizeMode": 0,
"_sizeMode": 0,
...
@@ -2118,7 +2117,7 @@
...
@@ -2118,7 +2117,7 @@
"ctor": "Float64Array",
"ctor": "Float64Array",
"array": [
"array": [
0,
0,
0,
-1
0,
0,
0,
0,
0,
0,
0,
...
@@ -2158,7 +2157,7 @@
...
@@ -2158,7 +2157,7 @@
"_srcBlendFactor": 770,
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_dstBlendFactor": 771,
"_spriteFrame": {
"_spriteFrame": {
"__uuid__": "
52c2675d-0dbb-44a7-af5c-b37e97c3a1ee
"
"__uuid__": "
fb93bb33-3282-4257-94a9-07c6fa9e9703
"
},
},
"_type": 1,
"_type": 1,
"_sizeMode": 0,
"_sizeMode": 0,
...
@@ -2187,8 +2186,8 @@
...
@@ -2187,8 +2186,8 @@
"_alignFlags": 45,
"_alignFlags": 45,
"_left": 14,
"_left": 14,
"_right": 14,
"_right": 14,
"_top": 8,
"_top":
1
8,
"_bottom":
8
,
"_bottom":
-2
,
"_verticalCenter": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsLeft": true,
...
@@ -2442,7 +2441,7 @@
...
@@ -2442,7 +2441,7 @@
"_srcBlendFactor": 770,
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_dstBlendFactor": 771,
"_spriteFrame": {
"_spriteFrame": {
"__uuid__": "8
a15bf67-c647-4f10-8bf4-73fa74ecf58d
"
"__uuid__": "8
dbd0162-2e44-4ebc-9c34-3820bb821920
"
},
},
"_type": 1,
"_type": 1,
"_sizeMode": 0,
"_sizeMode": 0,
...
@@ -2636,7 +2635,7 @@
...
@@ -2636,7 +2635,7 @@
"__id__": 20
"__id__": 20
},
},
"currentTimeLabel": {
"currentTimeLabel": {
"__id__": 1
4
"__id__": 1
7
},
},
"barTag": {
"barTag": {
"__id__": 12
"__id__": 12
...
...
play/assets/sbox-video-ljx/Script/VideoPlayer.js
View file @
0ed55050
...
@@ -190,14 +190,14 @@ cc.Class({
...
@@ -190,14 +190,14 @@ cc.Class({
pgBar
.
opacity
=
255
;
pgBar
.
opacity
=
255
;
}
}
});
});
//
this.tw = cc.tween(this.ProgressBar.node).delay(3).to(.6, {
this
.
tw
=
cc
.
tween
(
this
.
ProgressBar
.
node
).
delay
(
3
).
to
(.
6
,
{
//
opacity: 0
opacity
:
0
//
}).call(() => {
}).
call
(()
=>
{
//
console.log('This is a callback');
console
.
log
(
'
This is a callback
'
);
//
// this.tw.stop();
// this.tw.stop();
//
// this.tw.removeSelf()
// this.tw.removeSelf()
//
// this.tw = null;
// this.tw = null;
//
})
})
},
},
start
()
{
start
()
{
...
@@ -255,7 +255,6 @@ cc.Class({
...
@@ -255,7 +255,6 @@ cc.Class({
this
.
videoPlayer
.
currentTime
=
percent
*
dur
this
.
videoPlayer
.
currentTime
=
percent
*
dur
},
},
updateBarByTime
(
ct
){
updateBarByTime
(
ct
){
this
.
currentTimeLabel
.
string
=
this
.
formatTime
(
ct
);
this
.
currentTimeLabel
.
string
=
this
.
formatTime
(
ct
);
const
dur
=
this
.
videoPlayer
.
getDuration
();
const
dur
=
this
.
videoPlayer
.
getDuration
();
const
percent
=
ct
/
dur
;
const
percent
=
ct
/
dur
;
...
@@ -286,8 +285,8 @@ cc.Class({
...
@@ -286,8 +285,8 @@ cc.Class({
func
(
this
.
getDefaultData
());
func
(
this
.
getDefaultData
());
},
},
getDefaultData
()
{
getDefaultData
()
{
//
return {video_url: "http://staging-teach.cdn.ireadabc.com/5826aa205a4d33bf65552778b2aaf6f8.mp4"}
return
{
video_url
:
"
http://staging-teach.cdn.ireadabc.com/5826aa205a4d33bf65552778b2aaf6f8.mp4
"
}
return
{
video_url
:
"
http://staging-teach.cdn.ireadabc.com/d2b6b86798ef09034bf29417a0e747d2.mp4
"
}
//
return {video_url: "http://staging-teach.cdn.ireadabc.com/d2b6b86798ef09034bf29417a0e747d2.mp4"}
},
},
play
(){
play
(){
...
...
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