Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dg_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
dg_video
Commits
e81a620b
Commit
e81a620b
authored
Oct 27, 2022
by
liujiangnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 各种控制
parent
8acca360
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
364 additions
and
258 deletions
+364
-258
dg_video.fire
assets/dg_video/Scene/dg_video.fire
+302
-236
dg_video.js
assets/dg_video/Scene/dg_video.js
+62
-22
No files found.
assets/dg_video/Scene/dg_video.fire
View file @
e81a620b
...
...
@@ -78,31 +78,31 @@
"__id__": 7
},
{
"__id__": 1
2
"__id__": 1
4
},
{
"__id__": 1
5
"__id__": 1
7
},
{
"__id__":
18
"__id__":
20
},
{
"__id__": 2
6
"__id__": 2
8
},
{
"__id__": 7
5
"__id__": 7
6
}
],
"_active": true,
"_components": [
{
"__id__": 105
},
{
"__id__": 106
},
{
"__id__": 107
},
{
"__id__": 108
}
],
"_prefab": null,
...
...
@@ -343,12 +343,15 @@
"_children": [
{
"__id__": 8
},
{
"__id__": 11
}
],
"_active": true,
"_components": [
{
"__id__": 1
1
"__id__": 1
3
}
],
"_prefab": null,
...
...
@@ -523,6 +526,100 @@
"_originalHeight": 720,
"_id": "f3AOu8GUhM267nsrpUSJyU"
},
{
"__type__": "cc.Node",
"_name": "bg_video_shadow",
"_objFlags": 0,
"_parent": {
"__id__": 7
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 12
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 1320,
"height": 776
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
4.455,
-14.067,
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": "85mCWSsNVNTaIt7ziTMe7Y"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 11
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "086afe24-36cf-4acb-a26e-0cf3fade2b6e"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "ffnXti+e1CkaDi0nF0/LNP"
},
{
"__type__": "cc.Mask",
"_name": "",
...
...
@@ -554,10 +651,10 @@
"_active": true,
"_components": [
{
"__id__": 1
3
"__id__": 1
5
},
{
"__id__": 1
4
"__id__": 1
6
}
],
"_prefab": null,
...
...
@@ -613,9 +710,9 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
2
"__id__": 1
4
},
"_enabled":
fals
e,
"_enabled":
tru
e,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
...
...
@@ -645,7 +742,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
2
"__id__": 1
4
},
"_enabled": true,
"alignMode": 1,
...
...
@@ -678,10 +775,10 @@
"_active": true,
"_components": [
{
"__id__": 1
6
"__id__": 1
8
},
{
"__id__": 1
7
"__id__": 1
9
}
],
"_prefab": null,
...
...
@@ -737,7 +834,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
5
"__id__": 1
7
},
"_enabled": true,
"_materials": [
...
...
@@ -769,7 +866,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
5
"__id__": 1
7
},
"_enabled": true,
"alignMode": 1,
...
...
@@ -800,16 +897,16 @@
},
"_children": [
{
"__id__":
19
"__id__":
21
},
{
"__id__": 2
2
"__id__": 2
4
}
],
"_active": true,
"_components": [
{
"__id__": 2
5
"__id__": 2
7
}
],
"_prefab": null,
...
...
@@ -865,16 +962,16 @@
"_name": "empty_white",
"_objFlags": 0,
"_parent": {
"__id__":
18
"__id__":
20
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 2
0
"__id__": 2
2
},
{
"__id__": 2
1
"__id__": 2
3
}
],
"_prefab": null,
...
...
@@ -930,7 +1027,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
19
"__id__":
21
},
"_enabled": true,
"_materials": [
...
...
@@ -962,7 +1059,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
19
"__id__":
21
},
"_enabled": true,
"alignMode": 1,
...
...
@@ -989,16 +1086,16 @@
"_name": "bg_empty",
"_objFlags": 0,
"_parent": {
"__id__":
18
"__id__":
20
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 2
3
"__id__": 2
5
},
{
"__id__": 2
4
"__id__": 2
6
}
],
"_prefab": null,
...
...
@@ -1054,7 +1151,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
2
"__id__": 2
4
},
"_enabled": true,
"_materials": [
...
...
@@ -1086,7 +1183,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
2
"__id__": 2
4
},
"_enabled": true,
"alignMode": 1,
...
...
@@ -1113,7 +1210,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
18
"__id__":
20
},
"_enabled": true,
"_materials": [
...
...
@@ -1149,24 +1246,20 @@
},
"_children": [
{
"__id__": 2
7
"__id__": 2
9
},
{
"__id__":
29
"__id__":
31
},
{
"__id__": 6
4
"__id__": 6
6
},
{
"__id__":
69
"__id__":
71
}
],
"_active": true,
"_components": [
{
"__id__": 74
}
],
"_components": [],
"_prefab": null,
"_opacity": 255,
"_color": {
...
...
@@ -1220,13 +1313,13 @@
"_name": "bg_video_bottom",
"_objFlags": 0,
"_parent": {
"__id__": 2
6
"__id__": 2
8
},
"_children": [],
"_active": true,
"_components": [
{
"__id__":
28
"__id__":
30
}
],
"_prefab": null,
...
...
@@ -1282,7 +1375,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
7
"__id__": 2
9
},
"_enabled": true,
"_materials": [
...
...
@@ -1314,38 +1407,38 @@
"_name": "ProgressBar",
"_objFlags": 0,
"_parent": {
"__id__": 2
6
"__id__": 2
8
},
"_children": [
{
"__id__": 3
0
"__id__": 3
2
},
{
"__id__": 3
4
"__id__": 3
6
},
{
"__id__": 4
1
"__id__": 4
3
},
{
"__id__": 4
7
"__id__": 4
9
},
{
"__id__": 5
3
"__id__": 5
5
},
{
"__id__": 5
7
"__id__": 5
9
},
{
"__id__": 6
0
"__id__": 6
2
}
],
"_active": true,
"_components": [
{
"__id__": 6
2
"__id__": 6
4
},
{
"__id__": 6
3
"__id__": 6
5
}
],
"_prefab": null,
...
...
@@ -1401,17 +1494,17 @@
"_name": "bar",
"_objFlags": 0,
"_parent": {
"__id__":
29
"__id__":
31
},
"_children": [
{
"__id__": 3
1
"__id__": 3
3
}
],
"_active": true,
"_components": [
{
"__id__": 3
3
"__id__": 3
5
}
],
"_prefab": null,
...
...
@@ -1467,13 +1560,13 @@
"_name": "bar_tag",
"_objFlags": 0,
"_parent": {
"__id__": 3
0
"__id__": 3
2
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 3
2
"__id__": 3
4
}
],
"_prefab": null,
...
...
@@ -1529,7 +1622,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 3
1
"__id__": 3
3
},
"_enabled": true,
"_materials": [
...
...
@@ -1561,7 +1654,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 3
0
"__id__": 3
2
},
"_enabled": true,
"_materials": [
...
...
@@ -1593,20 +1686,20 @@
"_name": "Play",
"_objFlags": 0,
"_parent": {
"__id__":
29
"__id__":
31
},
"_children": [
{
"__id__": 3
5
"__id__": 3
7
}
],
"_active": true,
"_components": [
{
"__id__":
38
"__id__":
40
},
{
"__id__": 4
0
"__id__": 4
2
}
],
"_prefab": null,
...
...
@@ -1662,16 +1755,16 @@
"_name": "Background",
"_objFlags": 512,
"_parent": {
"__id__": 3
4
"__id__": 3
6
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 3
6
"__id__": 3
8
},
{
"__id__": 3
7
"__id__": 3
9
}
],
"_prefab": null,
...
...
@@ -1727,7 +1820,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 3
5
"__id__": 3
7
},
"_enabled": true,
"_materials": [
...
...
@@ -1759,7 +1852,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 3
5
"__id__": 3
7
},
"_enabled": true,
"alignMode": 0,
...
...
@@ -1786,7 +1879,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 3
4
"__id__": 3
6
},
"_enabled": true,
"_normalMaterial": null,
...
...
@@ -1795,7 +1888,7 @@
"zoomScale": 1.2,
"clickEvents": [
{
"__id__":
39
"__id__":
41
}
],
"_N$interactable": true,
...
...
@@ -1861,7 +1954,7 @@
"__uuid__": "29158224-f8dd-4661-a796-1ffab537140e"
},
"_N$target": {
"__id__": 3
5
"__id__": 3
7
},
"_id": "a8bWaLdnFKA5ITxJunB2R2"
},
...
...
@@ -1880,7 +1973,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 3
4
"__id__": 3
6
},
"_enabled": true,
"alignMode": 1,
...
...
@@ -1907,20 +2000,20 @@
"_name": "Pause",
"_objFlags": 0,
"_parent": {
"__id__":
29
"__id__":
31
},
"_children": [
{
"__id__": 4
2
"__id__": 4
4
}
],
"_active": false,
"_components": [
{
"__id__": 4
4
"__id__": 4
6
},
{
"__id__": 4
6
"__id__": 4
8
}
],
"_prefab": null,
...
...
@@ -1946,8 +2039,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-
483
,
-
4
.5,
-
135
,
-
3
.5,
0,
0,
0,
...
...
@@ -1976,13 +2069,13 @@
"_name": "Background",
"_objFlags": 512,
"_parent": {
"__id__": 4
1
"__id__": 4
3
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 4
3
"__id__": 4
5
}
],
"_prefab": null,
...
...
@@ -2038,7 +2131,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 4
2
"__id__": 4
4
},
"_enabled": true,
"_materials": [
...
...
@@ -2070,7 +2163,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 4
1
"__id__": 4
3
},
"_enabled": true,
"_normalMaterial": null,
...
...
@@ -2079,7 +2172,7 @@
"zoomScale": 1.2,
"clickEvents": [
{
"__id__": 4
5
"__id__": 4
7
}
],
"_N$interactable": true,
...
...
@@ -2135,7 +2228,7 @@
"hoverSprite": null,
"_N$disabledSprite": null,
"_N$target": {
"__id__": 4
2
"__id__": 4
4
},
"_id": "94dhG7VhpIZZJp5e+IJuYc"
},
...
...
@@ -2154,13 +2247,13 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 4
1
"__id__": 4
3
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 8,
"_left": -1
63
.5,
"_left": -1
80
.5,
"_right": 0,
"_top": 0,
"_bottom": 0,
...
...
@@ -2181,20 +2274,20 @@
"_name": "Restart",
"_objFlags": 0,
"_parent": {
"__id__":
29
"__id__":
31
},
"_children": [
{
"__id__":
48
"__id__":
50
}
],
"_active": false,
"_components": [
{
"__id__": 5
0
"__id__": 5
2
},
{
"__id__": 5
2
"__id__": 5
4
}
],
"_prefab": null,
...
...
@@ -2220,8 +2313,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-
482
.692,
-
5
.481,
-
135
.692,
-
4
.481,
0,
0,
0,
...
...
@@ -2250,13 +2343,13 @@
"_name": "Background",
"_objFlags": 512,
"_parent": {
"__id__": 4
7
"__id__": 4
9
},
"_children": [],
"_active": true,
"_components": [
{
"__id__":
49
"__id__":
51
}
],
"_prefab": null,
...
...
@@ -2312,7 +2405,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
48
"__id__":
50
},
"_enabled": true,
"_materials": [
...
...
@@ -2344,7 +2437,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 4
7
"__id__": 4
9
},
"_enabled": true,
"_normalMaterial": null,
...
...
@@ -2353,7 +2446,7 @@
"zoomScale": 1.2,
"clickEvents": [
{
"__id__": 5
1
"__id__": 5
3
}
],
"_N$interactable": true,
...
...
@@ -2409,7 +2502,7 @@
"hoverSprite": null,
"_N$disabledSprite": null,
"_N$target": {
"__id__":
48
"__id__":
50
},
"_id": "23rFQGz+tCTpq6+bq4cJzR"
},
...
...
@@ -2428,13 +2521,13 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 4
7
"__id__": 4
9
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 8,
"_left": -1
63
.192,
"_left": -1
81
.192,
"_right": 0,
"_top": 0,
"_bottom": 0,
...
...
@@ -2455,19 +2548,19 @@
"_name": "CurrentLabel",
"_objFlags": 0,
"_parent": {
"__id__":
29
"__id__":
31
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 5
4
"__id__": 5
6
},
{
"__id__": 5
5
"__id__": 5
7
},
{
"__id__": 5
6
"__id__": 5
8
}
],
"_prefab": null,
...
...
@@ -2523,7 +2616,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 5
3
"__id__": 5
5
},
"_enabled": true,
"_materials": [
...
...
@@ -2558,7 +2651,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 5
3
"__id__": 5
5
},
"_enabled": false,
"_color": {
...
...
@@ -2576,7 +2669,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 5
3
"__id__": 5
5
},
"_enabled": true,
"alignMode": 1,
...
...
@@ -2603,16 +2696,16 @@
"_name": "TimeLabel",
"_objFlags": 0,
"_parent": {
"__id__":
29
"__id__":
31
},
"_children": [],
"_active": true,
"_components": [
{
"__id__":
58
"__id__":
60
},
{
"__id__":
59
"__id__":
61
}
],
"_prefab": null,
...
...
@@ -2668,7 +2761,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 5
7
"__id__": 5
9
},
"_enabled": true,
"_materials": [
...
...
@@ -2703,7 +2796,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 5
7
"__id__": 5
9
},
"_enabled": true,
"alignMode": 1,
...
...
@@ -2730,13 +2823,13 @@
"_name": "text_tips",
"_objFlags": 0,
"_parent": {
"__id__":
29
"__id__":
31
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 6
1
"__id__": 6
3
}
],
"_prefab": null,
...
...
@@ -2792,7 +2885,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 6
0
"__id__": 6
2
},
"_enabled": true,
"_materials": [
...
...
@@ -2824,7 +2917,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
29
"__id__":
31
},
"_enabled": true,
"_materials": [
...
...
@@ -2856,12 +2949,12 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
29
"__id__":
31
},
"_enabled": true,
"_N$totalLength": 1,
"_N$barSprite": {
"__id__": 3
3
"__id__": 3
5
},
"_N$mode": 2,
"_N$progress": 1,
...
...
@@ -2873,19 +2966,19 @@
"_name": "fullscreen",
"_objFlags": 0,
"_parent": {
"__id__": 2
6
"__id__": 2
8
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 6
5
"__id__": 6
7
},
{
"__id__": 6
6
"__id__": 6
8
},
{
"__id__": 6
7
"__id__": 6
9
}
],
"_prefab": null,
...
...
@@ -2941,7 +3034,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 6
4
"__id__": 6
6
},
"_enabled": true,
"_materials": [
...
...
@@ -2973,7 +3066,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 6
4
"__id__": 6
6
},
"_enabled": true,
"alignMode": 1,
...
...
@@ -3000,7 +3093,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 6
4
"__id__": 6
6
},
"_enabled": true,
"_normalMaterial": null,
...
...
@@ -3009,7 +3102,7 @@
"zoomScale": 1.2,
"clickEvents": [
{
"__id__":
68
"__id__":
70
}
],
"_N$interactable": true,
...
...
@@ -3082,19 +3175,19 @@
"_name": "exitfull",
"_objFlags": 0,
"_parent": {
"__id__": 2
6
"__id__": 2
8
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 7
0
"__id__": 7
2
},
{
"__id__": 7
1
"__id__": 7
3
},
{
"__id__": 7
2
"__id__": 7
4
}
],
"_prefab": null,
...
...
@@ -3108,8 +3201,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width":
62
,
"height":
62
"width":
55
,
"height":
55
},
"_anchorPoint": {
"__type__": "cc.Vec2",
...
...
@@ -3120,8 +3213,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
751.6
28,
0
,
537.0
28,
-2.992
,
0,
0,
0,
...
...
@@ -3150,7 +3243,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
69
"__id__":
71
},
"_enabled": true,
"_materials": [
...
...
@@ -3182,14 +3275,14 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
69
"__id__":
71
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 32,
"_left": 0,
"_right":
-94.12800000000004
,
"_right":
64.97199999999998
,
"_top": 0,
"_bottom": 0,
"_verticalCenter": 0,
...
...
@@ -3209,7 +3302,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
69
"__id__":
71
},
"_enabled": true,
"_normalMaterial": null,
...
...
@@ -3218,7 +3311,7 @@
"zoomScale": 1.2,
"clickEvents": [
{
"__id__": 7
3
"__id__": 7
5
}
],
"_N$interactable": true,
...
...
@@ -3286,33 +3379,6 @@
"handler": "exitFullScreen",
"customEventData": ""
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 26
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 0,
"_left": 1245.196,
"_right": 674.8039999999999,
"_top": 0,
"_bottom": 167.90800000000002,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "f5gcAGvK9KippwSm0/nY0t"
},
{
"__type__": "cc.Node",
"_name": "videolist",
...
...
@@ -3322,16 +3388,16 @@
},
"_children": [
{
"__id__": 7
6
"__id__": 7
7
}
],
"_active": true,
"_components": [
{
"__id__": 10
3
"__id__": 10
4
},
{
"__id__": 10
4
"__id__": 10
5
}
],
"_prefab": null,
...
...
@@ -3387,17 +3453,17 @@
"_name": "view",
"_objFlags": 0,
"_parent": {
"__id__": 7
5
"__id__": 7
6
},
"_children": [
{
"__id__": 7
7
"__id__": 7
8
}
],
"_active": true,
"_components": [
{
"__id__": 10
2
"__id__": 10
3
}
],
"_prefab": null,
...
...
@@ -3453,17 +3519,17 @@
"_name": "content",
"_objFlags": 0,
"_parent": {
"__id__": 7
6
"__id__": 7
7
},
"_children": [
{
"__id__": 7
8
"__id__": 7
9
}
],
"_active": true,
"_components": [
{
"__id__": 10
1
"__id__": 10
2
}
],
"_prefab": null,
...
...
@@ -3519,23 +3585,23 @@
"_name": "item",
"_objFlags": 0,
"_parent": {
"__id__": 7
7
"__id__": 7
8
},
"_children": [
{
"__id__":
79
"__id__":
80
},
{
"__id__": 8
7
"__id__": 8
8
},
{
"__id__": 9
7
"__id__": 9
8
}
],
"_active": false,
"_components": [
{
"__id__":
99
"__id__":
100
}
],
"_prefab": null,
...
...
@@ -3591,23 +3657,23 @@
"_name": "item",
"_objFlags": 0,
"_parent": {
"__id__": 7
8
"__id__": 7
9
},
"_children": [
{
"__id__": 8
0
"__id__": 8
1
},
{
"__id__": 8
2
"__id__": 8
3
},
{
"__id__": 8
4
"__id__": 8
5
}
],
"_active": true,
"_components": [
{
"__id__": 8
6
"__id__": 8
7
}
],
"_prefab": null,
...
...
@@ -3663,13 +3729,13 @@
"_name": "cover_bg",
"_objFlags": 0,
"_parent": {
"__id__":
79
"__id__":
80
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 8
1
"__id__": 8
2
}
],
"_prefab": null,
...
...
@@ -3725,7 +3791,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 8
0
"__id__": 8
1
},
"_enabled": true,
"_materials": [
...
...
@@ -3757,13 +3823,13 @@
"_name": "num",
"_objFlags": 0,
"_parent": {
"__id__":
79
"__id__":
80
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 8
3
"__id__": 8
4
}
],
"_prefab": null,
...
...
@@ -3819,7 +3885,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 8
2
"__id__": 8
3
},
"_enabled": true,
"_materials": [
...
...
@@ -3854,13 +3920,13 @@
"_name": "title",
"_objFlags": 0,
"_parent": {
"__id__":
79
"__id__":
80
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 8
5
"__id__": 8
6
}
],
"_prefab": null,
...
...
@@ -3916,7 +3982,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 8
4
"__id__": 8
5
},
"_enabled": true,
"_materials": [
...
...
@@ -3951,7 +4017,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
79
"__id__":
80
},
"_enabled": true,
"_materials": [
...
...
@@ -3983,26 +4049,26 @@
"_name": "item_active",
"_objFlags": 0,
"_parent": {
"__id__": 7
8
"__id__": 7
9
},
"_children": [
{
"__id__": 8
8
"__id__": 8
9
},
{
"__id__": 9
0
"__id__": 9
1
},
{
"__id__": 9
2
"__id__": 9
3
},
{
"__id__": 9
4
"__id__": 9
5
}
],
"_active": false,
"_components": [
{
"__id__": 9
6
"__id__": 9
7
}
],
"_prefab": null,
...
...
@@ -4058,13 +4124,13 @@
"_name": "cover_bg",
"_objFlags": 0,
"_parent": {
"__id__": 8
7
"__id__": 8
8
},
"_children": [],
"_active": true,
"_components": [
{
"__id__":
89
"__id__":
90
}
],
"_prefab": null,
...
...
@@ -4120,7 +4186,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 8
8
"__id__": 8
9
},
"_enabled": true,
"_materials": [
...
...
@@ -4152,13 +4218,13 @@
"_name": "num",
"_objFlags": 0,
"_parent": {
"__id__": 8
7
"__id__": 8
8
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 9
1
"__id__": 9
2
}
],
"_prefab": null,
...
...
@@ -4214,7 +4280,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 9
0
"__id__": 9
1
},
"_enabled": true,
"_materials": [
...
...
@@ -4249,13 +4315,13 @@
"_name": "img_audio_ske",
"_objFlags": 0,
"_parent": {
"__id__": 8
7
"__id__": 8
8
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 9
3
"__id__": 9
4
}
],
"_prefab": null,
...
...
@@ -4311,7 +4377,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 9
2
"__id__": 9
3
},
"_enabled": true,
"_materials": [
...
...
@@ -4351,13 +4417,13 @@
"_name": "title",
"_objFlags": 0,
"_parent": {
"__id__": 8
7
"__id__": 8
8
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 9
5
"__id__": 9
6
}
],
"_prefab": null,
...
...
@@ -4413,7 +4479,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 9
4
"__id__": 9
5
},
"_enabled": true,
"_materials": [
...
...
@@ -4448,7 +4514,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 8
7
"__id__": 8
8
},
"_enabled": true,
"_materials": [
...
...
@@ -4480,13 +4546,13 @@
"_name": "cover",
"_objFlags": 0,
"_parent": {
"__id__": 7
8
"__id__": 7
9
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 9
8
"__id__": 9
9
}
],
"_prefab": null,
...
...
@@ -4542,7 +4608,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 9
7
"__id__": 9
8
},
"_enabled": true,
"_materials": [
...
...
@@ -4574,7 +4640,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 7
8
"__id__": 7
9
},
"_enabled": true,
"_normalMaterial": null,
...
...
@@ -4583,7 +4649,7 @@
"zoomScale": 1.2,
"clickEvents": [
{
"__id__": 10
0
"__id__": 10
1
}
],
"_N$interactable": true,
...
...
@@ -4639,7 +4705,7 @@
"hoverSprite": null,
"_N$disabledSprite": null,
"_N$target": {
"__id__": 7
8
"__id__": 7
9
},
"_id": "3dj3ADC/hLFruCaVj3/4i+"
},
...
...
@@ -4658,7 +4724,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 7
7
"__id__": 7
8
},
"_enabled": true,
"_layoutSize": {
...
...
@@ -4690,7 +4756,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 7
6
"__id__": 7
7
},
"_enabled": true,
"_materials": [
...
...
@@ -4710,7 +4776,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 7
5
"__id__": 7
6
},
"_enabled": true,
"_materials": [
...
...
@@ -4740,7 +4806,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 7
5
"__id__": 7
6
},
"_enabled": true,
"horizontal": false,
...
...
@@ -4752,10 +4818,10 @@
"scrollEvents": [],
"cancelInnerEvents": true,
"_N$content": {
"__id__": 7
7
"__id__": 7
8
},
"content": {
"__id__": 7
7
"__id__": 7
8
},
"_N$horizontalScrollBar": null,
"_N$verticalScrollBar": null,
...
...
@@ -4817,30 +4883,30 @@
"__id__": 6
},
"ProgressBar": {
"__id__":
29
"__id__":
31
},
"playButton": {
"__id__":
38
"__id__":
40
},
"pauseButton": {
"__id__": 4
4
"__id__": 4
6
},
"restartButton": {
"__id__": 5
0
"__id__": 5
2
},
"backButton": null,
"forwardButton": null,
"durationLabel": {
"__id__":
58
"__id__":
60
},
"currentTimeLabel": {
"__id__": 5
4
"__id__": 5
6
},
"barTag": {
"__id__": 3
1
"__id__": 3
3
},
"bar": {
"__id__": 3
0
"__id__": 3
2
},
"_id": "ec0d87qy5Eoavi5EqUiZj3"
}
...
...
assets/dg_video/Scene/dg_video.js
View file @
e81a620b
...
...
@@ -160,10 +160,12 @@ cc.Class({
});
this
.
videoPlayer
.
node
.
on
(
'
meta-loaded
'
,
()
=>
{
console
.
log
(
'
meta-loaded
'
);
cc
.
find
(
`Canvas/bg_video_shadow`
).
active
=
false
;
this
.
_isReadyToPlay
=
true
;
this
.
durationLabel
.
string
=
this
.
formatTime
(
this
.
videoPlayer
.
getDuration
());
this
.
videoPlayer
.
currentTime
=
0
;
// this.videoPlayer.resume();
this
.
videoPlayer
.
play
();
this
.
play
();
});
this
.
videoPlayer
.
node
.
on
(
'
clicked
'
,
()
=>
{
console
.
log
(
'
clicked
'
);
...
...
@@ -306,12 +308,22 @@ cc.Class({
},
// 选择视频播放
async
clickVideoItem
(
evt
)
{
this
.
_isReadyToPlay
=
false
;
const
item
=
evt
.
currentTarget
;
const
item
=
evt
.
currentTarget
;
if
(
!
item
.
video_url
)
{
this
.
showTips
(
"
视频不存在
"
);
this
.
showTips
(
"
视频不存在
"
);
return
;
}
if
(
item
.
video_url
==
this
.
videoPlayer
.
remoteURL
)
{
this
.
showTips
(
"
该视频正在播放
"
);
return
;
}
this
.
_isReadyToPlay
=
false
;
cc
.
find
(
`Canvas/bg`
).
active
=
true
;
cc
.
find
(
`Canvas/bgwhite`
).
active
=
true
;
cc
.
find
(
`Canvas/bg_video_shadow`
).
active
=
true
;
this
.
videoPlayer
.
node
.
x
=
-
5000
;
this
.
videoPlayer
.
node
.
y
=
-
5000
;
cc
.
find
(
`Canvas/videolist/view/content`
).
children
.
forEach
(
row
=>
{
cc
.
find
(
`item_active`
,
row
).
active
=
false
;
});
...
...
@@ -405,16 +417,16 @@ cc.Class({
return
;
}
const
{
width
,
height
}
=
cc
.
find
(
`Canvas/bg`
);
cc
.
find
(
`Canvas/Controls/ProgressBar/text_tips
_left
`
).
active
=
false
;
cc
.
find
(
`Canvas/Controls/ProgressBar/text_tips`
).
active
=
false
;
cc
.
find
(
`Canvas/bg`
).
active
=
false
;
cc
.
find
(
`Canvas/bgwhite`
).
active
=
false
;
cc
.
find
(
`Canvas/bg_
empty
`
).
active
=
false
;
cc
.
find
(
`Canvas/bg_
video_shadow
`
).
active
=
false
;
c
c
.
find
(
'
Canvas/video_node/bg
'
).
width
=
width
;
cc
.
find
(
'
Canvas/video_node/bg
'
).
height
=
height
;
this
.
videoPlayer
.
node
.
x
=
0
;
this
.
videoPlayer
.
node
.
y
=
0
;
// this.videoPlayer.node.active = true
;
c
onst
videoContainer
=
cc
.
find
(
'
Canvas/video_node
'
)
;
cc
.
find
(
'
bg
'
,
videoContainer
).
width
=
width
;
cc
.
find
(
'
bg
'
,
videoContainer
).
height
=
height
;
this
.
videoPlayer
.
node
.
x
=
videoContainer
.
x
;
this
.
videoPlayer
.
node
.
y
=
videoContainer
.
y
;
this
.
videoPlayer
.
play
();
},
pause
(){
...
...
@@ -438,23 +450,41 @@ cc.Class({
time1
:
null
,
isVideoFull
:
false
,
tempPos
:
null
,
fullScreen
()
{
if
(
this
.
isVideoFull
)
{
return
;
}
if
(
!
this
.
_isReadyToPlay
)
{
return
;
}
this
.
tempPos
=
{};
console
.
log
(
"
====进入全屏===
"
);
this
.
isVideoFull
=
true
;
this
.
videoPlayer
.
stayOnBottom
=
true
;
cc
.
find
(
`Canvas/Controls/fullscreen`
).
active
=
!
this
.
isVideoFull
;
cc
.
find
(
`Canvas/Controls/exitfull`
).
active
=
this
.
isVideoFull
;
cc
.
find
(
`Canvas/video_node`
).
width
=
this
.
node
.
width
;
cc
.
find
(
`Canvas/video_node`
).
height
=
this
.
node
.
height
;
cc
.
find
(
`Canvas/bg_empty`
).
width
=
this
.
node
.
width
;
cc
.
find
(
`Canvas/bg_empty`
).
height
=
this
.
node
.
height
;
const
videoContainer
=
cc
.
find
(
'
Canvas/video_node
'
);
this
.
tempPos
.
videoPos
=
{
x
:
videoContainer
.
x
,
y
:
videoContainer
.
y
,
width
:
videoContainer
.
width
,
height
:
videoContainer
.
height
};
videoContainer
.
width
=
this
.
node
.
width
;
videoContainer
.
height
=
this
.
node
.
height
;
videoContainer
.
x
=
0
;
videoContainer
.
y
=
0
;
cc
.
find
(
`Canvas/videolist`
).
active
=
false
;
const
controls
=
cc
.
find
(
`Canvas/Controls`
);
this
.
tempPos
.
controlPos
=
{
x
:
controls
.
x
,
y
:
controls
.
y
};
cc
.
find
(
`bg_video_bottom`
,
controls
).
active
=
false
;
controls
.
x
=
0
;
controls
.
y
=
0
-
this
.
node
.
height
/
2
+
130
;
this
.
videoPlayer
.
node
.
height
=
this
.
node
.
height
;
this
.
videoPlayer
.
node
.
width
=
this
.
node
.
width
;
this
.
videoPlayer
.
node
.
x
=
0
;
this
.
videoPlayer
.
node
.
y
=
0
;
setTimeout
(()
=>
{
// IOS下视频的全屏适配比例有问题,所以做一个计算
this
.
videoPlayer
.
node
.
width
=
Math
.
min
(
this
.
node
.
width
,
this
.
node
.
height
*
16
/
9
);
...
...
@@ -470,19 +500,29 @@ cc.Class({
if
(
!
this
.
isVideoFull
)
{
return
;
}
console
.
log
(
"
====退出全屏===
"
);
console
.
log
(
"
====退出全屏===
"
,
this
.
tempPos
);
this
.
isVideoFull
=
false
;
cc
.
find
(
`Canvas/Controls/fullscreen`
).
active
=
!
this
.
isVideoFull
;
cc
.
find
(
`Canvas/Controls/exitfull`
).
active
=
this
.
isVideoFull
;
cc
.
find
(
`Canvas/video_node`
).
width
=
1377
;
cc
.
find
(
`Canvas/video_node`
).
height
=
775
;
cc
.
find
(
`Canvas/bg_empty`
).
width
=
1377
;
cc
.
find
(
`Canvas/bg_empty`
).
height
=
775
;
const
videoContainer
=
cc
.
find
(
'
Canvas/video_node
'
);
videoContainer
.
width
=
this
.
tempPos
.
videoPos
.
width
;
videoContainer
.
height
=
this
.
tempPos
.
videoPos
.
height
;
videoContainer
.
x
=
this
.
tempPos
.
videoPos
.
x
;
videoContainer
.
y
=
this
.
tempPos
.
videoPos
.
y
;
this
.
videoPlayer
.
node
.
width
=
1377
;
this
.
videoPlayer
.
node
.
height
=
775
;
this
.
videoPlayer
.
node
.
width
=
this
.
tempPos
.
videoPos
.
width
;
this
.
videoPlayer
.
node
.
height
=
this
.
tempPos
.
videoPos
.
height
;
this
.
videoPlayer
.
node
.
x
=
videoContainer
.
x
;
this
.
videoPlayer
.
node
.
y
=
videoContainer
.
y
;
cc
.
find
(
`Canvas/videolist`
).
active
=
true
;
const
controls
=
cc
.
find
(
`Canvas/Controls`
);
cc
.
find
(
`bg_video_bottom`
,
controls
).
active
=
true
;
controls
.
x
=
this
.
tempPos
.
controlPos
.
x
;
controls
.
y
=
this
.
tempPos
.
controlPos
.
y
;
if
(
this
.
time1
)
{
clearTimeout
(
this
.
time1
);
}
...
...
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