Commit 121122e9 authored by 李维's avatar 李维

优化全屏进度条

parent ada264be
......@@ -93,31 +93,31 @@
"__id__": 81
},
{
"__id__": 121
"__id__": 133
},
{
"__id__": 159
"__id__": 171
},
{
"__id__": 170
"__id__": 182
},
{
"__id__": 173
"__id__": 185
},
{
"__id__": 175
"__id__": 187
}
],
"_active": true,
"_components": [
{
"__id__": 177
"__id__": 189
},
{
"__id__": 178
"__id__": 190
},
{
"__id__": 179
"__id__": 191
}
],
"_prefab": null,
......@@ -3632,10 +3632,10 @@
"_active": true,
"_components": [
{
"__id__": 119
"__id__": 131
},
{
"__id__": 120
"__id__": 132
}
],
"_prefab": null,
......@@ -3661,7 +3661,7 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
-9000,
0,
0,
0,
......@@ -3719,7 +3719,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 1920,
"height": 100
"height": 150
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -3731,7 +3731,7 @@
"ctor": "Float64Array",
"array": [
0,
490,
465,
0,
0,
0,
......@@ -3784,7 +3784,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 1920,
"height": 100
"height": 150
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -3915,7 +3915,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 300,
"height": 100
"height": 150
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -3926,7 +3926,7 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-760,
-710,
0,
0,
0,
......@@ -4236,7 +4236,7 @@
"_layoutSize": {
"__type__": "cc.Size",
"width": 300,
"height": 100
"height": 150
},
"_resize": 0,
"_N$layoutType": 1,
......@@ -4268,7 +4268,7 @@
"alignMode": 1,
"_target": null,
"_alignFlags": 9,
"_left": 50,
"_left": 100,
"_right": 810,
"_top": 0,
"_bottom": 0,
......@@ -4327,12 +4327,15 @@
},
{
"__id__": 111
},
{
"__id__": 123
}
],
"_active": true,
"_components": [
{
"__id__": 118
"__id__": 130
}
],
"_prefab": null,
......@@ -4347,7 +4350,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 1920,
"height": 100
"height": 150
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -4359,7 +4362,7 @@
"ctor": "Float64Array",
"array": [
0,
-490,
-465,
0,
0,
0,
......@@ -4412,7 +4415,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 1920,
"height": 100
"height": 150
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -4543,7 +4546,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 95,
"height": 100
"height": 150
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -4554,7 +4557,7 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-910,
-860,
0,
0,
0,
......@@ -4948,7 +4951,7 @@
"_layoutSize": {
"__type__": "cc.Size",
"width": 95,
"height": 100
"height": 150
},
"_resize": 1,
"_N$layoutType": 1,
......@@ -4980,7 +4983,7 @@
"alignMode": 1,
"_target": null,
"_alignFlags": 12,
"_left": 50,
"_left": 100,
"_right": 0,
"_top": 0,
"_bottom": 0,
......@@ -4998,7 +5001,7 @@
},
{
"__type__": "cc.Node",
"_name": "right",
"_name": "center",
"_objFlags": 0,
"_parent": {
"__id__": 96
......@@ -5009,14 +5012,81 @@
}
],
"_active": true,
"_components": [
"_components": [],
"_prefab": null,
"_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,
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": "1cLkEshexGNadHvt7m/VPK"
},
{
"__type__": "cc.Node",
"_name": "progress",
"_objFlags": 0,
"_parent": {
"__id__": 111
},
"_children": [
{
"__id__": 116
"__id__": 113
},
{
"__id__": 115
},
{
"__id__": 117
},
{
"__id__": 119
},
{
"__id__": 121
}
],
"_active": true,
"_components": [],
"_prefab": null,
"_opacity": 255,
"_color": {
......@@ -5028,19 +5098,19 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 56,
"height": 100
"width": 0,
"height": 0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0,
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
853,
0,
0,
0,
0,
......@@ -5063,27 +5133,24 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "aaxi5jM7NIlZlLmcR+KTYG"
"_id": "7dnOlEqHdEJ5wIPY2f5nWj"
},
{
"__type__": "cc.Node",
"_name": "btn_exit_fullscreen",
"_name": "bg",
"_objFlags": 0,
"_parent": {
"__id__": 111
"__id__": 112
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 113
},
{
"__id__": 114
}
],
"_prefab": null,
"_opacity": 255,
"_opacity": 220,
"_color": {
"__type__": "cc.Color",
"r": 255,
......@@ -5093,12 +5160,12 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 56,
"height": 57
"width": 800,
"height": 15
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0,
"x": 0.5,
"y": 0.5
},
"_trs": {
......@@ -5128,14 +5195,14 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "27hF0adqNBH71Crh0MdxJi"
"_id": "6cyi+d5J1B6p6bEdFNEdWq"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 112
"__id__": 113
},
"_enabled": true,
"_materials": [
......@@ -5146,10 +5213,10 @@
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "ece9ff2a-0eed-41cc-acc9-a6253b0dec64"
"__uuid__": "a23235d1-15db-4b95-8439-a2e005bfff91"
},
"_type": 0,
"_sizeMode": 1,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
......@@ -5160,130 +5227,674 @@
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "07modpeilKXZ0Vu19br3/c"
"_id": "69GyIqVfhBcaPgsT8XVo5S"
},
{
"__type__": "cc.Button",
"_name": "",
"__type__": "cc.Node",
"_name": "current_bg",
"_objFlags": 0,
"node": {
"_parent": {
"__id__": 112
},
"_enabled": true,
"_normalMaterial": null,
"_grayMaterial": null,
"duration": 0.1,
"zoomScale": 1.2,
"clickEvents": [
"_children": [],
"_active": true,
"_components": [
{
"__id__": 115
"__id__": 116
}
],
"_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": {
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"r": 0,
"g": 161,
"b": 214,
"a": 255
},
"hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
"_contentSize": {
"__type__": "cc.Size",
"width": 400,
"height": 15
},
"_N$disabledColor": {
"__type__": "cc.Color",
"r": 124,
"g": 124,
"b": 124,
"a": 255
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0.5
},
"_N$normalSprite": null,
"_N$pressedSprite": null,
"pressedSprite": null,
"_N$hoverSprite": null,
"hoverSprite": null,
"_N$disabledSprite": null,
"_N$target": null,
"_id": "4e+DBKHEJBhoyAGe74ljdw"
},
{
"__type__": "cc.ClickEvent",
"target": {
"__id__": 81
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-400,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"component": "",
"_componentId": "b725dcISF1EWaft2PrOCwvR",
"handler": "onExitFullscreenClick",
"customEventData": ""
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 111
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 36,
"_left": 0,
"_right": 51,
"_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": "baRZKS+JFBO6bmhHD8S3UY"
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "bcqyPfPx1BUYIDOwsCap2R"
},
{
"__type__": "cc.Layout",
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 111
"__id__": 115
},
"_enabled": true,
"_layoutSize": {
"__type__": "cc.Size",
"width": 56,
"height": 100
},
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "a23235d1-15db-4b95-8439-a2e005bfff91"
},
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "bbpU8EzbtPE4y5gEX1B9iD"
},
{
"__type__": "cc.Node",
"_name": "dot",
"_objFlags": 0,
"_parent": {
"__id__": 112
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 118
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 32,
"height": 32
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1.5,
1.5,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "83FquatsBGorAwtr/InwlP"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 117
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 1,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "ecafbd46-ac07-42d6-9ce3-d0e67da4e817"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "6fiDKH70xHJpd/wp/ku4tC"
},
{
"__type__": "cc.Node",
"_name": "time_s",
"_objFlags": 0,
"_parent": {
"__id__": 112
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 120
}
],
"_prefab": null,
"_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": [
-500,
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": "8c+2MmhjRI/6EaH5+aGQBP"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 119
},
"_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": "7e0xElRUZDsYKJQ5/bbkmB"
},
{
"__type__": "cc.Node",
"_name": "time_e",
"_objFlags": 0,
"_parent": {
"__id__": 112
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 122
}
],
"_prefab": null,
"_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": [
500,
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": "114wmYhS5IOZY20flgnFFn"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 121
},
"_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": "d1Wa8aW/1CoZJXj7YLyfC6"
},
{
"__type__": "cc.Node",
"_name": "right",
"_objFlags": 0,
"_parent": {
"__id__": 96
},
"_children": [
{
"__id__": 124
}
],
"_active": true,
"_components": [
{
"__id__": 128
},
{
"__id__": 129
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 56,
"height": 150
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
804,
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": "aaxi5jM7NIlZlLmcR+KTYG"
},
{
"__type__": "cc.Node",
"_name": "btn_exit_fullscreen",
"_objFlags": 0,
"_parent": {
"__id__": 123
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 125
},
{
"__id__": 126
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 56,
"height": 57
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
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": "27hF0adqNBH71Crh0MdxJi"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 124
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "ece9ff2a-0eed-41cc-acc9-a6253b0dec64"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "07modpeilKXZ0Vu19br3/c"
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 124
},
"_enabled": true,
"_normalMaterial": null,
"_grayMaterial": null,
"duration": 0.1,
"zoomScale": 1.2,
"clickEvents": [
{
"__id__": 127
}
],
"_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": "4e+DBKHEJBhoyAGe74ljdw"
},
{
"__type__": "cc.ClickEvent",
"target": {
"__id__": 81
},
"component": "",
"_componentId": "b725dcISF1EWaft2PrOCwvR",
"handler": "onExitFullscreenClick",
"customEventData": ""
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 123
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 36,
"_left": 0,
"_right": 100,
"_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": "baRZKS+JFBO6bmhHD8S3UY"
},
{
"__type__": "cc.Layout",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 123
},
"_enabled": true,
"_layoutSize": {
"__type__": "cc.Size",
"width": 56,
"height": 150
},
"_resize": 1,
"_N$layoutType": 1,
"_N$cellSize": {
......@@ -5341,8 +5952,8 @@
"alignMode": 1,
"_target": null,
"_alignFlags": 45,
"_left": 0,
"_right": 0,
"_left": -9000,
"_right": 9000,
"_top": 0,
"_bottom": 0,
"_verticalCenter": 0,
......@@ -5372,12 +5983,27 @@
"__id__": 105
},
"btn_fullscreen": {
"__id__": 112
"__id__": 124
},
"btn_exit_fullscreen": null,
"label_title": {
"__id__": 91
},
"progressBg": {
"__id__": 113
},
"progressCurrent": {
"__id__": 115
},
"progressDot": {
"__id__": 117
},
"startTime": {
"__id__": 119
},
"endTime": {
"__id__": 121
},
"_id": "31vAPhl1xCbb7SgXfkJ5yi"
},
{
......@@ -5389,16 +6015,16 @@
},
"_children": [
{
"__id__": 122
"__id__": 134
}
],
"_active": true,
"_components": [
{
"__id__": 157
"__id__": 169
},
{
"__id__": 158
"__id__": 170
}
],
"_prefab": null,
......@@ -5454,17 +6080,17 @@
"_name": "view",
"_objFlags": 0,
"_parent": {
"__id__": 121
"__id__": 133
},
"_children": [
{
"__id__": 123
"__id__": 135
}
],
"_active": true,
"_components": [
{
"__id__": 156
"__id__": 168
}
],
"_prefab": null,
......@@ -5520,17 +6146,17 @@
"_name": "content",
"_objFlags": 0,
"_parent": {
"__id__": 122
"__id__": 134
},
"_children": [
{
"__id__": 124
"__id__": 136
}
],
"_active": true,
"_components": [
{
"__id__": 155
"__id__": 167
}
],
"_prefab": null,
......@@ -5586,20 +6212,20 @@
"_name": "item",
"_objFlags": 0,
"_parent": {
"__id__": 123
"__id__": 135
},
"_children": [
{
"__id__": 125
"__id__": 137
},
{
"__id__": 139
"__id__": 151
}
],
"_active": false,
"_components": [
{
"__id__": 153
"__id__": 165
}
],
"_prefab": null,
......@@ -5655,29 +6281,29 @@
"_name": "item",
"_objFlags": 0,
"_parent": {
"__id__": 124
"__id__": 136
},
"_children": [
{
"__id__": 126
"__id__": 138
},
{
"__id__": 128
"__id__": 140
},
{
"__id__": 132
"__id__": 144
},
{
"__id__": 134
"__id__": 146
},
{
"__id__": 136
"__id__": 148
}
],
"_active": true,
"_components": [
{
"__id__": 138
"__id__": 150
}
],
"_prefab": null,
......@@ -5733,13 +6359,13 @@
"_name": "cover_bg",
"_objFlags": 0,
"_parent": {
"__id__": 125
"__id__": 137
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 127
"__id__": 139
}
],
"_prefab": null,
......@@ -5795,7 +6421,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 126
"__id__": 138
},
"_enabled": true,
"_materials": [
......@@ -5827,17 +6453,17 @@
"_name": "mask",
"_objFlags": 0,
"_parent": {
"__id__": 125
"__id__": 137
},
"_children": [
{
"__id__": 129
"__id__": 141
}
],
"_active": true,
"_components": [
{
"__id__": 131
"__id__": 143
}
],
"_prefab": null,
......@@ -5893,13 +6519,13 @@
"_name": "cover",
"_objFlags": 0,
"_parent": {
"__id__": 128
"__id__": 140
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 130
"__id__": 142
}
],
"_prefab": null,
......@@ -5955,7 +6581,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 129
"__id__": 141
},
"_enabled": true,
"_materials": [
......@@ -5987,7 +6613,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 128
"__id__": 140
},
"_enabled": true,
"_materials": [
......@@ -6009,13 +6635,13 @@
"_name": "num",
"_objFlags": 0,
"_parent": {
"__id__": 125
"__id__": 137
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 133
"__id__": 145
}
],
"_prefab": null,
......@@ -6071,7 +6697,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 132
"__id__": 144
},
"_enabled": true,
"_materials": [
......@@ -6106,13 +6732,13 @@
"_name": "title",
"_objFlags": 0,
"_parent": {
"__id__": 125
"__id__": 137
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 135
"__id__": 147
}
],
"_prefab": null,
......@@ -6168,7 +6794,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 134
"__id__": 146
},
"_enabled": true,
"_materials": [
......@@ -6201,13 +6827,13 @@
"_name": "color",
"_objFlags": 0,
"_parent": {
"__id__": 125
"__id__": 137
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 137
"__id__": 149
}
],
"_prefab": null,
......@@ -6263,7 +6889,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 136
"__id__": 148
},
"_enabled": true,
"_materials": [],
......@@ -6291,7 +6917,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 125
"__id__": 137
},
"_enabled": true,
"_materials": [
......@@ -6323,29 +6949,29 @@
"_name": "item_active",
"_objFlags": 0,
"_parent": {
"__id__": 124
"__id__": 136
},
"_children": [
{
"__id__": 140
"__id__": 152
},
{
"__id__": 142
"__id__": 154
},
{
"__id__": 144
"__id__": 156
},
{
"__id__": 146
"__id__": 158
},
{
"__id__": 150
"__id__": 162
}
],
"_active": false,
"_components": [
{
"__id__": 152
"__id__": 164
}
],
"_prefab": null,
......@@ -6401,13 +7027,13 @@
"_name": "cover_bg",
"_objFlags": 0,
"_parent": {
"__id__": 139
"__id__": 151
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 141
"__id__": 153
}
],
"_prefab": null,
......@@ -6463,7 +7089,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 140
"__id__": 152
},
"_enabled": true,
"_materials": [
......@@ -6495,13 +7121,13 @@
"_name": "num",
"_objFlags": 0,
"_parent": {
"__id__": 139
"__id__": 151
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 143
"__id__": 155
}
],
"_prefab": null,
......@@ -6557,7 +7183,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 142
"__id__": 154
},
"_enabled": true,
"_materials": [
......@@ -6592,13 +7218,13 @@
"_name": "img_audio_ske",
"_objFlags": 0,
"_parent": {
"__id__": 139
"__id__": 151
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 145
"__id__": 157
}
],
"_prefab": null,
......@@ -6654,7 +7280,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 144
"__id__": 156
},
"_enabled": true,
"_materials": [
......@@ -6694,17 +7320,17 @@
"_name": "mask",
"_objFlags": 0,
"_parent": {
"__id__": 139
"__id__": 151
},
"_children": [
{
"__id__": 147
"__id__": 159
}
],
"_active": true,
"_components": [
{
"__id__": 149
"__id__": 161
}
],
"_prefab": null,
......@@ -6760,13 +7386,13 @@
"_name": "cover",
"_objFlags": 0,
"_parent": {
"__id__": 146
"__id__": 158
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 148
"__id__": 160
}
],
"_prefab": null,
......@@ -6822,7 +7448,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 147
"__id__": 159
},
"_enabled": true,
"_materials": [
......@@ -6854,7 +7480,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 146
"__id__": 158
},
"_enabled": true,
"_materials": [
......@@ -6876,13 +7502,13 @@
"_name": "title",
"_objFlags": 0,
"_parent": {
"__id__": 139
"__id__": 151
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 151
"__id__": 163
}
],
"_prefab": null,
......@@ -6938,7 +7564,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 150
"__id__": 162
},
"_enabled": true,
"_materials": [
......@@ -6971,7 +7597,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 139
"__id__": 151
},
"_enabled": true,
"_materials": [
......@@ -7003,7 +7629,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 124
"__id__": 136
},
"_enabled": true,
"_normalMaterial": null,
......@@ -7012,7 +7638,7 @@
"zoomScale": 1.2,
"clickEvents": [
{
"__id__": 154
"__id__": 166
}
],
"_N$interactable": true,
......@@ -7068,7 +7694,7 @@
"hoverSprite": null,
"_N$disabledSprite": null,
"_N$target": {
"__id__": 124
"__id__": 136
},
"_id": "7aTx3B2HJO6oViYBGBm/73"
},
......@@ -7087,7 +7713,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 123
"__id__": 135
},
"_enabled": true,
"_layoutSize": {
......@@ -7119,7 +7745,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 122
"__id__": 134
},
"_enabled": true,
"_materials": [
......@@ -7139,7 +7765,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 121
"__id__": 133
},
"_enabled": true,
"_materials": [
......@@ -7169,7 +7795,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 121
"__id__": 133
},
"_enabled": true,
"horizontal": true,
......@@ -7181,10 +7807,10 @@
"scrollEvents": [],
"cancelInnerEvents": true,
"_N$content": {
"__id__": 123
"__id__": 135
},
"content": {
"__id__": 123
"__id__": 135
},
"_N$horizontalScrollBar": null,
"_N$verticalScrollBar": null,
......@@ -7199,10 +7825,10 @@
},
"_children": [
{
"__id__": 160
"__id__": 172
},
{
"__id__": 165
"__id__": 177
}
],
"_active": true,
......@@ -7260,19 +7886,19 @@
"_name": "btn_last",
"_objFlags": 0,
"_parent": {
"__id__": 159
"__id__": 171
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 161
"__id__": 173
},
{
"__id__": 162
"__id__": 174
},
{
"__id__": 164
"__id__": 176
}
],
"_prefab": null,
......@@ -7328,7 +7954,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 160
"__id__": 172
},
"_enabled": true,
"_materials": [
......@@ -7360,7 +7986,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 160
"__id__": 172
},
"_enabled": true,
"_normalMaterial": null,
......@@ -7369,7 +7995,7 @@
"zoomScale": 1.2,
"clickEvents": [
{
"__id__": 163
"__id__": 175
}
],
"_N$interactable": true,
......@@ -7425,7 +8051,7 @@
"hoverSprite": null,
"_N$disabledSprite": null,
"_N$target": {
"__id__": 160
"__id__": 172
},
"_id": "63sqlR0bVEJrqaAhyT+FzF"
},
......@@ -7444,7 +8070,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 160
"__id__": 172
},
"_enabled": true,
"alignMode": 1,
......@@ -7473,19 +8099,19 @@
"_name": "btn_next",
"_objFlags": 0,
"_parent": {
"__id__": 159
"__id__": 171
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 166
"__id__": 178
},
{
"__id__": 167
"__id__": 179
},
{
"__id__": 169
"__id__": 181
}
],
"_prefab": null,
......@@ -7541,7 +8167,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 165
"__id__": 177
},
"_enabled": true,
"_materials": [
......@@ -7573,7 +8199,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 165
"__id__": 177
},
"_enabled": true,
"_normalMaterial": null,
......@@ -7582,7 +8208,7 @@
"zoomScale": 1.2,
"clickEvents": [
{
"__id__": 168
"__id__": 180
}
],
"_N$interactable": true,
......@@ -7638,7 +8264,7 @@
"hoverSprite": null,
"_N$disabledSprite": null,
"_N$target": {
"__id__": 165
"__id__": 177
},
"_id": "3aZJp/FzlONJO+/okrPRip"
},
......@@ -7657,7 +8283,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 165
"__id__": 177
},
"_enabled": true,
"alignMode": 1,
......@@ -7692,10 +8318,10 @@
"_active": true,
"_components": [
{
"__id__": 171
"__id__": 183
},
{
"__id__": 172
"__id__": 184
}
],
"_prefab": null,
......@@ -7751,7 +8377,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 170
"__id__": 182
},
"_enabled": true,
"_materials": [
......@@ -7784,7 +8410,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 170
"__id__": 182
},
"_enabled": true,
"alignMode": 1,
......@@ -7817,7 +8443,7 @@
"_active": false,
"_components": [
{
"__id__": 174
"__id__": 186
}
],
"_prefab": null,
......@@ -7873,7 +8499,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 173
"__id__": 185
},
"_enabled": true,
"_materials": [
......@@ -7911,7 +8537,7 @@
"_active": false,
"_components": [
{
"__id__": 176
"__id__": 188
}
],
"_prefab": null,
......@@ -7967,7 +8593,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 175
"__id__": 187
},
"_enabled": true,
"_materials": [
......@@ -8084,7 +8710,7 @@
"__id__": 39
},
"loadingSprite": {
"__id__": 175
"__id__": 187
},
"noPlayCover": {
"__id__": 33
......
......@@ -164,13 +164,13 @@ export default class VideoPlayerComponent extends cc.Component {
this.videoPlayer.node.on('clicked', () => {
if (this.isVideoFull) {
this.videoPlayer.stayOnBottom = true;
this.fullscreenVideoControls.opacity = 255;
this.fullscreenVideoControls.emit("show");
if (this.time1) {
clearTimeout(this.time1);
}
this.time1 = setTimeout(() => {
this.videoPlayer.stayOnBottom = false;
this.fullscreenVideoControls.opacity = 0;
this.fullscreenVideoControls.emit("hide");
}, 6000);
}
});
......@@ -179,13 +179,13 @@ export default class VideoPlayerComponent extends cc.Component {
console.log('touchstarted');
if (this.isVideoFull) {
this.videoPlayer.stayOnBottom = true;
this.fullscreenVideoControls.opacity = 255;
this.fullscreenVideoControls.emit("show");
if (this.time1) {
clearTimeout(this.time1);
}
this.time1 = setTimeout(() => {
this.videoPlayer.stayOnBottom = false;
this.fullscreenVideoControls.opacity = 0;
this.fullscreenVideoControls.emit("hide");
}, 6000);
}
});
......@@ -194,13 +194,13 @@ export default class VideoPlayerComponent extends cc.Component {
console.log('touchstarted');
if (this.isVideoFull) {
this.videoPlayer.stayOnBottom = true;
this.fullscreenVideoControls.opacity = 255;
this.fullscreenVideoControls.emit("show");
if (this.time1) {
clearTimeout(this.time1);
}
this.time1 = setTimeout(() => {
this.videoPlayer.stayOnBottom = false;
this.fullscreenVideoControls.opacity = 0;
this.fullscreenVideoControls.emit("hide");
}, 6000);
}
});
......@@ -266,6 +266,11 @@ export default class VideoPlayerComponent extends cc.Component {
this.fullscreenVideoControls.on("exit_fullscreen", ()=>{
this.exitFullScreen()
})
this.fullscreenVideoControls.on("draging_progress", (opt)=>{
const {percent} = opt;
const dur = this.videoPlayer.getDuration();
this.videoPlayer.currentTime = percent * dur;
})
this.fullscreenVideoControls.on("switch_clarity", (clarity="h")=>{
})
......@@ -513,6 +518,11 @@ export default class VideoPlayerComponent extends cc.Component {
percent = 1;
}
this.ProgressBar.getComponent(cc.ProgressBar).progress = percent;
this.fullscreenVideoControls.emit("setProgress", {
percent: percent,
startTime: ct,
endTime: dur,
})
const maxX = this.ProgressBar.width;
const minX = 0;
let newX = percent * maxX;
......@@ -583,7 +593,6 @@ export default class VideoPlayerComponent extends cc.Component {
this.playButton.node.active = false;
this.pauseButton.node.active = true;
}
pause() {
......@@ -627,7 +636,7 @@ export default class VideoPlayerComponent extends cc.Component {
// 隐藏中间层返回按钮
this.showHideMiddleLayerBackBtn(false);
this.isVideoFull = true;
this.fullscreenVideoControls.opacity = 255;
this.fullscreenVideoControls.emit("show");
this.videoControls.active = false;
cc.find(`Canvas/title`).active = false;
cc.find('Canvas/pageButton').active = false;
......@@ -680,7 +689,7 @@ export default class VideoPlayerComponent extends cc.Component {
// 取消视频在最底部
this.videoPlayer.stayOnBottom = false;
// 隐藏全屏视频控制条
this.fullscreenVideoControls.opacity = 0;
this.fullscreenVideoControls.emit("hide");
// 显示正常视频控制条
this.videoControls.active = true;
// 显示全屏按钮
......
......@@ -25,11 +25,30 @@ export default class NewClass extends cc.Component {
@property(cc.Node)
label_title: cc.Node = null;
@property(cc.Node)
progressBg: cc.Node = null;
@property(cc.Node)
progressCurrent: cc.Node = null;
@property(cc.Node)
progressDot: cc.Node = null;
@property(cc.Node)
startTime: cc.Node = null;
@property(cc.Node)
endTime: cc.Node = null;
// LIFE-CYCLE CALLBACKS:
// onLoad () {}
currentTime = null;
winWidth = 0;
start () {
this.initdDrag();
this.winWidth = cc.find("/Canvas").width;
this.node.off("inFullscreen")
this.node.on("inFullscreen", (opt)=>{
const {isPlaying, title} = opt;
......@@ -37,6 +56,22 @@ export default class NewClass extends cc.Component {
this.btn_play.active = !isPlaying;
this.btn_pause.active = isPlaying;
})
this.node.on("setProgress", (opt)=>{
const {percent, startTime, endTime} = opt;
if(this.currentTime != Math.floor(startTime)) {
this.setProgress(percent, startTime, endTime)
this.currentTime = Math.floor(startTime)
}
})
this.node.on("show", (opt)=>{
this.show()
})
this.node.on("hide", (opt)=>{
this.hide()
})
}
onPlayClick() {
......@@ -58,5 +93,113 @@ export default class NewClass extends cc.Component {
onExitFullscreenClick() {
this.node.emit("exit_fullscreen")
}
setProgress(percent, startTime, endTime) {
if(percent < 0) {
percent = 0
} else if(percent >1) {
percent = 1;
}
this.progressCurrent.width = this.progressBg.width * percent;
this.progressDot.x = -this.progressBg.width / 2 + this.progressCurrent.width
if(startTime != undefined && startTime != null) {
this.startTime.getComponent(cc.Label).string = this.formatSeconds(startTime);
}
if(endTime != undefined && startTime != null) {
this.endTime.getComponent(cc.Label).string = this.formatSeconds(endTime);
}
}
show(){
this.node.opacity = 255;
this.node.x = 0;
}
hide(){
this.node.opacity = 255;
this.node.x = -this.winWidth;
}
formatSeconds (value) {
const checkZero = (value) => {
if(value < 1) {
return 0
} else {
return Math.floor(value)
}
}
const fix2 = (value) => {
if(value < 10) {
return `0${value}`
} else {
return `${value}`
}
}
const hourSec = 60 * 60;
const minuteSec = 60;
const secSec = 1;
let hour = checkZero(value / hourSec);
let minute = checkZero((value - (hour * hourSec)) / minuteSec)
let second = checkZero((value - (hour * hourSec + minute * minuteSec)) / secSec)
let timeStr = ""
if(hour > 0) {
timeStr += fix2(hour) + ":";
}
if(minute > 0) {
timeStr += fix2(minute) + ":";
} else {
timeStr +="00:";
}
if(second > 0) {
timeStr += fix2(second);
} else {
timeStr +="00";
}
return timeStr
}
draging = false;
initdDrag() {
this.progressDot.off(cc.Node.EventType.TOUCH_START);
this.progressDot.on(cc.Node.EventType.TOUCH_START, (e) => {
this.draging = true;
this.node.emit("pause")
});
this.progressDot.off(cc.Node.EventType.TOUCH_MOVE);
this.progressDot.on(cc.Node.EventType.TOUCH_MOVE, (e) => {
const worldPos = e.getLocation();
const localPos = this.progressDot.parent.convertToNodeSpaceAR(worldPos);
let percent = (localPos.x + this.progressBg.width / 2) / this.progressBg.width;
if(percent < 0) {
percent = 0
} else if(percent >1) {
percent = 1;
}
this.node.emit("draging_progress", {percent});
this.setProgress(percent, null, null);
});
this.node.off(cc.Node.EventType.TOUCH_END);
this.node.on(cc.Node.EventType.TOUCH_END, (e) => {
this.draging = false;
this.node.emit("play")
});
this.node.off(cc.Node.EventType.MOUSE_UP);
this.node.on(cc.Node.EventType.MOUSE_UP, (e) => {
this.draging = false;
this.node.emit("play");
});
}
// update (dt) {}
}
......@@ -4,7 +4,7 @@
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"premultiplyAlpha": true,
"genMipmaps": false,
"packable": true,
"width": 64,
......
{
"ver": "2.3.5",
"uuid": "4b46edb4-08e6-4d09-9ae8-4f9daeec2d4c",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": true,
"genMipmaps": false,
"packable": true,
"width": 64,
"height": 64,
"platformSettings": {},
"subMetas": {
"icon_player_dot": {
"ver": "1.0.4",
"uuid": "ecafbd46-ac07-42d6-9ce3-d0e67da4e817",
"rawTextureUuid": "4b46edb4-08e6-4d09-9ae8-4f9daeec2d4c",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 16,
"trimY": 16,
"width": 32,
"height": 32,
"rawWidth": 64,
"rawHeight": 64,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
......@@ -4,7 +4,7 @@
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"premultiplyAlpha": true,
"genMipmaps": false,
"packable": true,
"width": 64,
......
......@@ -4,7 +4,7 @@
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"premultiplyAlpha": true,
"genMipmaps": false,
"packable": true,
"width": 64,
......
......@@ -4,7 +4,7 @@
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"premultiplyAlpha": true,
"genMipmaps": false,
"packable": true,
"width": 64,
......
......@@ -4,7 +4,7 @@
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"premultiplyAlpha": true,
"genMipmaps": false,
"packable": true,
"width": 64,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment