Commit 1a642582 1a6425822aa3731630c06498eb7274235a96ac3a by 金学艇

1.替换视频播放的加载动画

2.解决全屏播放器播放时loading图标不能隐藏的问题
1 parent afbf9959
......@@ -210,7 +210,7 @@
"array": [
0,
0,
250.28134155273438,
265.0037841796875,
0,
0,
0,
......@@ -4164,7 +4164,7 @@
"__id__": 93
}
],
"_active": true,
"_active": false,
"_components": [
{
"__id__": 96
......@@ -4181,20 +4181,20 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 20
"width": 70,
"height": 70
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0,
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float32Array",
"array": [
438.4960021972656,
313.9849853515625,
-294,
153,
0,
0,
0,
......@@ -4246,12 +4246,12 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 800,
"height": 11
"width": 70,
"height": 70
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0,
"x": 0.5,
"y": 0.5
},
"_trs": {
......@@ -4299,10 +4299,10 @@
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "64171ff9-7f96-480f-b46e-c0cdfea7ff66"
"__uuid__": "8b1433a3-286a-46be-913a-f7c952eae789"
},
"_type": 0,
"_sizeMode": 1,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
......@@ -4324,35 +4324,42 @@
},
"_enabled": true,
"_defaultClip": {
"__uuid__": "c9542971-b8d5-43d8-baa3-227f1c2ed90a"
"__uuid__": "859687c1-69f7-491b-b0c1-2d5121cf763a"
},
"_clips": [
{
"__uuid__": "c9542971-b8d5-43d8-baa3-227f1c2ed90a"
"__uuid__": "859687c1-69f7-491b-b0c1-2d5121cf763a"
}
],
"playOnLoad": false,
"_id": "38NoyllHdEMZnxufG8PExS"
"_id": "96owu+EcVI7LMZ1kFjXGi7"
},
{
"__type__": "cc.Mask",
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 92
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_spriteFrame": null,
"_type": 0,
"_segments": 64,
"_N$alphaThreshold": 0,
"_N$inverted": false,
"_id": "aepOpjGMdGWZmUHg8iQyvK"
"alignMode": 1,
"_target": null,
"_alignFlags": 9,
"_left": 311,
"_right": 0,
"_top": 172,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "bbvcyyV8lJI7N41Y3wPPcI"
},
{
"__type__": "cc.Canvas",
......
......@@ -102,22 +102,22 @@
"__id__": 54
},
{
"__id__": 57
"__id__": 62
},
{
"__id__": 63
"__id__": 68
},
{
"__id__": 69
"__id__": 57
}
],
"_active": true,
"_components": [
{
"__id__": 78
"__id__": 77
},
{
"__id__": 79
"__id__": 78
}
],
"_prefab": null,
......@@ -207,7 +207,7 @@
"array": [
0,
0,
271.0659484863281,
265.0037841796875,
0,
0,
0,
......@@ -2415,7 +2415,7 @@
"__id__": 55
},
{
"__id__": 62
"__id__": 61
}
],
"_prefab": null,
......@@ -2489,7 +2489,7 @@
},
{
"__type__": "cc.Node",
"_name": "LoadingPic",
"_name": "LoadingIcon",
"_objFlags": 0,
"_parent": {
"__id__": 57
......@@ -2498,10 +2498,10 @@
"_active": true,
"_components": [
{
"__id__": 60
"__id__": 59
},
{
"__id__": 61
"__id__": 60
}
],
"_prefab": null,
......@@ -2515,12 +2515,12 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 800,
"height": 11
"width": 70,
"height": 70
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0,
"x": 0.5,
"y": 0.5
},
"_trs": {
......@@ -2550,7 +2550,7 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "1fCpRj4ltGPp0WBxqlgvga"
"_id": "f440WlzTlIYqEvK8a3LbI8"
},
{
"__type__": "cc.Node",
......@@ -2568,9 +2568,6 @@
"_components": [
{
"__id__": 58
},
{
"__id__": 59
}
],
"_prefab": null,
......@@ -2584,20 +2581,20 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 20
"width": 70,
"height": 70
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0,
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float32Array",
"array": [
-50,
0,
-294,
153,
0,
0,
0,
......@@ -2619,27 +2616,7 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "3eMr3hksxLOpx16sPlyI5U"
},
{
"__type__": "cc.Mask",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 57
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_spriteFrame": null,
"_type": 0,
"_segments": 64,
"_N$alphaThreshold": 1,
"_N$inverted": false,
"_id": "16R11mlV1AkIXYmp3/Tlfz"
"_id": "cbn+MjwwVP8YRr2KBTHQAB"
},
{
"__type__": "cc.Widget",
......@@ -2649,12 +2626,12 @@
"__id__": 57
},
"_enabled": true,
"alignMode": 0,
"alignMode": 1,
"_target": null,
"_alignFlags": 18,
"_left": 0,
"_alignFlags": 9,
"_left": 311,
"_right": 0,
"_top": 0,
"_top": 172,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
......@@ -2666,7 +2643,7 @@
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "cewOb6F/9FY5HEjsUP22DF"
"_id": "4d3u+WWxVJF7JwVm9fBBu/"
},
{
"__type__": "cc.Sprite",
......@@ -2684,10 +2661,10 @@
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "8591bd12-ad3c-4863-aadd-d5539e525022"
"__uuid__": "8b1433a3-286a-46be-913a-f7c952eae789"
},
"_type": 0,
"_sizeMode": 1,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
......@@ -2698,7 +2675,7 @@
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "b2tmdrE5RFX5KTqXbHSt4R"
"_id": "67ttu+m7ZOjpMe94J3BbZH"
},
{
"__type__": "cc.Animation",
......@@ -2708,10 +2685,16 @@
"__id__": 56
},
"_enabled": true,
"_defaultClip": null,
"_clips": [],
"_defaultClip": {
"__uuid__": "859687c1-69f7-491b-b0c1-2d5121cf763a"
},
"_clips": [
{
"__uuid__": "859687c1-69f7-491b-b0c1-2d5121cf763a"
}
],
"playOnLoad": false,
"_id": "15bhpfJhpHfrYeWh0BCNFp"
"_id": "37NBPKw/tCB60CjMaWmcWg"
},
{
"__type__": "cc.Widget",
......@@ -2751,16 +2734,16 @@
},
"_children": [
{
"__id__": 64
"__id__": 63
},
{
"__id__": 66
"__id__": 65
}
],
"_active": true,
"_components": [
{
"__id__": 68
"__id__": 67
}
],
"_prefab": null,
......@@ -2828,13 +2811,13 @@
"_name": "GraphicsLine",
"_objFlags": 0,
"_parent": {
"__id__": 63
"__id__": 62
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 65
"__id__": 64
}
],
"_prefab": null,
......@@ -2902,7 +2885,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 64
"__id__": 63
},
"_enabled": true,
"_materials": [
......@@ -2935,11 +2918,11 @@
"_name": "EpisodeListWrapper",
"_objFlags": 0,
"_parent": {
"__id__": 63
"__id__": 62
},
"_children": [
{
"__id__": 67
"__id__": 66
}
],
"_active": true,
......@@ -3009,7 +2992,7 @@
"_name": "EpisodeList",
"_objFlags": 0,
"_parent": {
"__id__": 66
"__id__": 65
},
"_children": [],
"_active": true,
......@@ -3079,7 +3062,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 63
"__id__": 62
},
"_enabled": true,
"alignMode": 1,
......@@ -3110,19 +3093,19 @@
},
"_children": [
{
"__id__": 70
"__id__": 69
},
{
"__id__": 73
"__id__": 72
},
{
"__id__": 75
"__id__": 74
}
],
"_active": true,
"_components": [
{
"__id__": 77
"__id__": 76
}
],
"_prefab": null,
......@@ -3190,17 +3173,17 @@
"_name": "NaviListWrapper",
"_objFlags": 0,
"_parent": {
"__id__": 69
"__id__": 68
},
"_children": [
{
"__id__": 71
"__id__": 70
}
],
"_active": true,
"_components": [
{
"__id__": 72
"__id__": 71
}
],
"_prefab": null,
......@@ -3268,7 +3251,7 @@
"_name": "NaviList",
"_objFlags": 0,
"_parent": {
"__id__": 70
"__id__": 69
},
"_children": [],
"_active": true,
......@@ -3338,7 +3321,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 70
"__id__": 69
},
"_enabled": true,
"_materials": [
......@@ -3358,13 +3341,13 @@
"_name": "LeftIcon",
"_objFlags": 0,
"_parent": {
"__id__": 69
"__id__": 68
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 74
"__id__": 73
}
],
"_prefab": null,
......@@ -3432,7 +3415,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 73
"__id__": 72
},
"_enabled": true,
"_materials": [],
......@@ -3458,13 +3441,13 @@
"_name": "RightIcon",
"_objFlags": 0,
"_parent": {
"__id__": 69
"__id__": 68
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 76
"__id__": 75
}
],
"_prefab": null,
......@@ -3532,7 +3515,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 75
"__id__": 74
},
"_enabled": true,
"_materials": [],
......@@ -3558,7 +3541,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 69
"__id__": 68
},
"_enabled": true,
"alignMode": 1,
......
......@@ -87,22 +87,22 @@
"__id__": 67
},
{
"__id__": 70
"__id__": 74
},
{
"__id__": 75
"__id__": 80
},
{
"__id__": 81
"__id__": 70
}
],
"_active": true,
"_components": [
{
"__id__": 84
"__id__": 83
},
{
"__id__": 85
"__id__": 84
}
],
"_prefab": null,
......@@ -192,7 +192,7 @@
"array": [
0,
0,
271.060302734375,
265.0037841796875,
0,
0,
0,
......@@ -3095,7 +3095,7 @@
},
{
"__type__": "cc.Node",
"_name": "LoadingPic",
"_name": "LoadingIcon",
"_objFlags": 0,
"_parent": {
"__id__": 70
......@@ -3104,10 +3104,10 @@
"_active": true,
"_components": [
{
"__id__": 73
"__id__": 72
},
{
"__id__": 74
"__id__": 73
}
],
"_prefab": null,
......@@ -3121,12 +3121,12 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 800,
"height": 11
"width": 70,
"height": 70
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0,
"x": 0.5,
"y": 0.5
},
"_trs": {
......@@ -3156,7 +3156,7 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "62k19pA5VJdZHt1MvVd0KJ"
"_id": "67SieNipJJ7LyGHuDHjpkp"
},
{
"__type__": "cc.Node",
......@@ -3174,9 +3174,6 @@
"_components": [
{
"__id__": 71
},
{
"__id__": 72
}
],
"_prefab": null,
......@@ -3190,19 +3187,19 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 20
"width": 70,
"height": 70
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0,
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float32Array",
"array": [
-50,
0,
0,
0,
0,
......@@ -3225,27 +3222,7 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "12hb2fvRJA45nmGTVs+v32"
},
{
"__type__": "cc.Mask",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 70
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_spriteFrame": null,
"_type": 0,
"_segments": 64,
"_N$alphaThreshold": 1,
"_N$inverted": false,
"_id": "3cAhPpAdlP5IntJxN3NItA"
"_id": "79bgVqSStDYK0+5Rq0GZV3"
},
{
"__type__": "cc.Widget",
......@@ -3255,12 +3232,12 @@
"__id__": 70
},
"_enabled": true,
"alignMode": 0,
"alignMode": 1,
"_target": null,
"_alignFlags": 18,
"_left": 0,
"_alignFlags": 0,
"_left": 311,
"_right": 0,
"_top": 0,
"_top": 172,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
......@@ -3272,7 +3249,7 @@
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "50fnFtwilL/4m5jYQwmRkg"
"_id": "fc87+fW4xGGqt+gX0TCuOP"
},
{
"__type__": "cc.Sprite",
......@@ -3290,10 +3267,10 @@
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "8591bd12-ad3c-4863-aadd-d5539e525022"
"__uuid__": "8b1433a3-286a-46be-913a-f7c952eae789"
},
"_type": 0,
"_sizeMode": 1,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
......@@ -3304,7 +3281,7 @@
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "3aWBjSZ3lJUpjguQ59S7ba"
"_id": "5eWe0gHYdFgLAwURyV/xFF"
},
{
"__type__": "cc.Animation",
......@@ -3314,10 +3291,16 @@
"__id__": 69
},
"_enabled": true,
"_defaultClip": null,
"_clips": [],
"_defaultClip": {
"__uuid__": "859687c1-69f7-491b-b0c1-2d5121cf763a"
},
"_clips": [
{
"__uuid__": "859687c1-69f7-491b-b0c1-2d5121cf763a"
}
],
"playOnLoad": false,
"_id": "30uLeFqC1A07n78l9C5gdn"
"_id": "2eCZVpmE5PFqmCY8kgCJmh"
},
{
"__type__": "cc.Node",
......@@ -3328,16 +3311,16 @@
},
"_children": [
{
"__id__": 76
"__id__": 75
}
],
"_active": true,
"_components": [
{
"__id__": 79
"__id__": 78
},
{
"__id__": 80
"__id__": 79
}
],
"_prefab": null,
......@@ -3393,16 +3376,16 @@
"_name": "CurrentName",
"_objFlags": 0,
"_parent": {
"__id__": 75
"__id__": 74
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 77
"__id__": 76
},
{
"__id__": 78
"__id__": 77
}
],
"_prefab": null,
......@@ -3458,7 +3441,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 76
"__id__": 75
},
"_enabled": true,
"_materials": [
......@@ -3488,7 +3471,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 76
"__id__": 75
},
"_enabled": true,
"alignMode": 1,
......@@ -3515,7 +3498,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 75
"__id__": 74
},
"_enabled": true,
"_layoutSize": {
......@@ -3548,7 +3531,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 75
"__id__": 74
},
"_enabled": true,
"alignMode": 1,
......@@ -3581,10 +3564,10 @@
"_active": false,
"_components": [
{
"__id__": 82
"__id__": 81
},
{
"__id__": 83
"__id__": 82
}
],
"_prefab": null,
......@@ -3640,7 +3623,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 81
"__id__": 80
},
"_enabled": true,
"_materials": [
......@@ -3672,7 +3655,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 81
"__id__": 80
},
"_enabled": true,
"alignMode": 1,
......
......@@ -831,6 +831,7 @@ cc.Class({
this._bShowProgress = true;
this.unschedule(this.hideProgressBarArea);
cc.find("VideoArea/PlayPanel/Operation/Play", this.node).active = true;
cc.find("VideoArea/PlayPanel/Operation/Bg", this.node).active = true;
cc.find("VideoArea/PlayPanel/Progress", this.node).active = true;
cc.find("VideoArea/PlayPanel/Time", this.node).active = true;
cc.find("SelectDown", this.node).active = true;
......@@ -844,6 +845,7 @@ cc.Class({
this._bShowProgress = false;
this.unschedule(this.hideProgressBarArea);
cc.find("VideoArea/PlayPanel/Operation/Play", this.node).active = false;
cc.find("VideoArea/PlayPanel/Operation/Bg", this.node).active = false;
cc.find("VideoArea/PlayPanel/Progress", this.node).active = false;
cc.find("VideoArea/PlayPanel/Time", this.node).active = false;
cc.find("SelectDown", this.node).active = false;
......@@ -856,6 +858,7 @@ cc.Class({
this._bShowGather = true;
this.unschedule(this.hideSelectGatherArea);
cc.find("VideoArea/PlayPanel/Operation/Group", this.node).active = true;
cc.find("VideoArea/PlayPanel/Operation/Bg", this.node).active = true;
this._iFocusStatus = 1;
this._cFocus.flyFocus(this._fiCurrentFocus, cc.find("VideoArea/PlayPanel/Operation/Group/ButtonNext", this.node).getComponent(FocusInfo), Common.MOVE_DIRECTION_UP, 1.0, null);
this.scheduleOnce(this.hideSelectGatherArea, 5);
......@@ -866,6 +869,7 @@ cc.Class({
this._bShowGather = false;
this.unschedule(this.hideSelectGatherArea);
cc.find("VideoArea/PlayPanel/Operation/Group", this.node).active = false;
cc.find("VideoArea/PlayPanel/Operation/Bg", this.node).active = false;
},
});
......
......@@ -2,16 +2,6 @@ cc.Class({
extends: cc.Component,
properties: {
// foo: {
// default: null, // The default value will be used only when the component attaching
// to a node for the first time
// url: cc.Texture2D, // optional, default is typeof default
// serializable: true, // optional, default is true
// visible: true, // optional, default is true
// displayName: 'Foo', // optional
// readonly: false, // optional, default is false
// },
// ...
},
// use this for initialization
onLoad: function () {
......@@ -29,7 +19,6 @@ cc.Class({
MOVE_DIRECTION_DOWN: 2,
MOVE_DIRECTION_LEFT: 3,
FOCUS_FLY_DURATION: 0.2,
FOCUS_BREATH_DURATION: 0.8,
......@@ -40,14 +29,10 @@ cc.Class({
FOCUS_CONTAINER_BREATH: 2,
FOCUS_CONTAINER_JOGGLE: 3,
OVERLENGTH_MOVING: 4,
SCROLL_BY_FOCUS_CHANGE: 5,
API_SORT_ASC: 'asc',
API_SORT_DESC: 'desc',
......@@ -64,28 +49,9 @@ cc.Class({
enter: 1005
},
BUSINESS_PARAMETER: {
// {:,
},
OFFICIAL_PLATFORM_IP: 'http://139.196.192.33/',
TEST_PLATFORM_IP: 'http://139.196.192.242:8081/',
// TOPDRAW_API_SERVER : 'http://139.196.192.242:8081/hyperion.chimera/',
// TOPDRAW_IMAGE_SERVER : 'http://139.196.192.242:8081/hyperion.resource/',
// TOPDRAW_API_SERVER : 'http://39.130.160.199:8081/hyperion.chimera/',
// TOPDRAW_IMAGE_SERVER : 'http://39.130.160.199:8081/hyperion.resource/',
// TOPDRAW_LOG_SERVER:'http://139.196.37.202/sparrow.resource/',
// // BI_BASE_PATH : 'http://139.196.192.242:81/1.gif',
// BI_BASE_PATH : 'http://39.130.160.23:81/1.gif',
//2019.8.16修改新服务器
TOPDRAW_API_SERVER: 'http://demo.cloud.api.findfun.topdraw.cn:38081/findfun/',
TOPDRAW_IMAGE_SERVER: 'http://demo.cloud.api.findfun.topdraw.cn:38081/findfun/',
......@@ -94,7 +60,6 @@ cc.Class({
BI_BASE_PATH: 'http://melody.hi.a170.ottcn.com:80/1.gif',
BI_BASE_PATH_NEW: 'http://melody.hi.a170.ottcn.com:80/2.gif',
TV_LINK_ACTION_CLICK: 100,
TV_LINK_ACTION_HOVER: 101,
......@@ -113,7 +78,6 @@ cc.Class({
BACK_WITH_DETAIN: true,
//TEST_API_TOKEN:'6b071a064fb047bbbd47c5b3326f34d5', B2C 的
_bIsHotUpdate: false,
PRODUCT_LIST: null,
VALID_PLAY_TIME_DURATION: 5 * 60,
......@@ -149,29 +113,6 @@ cc.Class({
},
setTimeout: function (onTimeComplete, iDuration, oScope, argements) {
/*
window.setTimeout(onTimeComplete,iDuration,);
cc.loader.loadRes(strResourceURL,
function(error,loadedResource){
if (error){
if(null!=oScope){
onError.call(oScope,error);
}else{
onError(error);
}
}else{
if(null!=oScope){
onSuccess.call(oScope,loadedResource);
}else{
onSuccess(loadedResource);
}
}
}
);
*/
},
getAbsolutePositionX: function (node) {
......
......@@ -43,7 +43,7 @@ cc.Class({
cc.game.addPersistRootNode(nodeVideoPlayer.parent);
this.checkUpdate(); //热更新
// cc.director.loadScene("sceneMain");
//cc.director.loadScene("sceneMain");
if (!this._bAbleHotUpdate) {
// cc.director.loadScene("sceneMain");
......
......@@ -26,11 +26,13 @@ cc.Class({
oScene: null,
url: "",
addedFn4Update: null,
},
onLoad: function () {
this.updateTimer = 0;
this.updateInterval = 1;
this.bShowLoading = false;
//全屏播放时可能onLoad了多次导致不能关闭loading图标,先干掉
//this.bShowLoading = false;
this.bContinualStep = false;
this.speed = 0;
this.initialStep = 1;
......@@ -124,8 +126,7 @@ cc.Class({
this.videoPlayer.start();
//看是否是纯k是纯k的话要进行定点播放
if (!this.oScene._bContinuePlayed
&& (
(this.oScene._strAppId && this.oScene._strAppId == BusinessParameter.KTV_APPID)
&& ((this.oScene._strAppId && this.oScene._strAppId == BusinessParameter.KTV_APPID)
|| (this.oScene._strPlaylistAppId && this.oScene._strPlaylistAppId == BusinessParameter.KTV_APPID))
&& Common.g_iPlayerPlayedTime) {
this.iInitPlayStartTime = Common.g_iPlayerPlayedTime;
......@@ -156,6 +157,7 @@ cc.Class({
this.fnAfterReady2Play = null;
//准备播放后做个通知事件
this.oScene.fnAfterReady2Play && this.oScene.fnAfterReady2Play.call(this.oScene);
this.oScene._cLog.screenI("setOnPreparedListener->bShowLoading" + this.bShowLoading);
}.bind(this));
// this.videoPlayer.node.on(
......@@ -305,7 +307,7 @@ cc.Class({
}
this.oScene._cLog.screenI("function setLeft start" + this.bReady2Play);
this.videoLeft = iLeft;
this.loadingIcon.parent.x = this.videoLeft - this.loadingIcon.parent.width / 2;
// this.loadingIcon.parent.x = this.videoLeft - this.loadingIcon.parent.width / 2;
if (this.bReady2Play) {
// this.videoPlayer.node.x = iLeft;
this.videoPlayer.setArea(this.videoLeft, this.videoTop, this.videoWidth, this.videoHeight); //设置播放器位置 fix jerry
......@@ -519,11 +521,11 @@ cc.Class({
},
setURL: function (options, time, resourceType) {
try {
if(!options){
if (!options) {
return;
}
let url = options.playurl;
cc.log("setURL start..."+url);
cc.log("setURL start..." + url);
options.appId = BusinessParameter.NEWTV_APPID;
this.oScene._cLog.screenI("function setURL start");
//this.oScene._cLog.screenI("取消延迟:延迟设置setURL");
......@@ -551,21 +553,22 @@ cc.Class({
this.videoPlayer.prepareAsync(); //异步准备播放视频,准备完成后调用OnPreparedListener监听 fix jerry
// this.videoPlayer.isFullscreen = this.bFullScreen; //全屏先不要 fix jerry
this.oScene._cLog.screenI("222" + this.videoPlayer.url + "setURL333\r\n");
// if (this.bShowLoading && this.loadingIcon) { //暂时将加载进度条关了, this.bShowLoading出现诡异问题
// let nodeParent = this.loadingIcon.parent;
// nodeParent.zIndex = 1000;
// nodeParent.x = this.videoLeft - nodeParent.width / 2;
// nodeParent.y = this.videoTop - nodeParent.height / 2;
// let anim = this.loadingIcon.getComponent(cc.Animation);
// anim.play();
// this.loadingIcon.opacity = 255;
// }
if (this.bShowLoading && this.loadingIcon) { //暂时将加载进度条关了, this.bShowLoading出现诡异问题
let nodeParent = this.loadingIcon.parent;
nodeParent.zIndex = 1000;
// nodeParent.x = this.videoLeft - nodeParent.width / 2;
// nodeParent.y = this.videoTop - nodeParent.height / 2;
let anim = this.loadingIcon.getComponent(cc.Animation);
anim.play();
this.loadingIcon.opacity = 255;
}
this.oScene._cLog.screenI("setURL->bShowLoading" + this.bShowLoading);
}
}
} catch (err) {
this.oScene._cLog.screenI("setURL Error==>" + err + "\r\n");
}
this.oScene._cLog.screenI("function setURL end");
this.oScene._cLog.screenI("function setURL end " + this.bShowLoading);
} catch (error) {
if (cc.sys.isNative) {
jsb.reflection.callStaticMethod("org/cocos2dx/javascript/AppActivity", "logInSceneI", "(Ljava/lang/String;)V", "setURL Error in OperateVideoPlay==>" + error);
......@@ -749,7 +752,7 @@ cc.Class({
// // this.oScene.nextMedia && this.oScene.nextMedia();
// // return;
// }
iTargetTime = Math.min(this.duration,this.now + iDir * this.speed);
iTargetTime = Math.min(this.duration, this.now + iDir * this.speed);
if (this.now + iDir * this.speed > 0) {
//iTargetTime = this.now + iDir * this.speed;
} else {
......@@ -795,6 +798,7 @@ cc.Class({
if (this.updateTimer < this.updateInterval) {
return; // we don't need to do the math every frame
}
cc.log("update->this.bShowLoading..." + this.bShowLoading);
this.updateTimer = 0;
if (!this.videoPlayer || !this.videoPlayer.enabled) return;
if (this.oScene._bFakeProgressStart) {
......@@ -815,15 +819,15 @@ cc.Class({
if (this.duration > 0) {
this.stepCountMax = (Math.floor(this.duration / 60 / 5) || 1) * 8;
}
// this.oScene._cLog.screenI("OperateVideoPlay update this.loadingIcon:"+this.bShowLoading+" "+this.loadingIcon);
this.oScene._cLog.screenI("OperateVideoPlay update this.loadingIcon:" + this.bShowLoading + " " + this.loadingIcon);
if (this.bShowLoading && this.loadingIcon) {
this.loadingIcon.parent.x = this.videoLeft - this.loadingIcon.parent.width / 2;
this.loadingIcon.parent.y = this.videoTop - this.loadingIcon.parent.height / 2;
// this.loadingIcon.parent.x = this.videoLeft - this.loadingIcon.parent.width / 2;
// this.loadingIcon.parent.y = this.videoTop - this.loadingIcon.parent.height / 2;
let anim = this.loadingIcon.getComponent(cc.Animation);
if (this.now > 0) {
anim.pause();
this.loadingIcon.opacity = 0;
} else if (this.duration == -100){ //未来播放器播前广告进行中。。。 fix jerry
} else if (this.duration == -100) { //未来播放器播前广告进行中。。。 fix jerry
anim.pause();
this.loadingIcon.opacity = 0;
}
......
......@@ -311,14 +311,14 @@ cc.Class({
if (fiFocusTarget.node.x - fiFocusTarget.node.width / 2 + this._nodeEpisodeList.x >= this._nodeEpisodeListWrapper.width) {
oScrollParameter = this._nodeEpisodeList.getComponent(TVScrollParameter);
oScrollParameter.setHasRelation(true);
oScrollParameter.setStep((fiFocusTarget.node.x + fiFocusTarget.node.width / 2 + this._nodeEpisodeList.x) - this._nodeEpisodeListWrapper.width+20);
oScrollParameter.setStep((fiFocusTarget.node.x + fiFocusTarget.node.width / 2 + this._nodeEpisodeList.x) - this._nodeEpisodeListWrapper.width + 20);
oScrollParameter.setTargetPosition(this._nodeEpisodeList.x - oScrollParameter.getStep());
// this._oSceneContext._nodeNaviListX = this._nodeEpisodeList.x - oScrollParameter.getStep();
}
if (fiFocusTarget.node.x + this._nodeEpisodeList.x < 0) {
oScrollParameter = this._nodeEpisodeList.getComponent(TVScrollParameter);
oScrollParameter.setHasRelation(true);
oScrollParameter.setStep(-fiFocusTarget.node.x + fiFocusTarget.node.width / 2 - this._nodeEpisodeList.x+16);
oScrollParameter.setStep(-fiFocusTarget.node.x + fiFocusTarget.node.width / 2 - this._nodeEpisodeList.x + 16);
oScrollParameter.setTargetPosition(this._nodeEpisodeList.x + oScrollParameter.getStep())
// this._oSceneContext._nodeNaviListX = this._nodeEpisodeList.x + oScrollParameter.getStep();
}
......@@ -365,23 +365,7 @@ cc.Class({
} else if (0 == this._fiCurrentFocus.node.name.indexOf('LabelDesc')) {
cc.find("FullDesc", this.node).active = true;
} else if (0 == this._fiCurrentFocus.node.name.indexOf('ButtonOpen') || 0 == this._fiCurrentFocus.node.name.indexOf('Pic')) {
// this.commonSimpleTip("是否拿到数据: " + this._bInitExistApk);
if (!this._bInitExistApk) { //还未拿到判断数据
return;
}
if (this._bIsExistApk == "true") {
if (this._oSceneContext._downloadUrl && this._oSceneContext._downloadUrl != "undefined") { //如果有下载地址就启动奥比游戏
jsb.reflection.callStaticMethod("com/topdraw/melody/TopdrawSDKWrapper", "startOBiGame", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V", Common.TOPDRAW_API_SERVER + this._oSceneContext._downloadUrl, this._oSceneContext._packageName, this._oSceneContext._className, "");
} else {
//这里应该转圈圈等待加载游戏
// cc.find("LoadingLabel", this.node).opacity = 255;
// cc.find("Loading/LoadingIcon", this.node).opacity = 255;
// cc.find("Loading/LoadingIcon", this.node).getComponent(cc.Animation).play();
jsb.reflection.callStaticMethod("com/topdraw/melody/TopdrawSDKWrapper", "startGame", "(Ljava/lang/String;Ljava/lang/String;)V", this._oSceneContext._packageName, "");
}
} else {
this.doCurrentFocusTVLinkAction(Common.TV_LINK_ACTION_CLICK);
}
this.doCurrentFocusTVLinkAction(Common.TV_LINK_ACTION_CLICK);
return;
} else {
this.doCurrentFocusTVLinkAction(Common.TV_LINK_ACTION_CLICK);
......
{
"__type__": "cc.AnimationClip",
"_name": "loadingRotate",
"_objFlags": 0,
"_native": "",
"_duration": 1,
"sample": 4,
"speed": 1,
"wrapMode": 2,
"curveData": {
"comps": {
"cc.Sprite": {
"spriteFrame": [
{
"frame": 0,
"value": {
"__uuid__": "8b1433a3-286a-46be-913a-f7c952eae789"
}
},
{
"frame": 0.25,
"value": {
"__uuid__": "8b1433a3-286a-46be-913a-f7c952eae789"
}
},
{
"frame": 0.5,
"value": {
"__uuid__": "8b1433a3-286a-46be-913a-f7c952eae789"
}
},
{
"frame": 0.75,
"value": {
"__uuid__": "8b1433a3-286a-46be-913a-f7c952eae789"
}
}
]
}
},
"props": {
"angle": [
{
"frame": 0,
"value": 0
},
{
"frame": 1,
"value": -360
}
]
}
},
"events": []
}
\ No newline at end of file