Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
ngt_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
ngt_video
Commits
c4902839
Commit
c4902839
authored
Oct 20, 2022
by
liujiangnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 控制条的显隐
parent
1cb849ab
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
258 additions
and
160 deletions
+258
-160
ngt_video.fire
assets/ngt_video/Scene/ngt_video.fire
+219
-148
ngt_video.js
assets/ngt_video/Scene/ngt_video.js
+27
-1
defaultData.js
assets/ngt_video/Script/defaultData.js
+12
-11
No files found.
assets/ngt_video/Scene/ngt_video.fire
View file @
c4902839
...
...
@@ -75,37 +75,37 @@
"__id__": 5
},
{
"__id__": 1
2
"__id__": 1
3
},
{
"__id__": 1
5
"__id__": 1
6
},
{
"__id__": 1
8
"__id__": 1
9
},
{
"__id__": 2
1
"__id__": 2
2
},
{
"__id__": 7
2
"__id__": 7
3
},
{
"__id__": 7
6
"__id__": 7
7
},
{
"__id__": 7
8
"__id__": 7
9
}
],
"_active": true,
"_components": [
{
"__id__": 84
},
{
"__id__": 85
},
{
"__id__": 86
},
{
"__id__": 87
}
],
"_prefab": null,
...
...
@@ -272,7 +272,7 @@
"_active": true,
"_components": [
{
"__id__": 1
1
"__id__": 1
2
}
],
"_prefab": null,
...
...
@@ -459,6 +459,9 @@
"_components": [
{
"__id__": 10
},
{
"__id__": 11
}
],
"_prefab": null,
...
...
@@ -524,11 +527,79 @@
"_mute": false,
"_isFullscreen": false,
"_N$isFullscreen": false,
"_stayOnBottom":
tru
e,
"_stayOnBottom":
fals
e,
"videoPlayerEvent": [],
"_N$keepAspectRatio": true,
"_id": "fce7ZaGl9IwYI1a7QJjapU"
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 9
},
"_enabled": true,
"_normalMaterial": null,
"_grayMaterial": null,
"duration": 0.1,
"zoomScale": 1.2,
"clickEvents": [],
"_N$interactable": true,
"_N$enableAutoGrayEffect": false,
"_N$transition": 0,
"transition": 0,
"_N$normalColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"_N$hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$disabledColor": {
"__type__": "cc.Color",
"r": 124,
"g": 124,
"b": 124,
"a": 255
},
"_N$normalSprite": null,
"_N$pressedSprite": null,
"pressedSprite": null,
"_N$hoverSprite": null,
"hoverSprite": null,
"_N$disabledSprite": null,
"_N$target": null,
"_id": "d0QH9i8cBFT7dTSr564GES"
},
{
"__type__": "cc.Mask",
"_name": "",
...
...
@@ -560,10 +631,10 @@
"_active": true,
"_components": [
{
"__id__": 1
3
"__id__": 1
4
},
{
"__id__": 1
4
"__id__": 1
5
}
],
"_prefab": null,
...
...
@@ -619,7 +690,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
2
"__id__": 1
3
},
"_enabled": false,
"_materials": [
...
...
@@ -651,7 +722,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
2
"__id__": 1
3
},
"_enabled": true,
"alignMode": 1,
...
...
@@ -684,10 +755,10 @@
"_active": true,
"_components": [
{
"__id__": 1
6
"__id__": 1
7
},
{
"__id__": 1
7
"__id__": 1
8
}
],
"_prefab": null,
...
...
@@ -743,7 +814,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
5
"__id__": 1
6
},
"_enabled": true,
"_materials": [
...
...
@@ -775,7 +846,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
5
"__id__": 1
6
},
"_enabled": true,
"alignMode": 1,
...
...
@@ -808,10 +879,10 @@
"_active": true,
"_components": [
{
"__id__":
19
"__id__":
20
},
{
"__id__": 2
0
"__id__": 2
1
}
],
"_prefab": null,
...
...
@@ -867,7 +938,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
8
"__id__": 1
9
},
"_enabled": true,
"_materials": [
...
...
@@ -899,7 +970,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
8
"__id__": 1
9
},
"_enabled": true,
"alignMode": 1,
...
...
@@ -930,19 +1001,19 @@
},
"_children": [
{
"__id__": 2
2
"__id__": 2
3
},
{
"__id__": 6
1
"__id__": 6
2
},
{
"__id__": 6
6
"__id__": 6
7
}
],
"_active": true,
"_components": [
{
"__id__": 7
1
"__id__": 7
2
}
],
"_prefab": null,
...
...
@@ -998,38 +1069,38 @@
"_name": "ProgressBar",
"_objFlags": 0,
"_parent": {
"__id__": 2
1
"__id__": 2
2
},
"_children": [
{
"__id__": 2
3
"__id__": 2
4
},
{
"__id__": 2
8
"__id__": 2
9
},
{
"__id__": 3
5
"__id__": 3
6
},
{
"__id__": 4
2
"__id__": 4
3
},
{
"__id__":
49
"__id__":
50
},
{
"__id__": 5
3
"__id__": 5
4
},
{
"__id__": 5
6
"__id__": 5
7
}
],
"_active": true,
"_components": [
{
"__id__":
59
"__id__":
60
},
{
"__id__": 6
0
"__id__": 6
1
}
],
"_prefab": null,
...
...
@@ -1085,20 +1156,20 @@
"_name": "bar",
"_objFlags": 0,
"_parent": {
"__id__": 2
2
"__id__": 2
3
},
"_children": [
{
"__id__": 2
4
"__id__": 2
5
}
],
"_active": true,
"_components": [
{
"__id__": 2
6
"__id__": 2
7
},
{
"__id__": 2
7
"__id__": 2
8
}
],
"_prefab": null,
...
...
@@ -1154,13 +1225,13 @@
"_name": "bar_tag",
"_objFlags": 0,
"_parent": {
"__id__": 2
3
"__id__": 2
4
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 2
5
"__id__": 2
6
}
],
"_prefab": null,
...
...
@@ -1216,7 +1287,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
4
"__id__": 2
5
},
"_enabled": true,
"_materials": [
...
...
@@ -1248,7 +1319,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
3
"__id__": 2
4
},
"_enabled": true,
"_materials": [
...
...
@@ -1280,7 +1351,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
3
"__id__": 2
4
},
"_enabled": true,
"alignMode": 1,
...
...
@@ -1307,20 +1378,20 @@
"_name": "Play",
"_objFlags": 0,
"_parent": {
"__id__": 2
2
"__id__": 2
3
},
"_children": [
{
"__id__":
29
"__id__":
30
}
],
"_active": true,
"_components": [
{
"__id__": 3
2
"__id__": 3
3
},
{
"__id__": 3
4
"__id__": 3
5
}
],
"_prefab": null,
...
...
@@ -1376,16 +1447,16 @@
"_name": "Background",
"_objFlags": 512,
"_parent": {
"__id__": 2
8
"__id__": 2
9
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 3
0
"__id__": 3
1
},
{
"__id__": 3
1
"__id__": 3
2
}
],
"_prefab": null,
...
...
@@ -1441,7 +1512,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
29
"__id__":
30
},
"_enabled": true,
"_materials": [
...
...
@@ -1473,7 +1544,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
29
"__id__":
30
},
"_enabled": true,
"alignMode": 0,
...
...
@@ -1500,7 +1571,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
8
"__id__": 2
9
},
"_enabled": true,
"_normalMaterial": null,
...
...
@@ -1509,7 +1580,7 @@
"zoomScale": 1.2,
"clickEvents": [
{
"__id__": 3
3
"__id__": 3
4
}
],
"_N$interactable": true,
...
...
@@ -1575,7 +1646,7 @@
"__uuid__": "29158224-f8dd-4661-a796-1ffab537140e"
},
"_N$target": {
"__id__":
29
"__id__":
30
},
"_id": "a8bWaLdnFKA5ITxJunB2R2"
},
...
...
@@ -1594,7 +1665,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
8
"__id__": 2
9
},
"_enabled": true,
"alignMode": 1,
...
...
@@ -1621,20 +1692,20 @@
"_name": "Pause",
"_objFlags": 0,
"_parent": {
"__id__": 2
2
"__id__": 2
3
},
"_children": [
{
"__id__": 3
6
"__id__": 3
7
}
],
"_active": false,
"_components": [
{
"__id__":
39
"__id__":
40
},
{
"__id__": 4
1
"__id__": 4
2
}
],
"_prefab": null,
...
...
@@ -1690,16 +1761,16 @@
"_name": "Background",
"_objFlags": 512,
"_parent": {
"__id__": 3
5
"__id__": 3
6
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 3
7
"__id__": 3
8
},
{
"__id__": 3
8
"__id__": 3
9
}
],
"_prefab": null,
...
...
@@ -1755,7 +1826,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 3
6
"__id__": 3
7
},
"_enabled": true,
"_materials": [
...
...
@@ -1787,7 +1858,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 3
6
"__id__": 3
7
},
"_enabled": true,
"alignMode": 0,
...
...
@@ -1814,7 +1885,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 3
5
"__id__": 3
6
},
"_enabled": true,
"_normalMaterial": null,
...
...
@@ -1823,7 +1894,7 @@
"zoomScale": 1.2,
"clickEvents": [
{
"__id__": 4
0
"__id__": 4
1
}
],
"_N$interactable": true,
...
...
@@ -1879,7 +1950,7 @@
"hoverSprite": null,
"_N$disabledSprite": null,
"_N$target": {
"__id__": 3
6
"__id__": 3
7
},
"_id": "94dhG7VhpIZZJp5e+IJuYc"
},
...
...
@@ -1898,7 +1969,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 3
5
"__id__": 3
6
},
"_enabled": true,
"alignMode": 1,
...
...
@@ -1925,20 +1996,20 @@
"_name": "Restart",
"_objFlags": 0,
"_parent": {
"__id__": 2
2
"__id__": 2
3
},
"_children": [
{
"__id__": 4
3
"__id__": 4
4
}
],
"_active": false,
"_components": [
{
"__id__": 4
6
"__id__": 4
7
},
{
"__id__": 4
8
"__id__": 4
9
}
],
"_prefab": null,
...
...
@@ -1994,16 +2065,16 @@
"_name": "Background",
"_objFlags": 512,
"_parent": {
"__id__": 4
2
"__id__": 4
3
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 4
4
"__id__": 4
5
},
{
"__id__": 4
5
"__id__": 4
6
}
],
"_prefab": null,
...
...
@@ -2059,7 +2130,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 4
3
"__id__": 4
4
},
"_enabled": true,
"_materials": [
...
...
@@ -2091,7 +2162,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 4
3
"__id__": 4
4
},
"_enabled": true,
"alignMode": 0,
...
...
@@ -2118,7 +2189,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 4
2
"__id__": 4
3
},
"_enabled": true,
"_normalMaterial": null,
...
...
@@ -2127,7 +2198,7 @@
"zoomScale": 1.2,
"clickEvents": [
{
"__id__": 4
7
"__id__": 4
8
}
],
"_N$interactable": true,
...
...
@@ -2183,7 +2254,7 @@
"hoverSprite": null,
"_N$disabledSprite": null,
"_N$target": {
"__id__": 4
3
"__id__": 4
4
},
"_id": "23rFQGz+tCTpq6+bq4cJzR"
},
...
...
@@ -2202,7 +2273,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 4
2
"__id__": 4
3
},
"_enabled": true,
"alignMode": 1,
...
...
@@ -2229,19 +2300,19 @@
"_name": "CurrentLabel",
"_objFlags": 0,
"_parent": {
"__id__": 2
2
"__id__": 2
3
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 50
},
{
"__id__": 51
},
{
"__id__": 52
},
{
"__id__": 53
}
],
"_prefab": null,
...
...
@@ -2297,7 +2368,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
49
"__id__":
50
},
"_enabled": true,
"_materials": [
...
...
@@ -2332,7 +2403,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
49
"__id__":
50
},
"_enabled": false,
"_color": {
...
...
@@ -2350,7 +2421,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
49
"__id__":
50
},
"_enabled": true,
"alignMode": 1,
...
...
@@ -2377,16 +2448,16 @@
"_name": "TimeLabel",
"_objFlags": 0,
"_parent": {
"__id__": 2
2
"__id__": 2
3
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 5
4
"__id__": 5
5
},
{
"__id__": 5
5
"__id__": 5
6
}
],
"_prefab": null,
...
...
@@ -2442,7 +2513,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 5
3
"__id__": 5
4
},
"_enabled": true,
"_materials": [
...
...
@@ -2477,7 +2548,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 5
3
"__id__": 5
4
},
"_enabled": true,
"alignMode": 1,
...
...
@@ -2504,16 +2575,16 @@
"_name": "text_tips_left",
"_objFlags": 0,
"_parent": {
"__id__": 2
2
"__id__": 2
3
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 5
7
"__id__": 5
8
},
{
"__id__": 5
8
"__id__": 5
9
}
],
"_prefab": null,
...
...
@@ -2569,7 +2640,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 5
6
"__id__": 5
7
},
"_enabled": true,
"_materials": [
...
...
@@ -2601,7 +2672,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 5
6
"__id__": 5
7
},
"_enabled": true,
"alignMode": 1,
...
...
@@ -2628,7 +2699,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
2
"__id__": 2
3
},
"_enabled": true,
"_materials": [
...
...
@@ -2660,7 +2731,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
2
"__id__": 2
3
},
"_enabled": true,
"alignMode": 1,
...
...
@@ -2687,19 +2758,19 @@
"_name": "fullscreen",
"_objFlags": 0,
"_parent": {
"__id__": 2
1
"__id__": 2
2
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 62
},
{
"__id__": 63
},
{
"__id__": 64
},
{
"__id__": 65
}
],
"_prefab": null,
...
...
@@ -2755,7 +2826,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 6
1
"__id__": 6
2
},
"_enabled": true,
"_materials": [
...
...
@@ -2787,7 +2858,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 6
1
"__id__": 6
2
},
"_enabled": true,
"alignMode": 1,
...
...
@@ -2814,7 +2885,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 6
1
"__id__": 6
2
},
"_enabled": true,
"_normalMaterial": null,
...
...
@@ -2823,7 +2894,7 @@
"zoomScale": 1.2,
"clickEvents": [
{
"__id__": 6
5
"__id__": 6
6
}
],
"_N$interactable": true,
...
...
@@ -2896,19 +2967,19 @@
"_name": "exitfull",
"_objFlags": 0,
"_parent": {
"__id__": 2
1
"__id__": 2
2
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 67
},
{
"__id__": 68
},
{
"__id__": 69
},
{
"__id__": 70
}
],
"_prefab": null,
...
...
@@ -2964,7 +3035,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 6
6
"__id__": 6
7
},
"_enabled": true,
"_materials": [
...
...
@@ -2996,7 +3067,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 6
6
"__id__": 6
7
},
"_enabled": true,
"alignMode": 1,
...
...
@@ -3023,7 +3094,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 6
6
"__id__": 6
7
},
"_enabled": true,
"_normalMaterial": null,
...
...
@@ -3032,7 +3103,7 @@
"zoomScale": 1.2,
"clickEvents": [
{
"__id__": 7
0
"__id__": 7
1
}
],
"_N$interactable": true,
...
...
@@ -3105,7 +3176,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
1
"__id__": 2
2
},
"_enabled": true,
"alignMode": 1,
...
...
@@ -3137,14 +3208,14 @@
"_children": [],
"_active": false,
"_components": [
{
"__id__": 73
},
{
"__id__": 74
},
{
"__id__": 75
},
{
"__id__": 76
}
],
"_prefab": null,
...
...
@@ -3200,7 +3271,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 7
2
"__id__": 7
3
},
"_enabled": true,
"_materials": [
...
...
@@ -3232,7 +3303,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 7
2
"__id__": 7
3
},
"_enabled": true,
"alignMode": 1,
...
...
@@ -3259,7 +3330,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 7
2
"__id__": 7
3
},
"_enabled": true,
"_id": "beaGv1g0JBZ59RUOJpzt0W"
...
...
@@ -3275,7 +3346,7 @@
"_active": false,
"_components": [
{
"__id__": 7
7
"__id__": 7
8
}
],
"_prefab": null,
...
...
@@ -3331,7 +3402,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 7
6
"__id__": 7
7
},
"_enabled": true,
"alignMode": 1,
...
...
@@ -3362,16 +3433,16 @@
},
"_children": [
{
"__id__":
79
"__id__":
80
}
],
"_active": true,
"_components": [
{
"__id__": 8
2
"__id__": 8
3
},
{
"__id__": 8
3
"__id__": 8
4
}
],
"_prefab": null,
...
...
@@ -3427,16 +3498,16 @@
"_name": "title",
"_objFlags": 0,
"_parent": {
"__id__": 7
8
"__id__": 7
9
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 8
0
"__id__": 8
1
},
{
"__id__": 8
1
"__id__": 8
2
}
],
"_prefab": null,
...
...
@@ -3492,7 +3563,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
79
"__id__":
80
},
"_enabled": true,
"_materials": [
...
...
@@ -3527,7 +3598,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
79
"__id__":
80
},
"_enabled": true,
"alignMode": 1,
...
...
@@ -3554,7 +3625,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 7
8
"__id__": 7
9
},
"_enabled": true,
"_materials": [
...
...
@@ -3586,7 +3657,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 7
8
"__id__": 7
9
},
"_enabled": true,
"alignMode": 1,
...
...
@@ -3664,30 +3735,30 @@
"__id__": 10
},
"ProgressBar": {
"__id__": 2
2
"__id__": 2
3
},
"playButton": {
"__id__": 3
2
"__id__": 3
3
},
"pauseButton": {
"__id__":
39
"__id__":
40
},
"restartButton": {
"__id__": 4
6
"__id__": 4
7
},
"backButton": null,
"forwardButton": null,
"durationLabel": {
"__id__": 5
4
"__id__": 5
5
},
"currentTimeLabel": {
"__id__": 5
0
"__id__": 5
1
},
"barTag": {
"__id__": 2
4
"__id__": 2
5
},
"bar": {
"__id__": 2
3
"__id__": 2
4
},
"_id": "ec0d87qy5Eoavi5EqUiZj3"
}
...
...
assets/ngt_video/Scene/ngt_video.js
View file @
c4902839
...
...
@@ -176,6 +176,17 @@ cc.Class({
});
this
.
videoPlayer
.
node
.
on
(
'
clicked
'
,
()
=>
{
console
.
log
(
'
clicked
'
);
if
(
this
.
isVideoFull
)
{
this
.
videoPlayer
.
stayOnBottom
=
true
;
cc
.
find
(
`Canvas/Controls`
).
active
=
true
;
if
(
this
.
time1
)
{
clearTimeout
(
this
.
time1
);
}
this
.
time1
=
setTimeout
(()
=>
{
this
.
videoPlayer
.
stayOnBottom
=
false
;
cc
.
find
(
`Canvas/Controls`
).
active
=
false
;
},
6000
);
}
});
this
.
videoPlayer
.
node
.
on
(
'
playing
'
,
()
=>
{
console
.
log
(
'
playing
'
);
...
...
@@ -268,7 +279,7 @@ cc.Class({
});
this
.
videoPlayer
.
node
.
off
(
cc
.
Node
.
EventType
.
TOUCH_START
);
this
.
videoPlayer
.
node
.
on
(
cc
.
Node
.
EventType
.
TOUCH_START
,
(
e
)
=>
{
console
.
log
(
"
screen TOUCH_START
"
);
console
.
log
(
"
screen TOUCH_START
"
);
this
.
triggerInteractive
()
});
const
pgBar
=
this
.
ProgressBar
;
...
...
@@ -465,6 +476,7 @@ cc.Class({
cc
.
audioEngine
.
playEffect
(
audio
.
clip
,
false
);
},
time1
:
null
,
isVideoFull
:
false
,
fullScreen
()
{
if
(
this
.
isVideoFull
)
{
...
...
@@ -472,6 +484,7 @@ cc.Class({
}
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
;
...
...
@@ -482,6 +495,11 @@ cc.Class({
this
.
videoPlayer
.
node
.
width
=
this
.
node
.
width
;
this
.
videoPlayer
.
node
.
height
=
this
.
node
.
height
;
this
.
time1
=
setTimeout
(()
=>
{
this
.
videoPlayer
.
stayOnBottom
=
false
;
cc
.
find
(
`Canvas/Controls`
).
active
=
false
;
},
3000
);
},
exitFullScreen
()
{
...
...
@@ -500,8 +518,16 @@ cc.Class({
this
.
videoPlayer
.
node
.
width
=
1377
;
this
.
videoPlayer
.
node
.
height
=
775
;
if
(
this
.
time1
)
{
clearTimeout
(
this
.
time1
);
}
},
onDestroy
()
{
if
(
this
.
time1
)
{
clearTimeout
(
this
.
time1
);
}
},
// called every frame
update
:
function
(
dt
)
{
...
...
assets/ngt_video/Script/defaultData.js
View file @
c4902839
export
const
defaultData
=
{
"
title
"
:
"
Hello Apples
"
,
"
tipSwitch
"
:
0
,
"
audio
"
:
"
http
s://staging-teach.cdn.ireadabc.com/c03129693e6cabf061661fba349fa031
.mp3
"
,
"
title
"
:
"
Look,count and say and.
"
,
"
tipSwitch
"
:
"
1
"
,
"
audio
"
:
"
http
://staging-teach.cdn.ireadabc.com/af5208a0e0d869f6be410c46e50bb501_l
.mp3
"
,
"
imgAni
"
:
{
"
ske
"
:
{
"
url
"
:
"
http
s://teach.cdn.ireadabc.com/e13afca23d37ba33489c0aaa61a515f5
.json
"
,
"
name
"
:
"
川阅阅
_ske.json
"
"
url
"
:
"
http
://staging-teach.cdn.ireadabc.com/a7dc36aa85121807bb7e049642192cec
.json
"
,
"
name
"
:
"
niao
_ske.json
"
},
"
tex
"
:
{
"
url
"
:
"
http
s://teach.cdn.ireadabc.com/7afcddbb7f0127613059e574638a9f3e
.json
"
,
"
name
"
:
"
川阅阅
_tex.json
"
"
url
"
:
"
http
://staging-teach.cdn.ireadabc.com/c635daaa86b4c5c39f4af88e826d3433
.json
"
,
"
name
"
:
"
niao
_tex.json
"
},
"
png
"
:
{
"
url
"
:
"
http
s://teach.cdn.ireadabc.com/63699fcef6053eef4f58b89dad35af0b
.png
"
,
"
name
"
:
"
川阅阅
_tex.png
"
"
url
"
:
"
http
://staging-teach.cdn.ireadabc.com/75c87beb2b7d79033ace8978edc91a12
.png
"
,
"
name
"
:
"
niao
_tex.png
"
}
},
"
video_url
"
:
"
http://staging-teach.cdn.ireadabc.com/1dde63cee33e4445fbab13297479e733.mp4
"
}
\ No newline at end of file
"
video_url
"
:
"
http://staging-teach.cdn.ireadabc.com/c8b49f6f032bd91a637df072c01ccaf7.mp4
"
,
"
audioName
"
:
""
};
\ No newline at end of file
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