Commit c7c87ca1 authored by liujiangnan's avatar liujiangnan

feat: 趣配音播放视频

parent 458a7926
......@@ -85,18 +85,21 @@
},
{
"__id__": 576
},
{
"__id__": 744
}
],
"_active": true,
"_components": [
{
"__id__": 741
"__id__": 768
},
{
"__id__": 742
"__id__": 769
},
{
"__id__": 743
"__id__": 770
}
],
"_prefab": null,
......@@ -1479,7 +1482,7 @@
}
],
"_prefab": null,
"_opacity": 255,
"_opacity": 0,
"_color": {
"__type__": "cc.Color",
"r": 255,
......@@ -1541,7 +1544,7 @@
"r": 0,
"g": 0,
"b": 0,
"a": 255
"a": 0
},
"_depth": -1,
"_zoomRatio": 1,
......@@ -2768,7 +2771,7 @@
"_groupIndex": 0,
"groupIndex": 0,
"showInEditor": false,
"_id": "4bmXhdzfZIaYeOjS2YZtwu"
"_id": "17rjwMETxBmIblj16aCWma"
},
{
"__type__": "cc.Label",
......@@ -2801,7 +2804,7 @@
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "28gC0SdiJIk7cy7kifzxu4"
"_id": "57JB1p2YpE+5LxCdgEl1gR"
},
{
"__type__": "cc.PrivateNode",
......@@ -2864,7 +2867,7 @@
"_groupIndex": 0,
"groupIndex": 0,
"showInEditor": false,
"_id": "56+o7Js7dHXaJC2desfzt5"
"_id": "eaMyPmybNAvZvPW/gebuZV"
},
{
"__type__": "cc.Label",
......@@ -2897,7 +2900,7 @@
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "0d/U2UUt1N6oqyAfgNpXZI"
"_id": "4aXO7t3ENIlLLZjL2aS9ou"
},
{
"__type__": "cc.PrivateNode",
......@@ -2960,7 +2963,7 @@
"_groupIndex": 0,
"groupIndex": 0,
"showInEditor": false,
"_id": "0c0AKIgLlJ25xjpf+N6J0N"
"_id": "aczE+TqwpEs5VwuRBr6skj"
},
{
"__type__": "cc.Label",
......@@ -2993,7 +2996,7 @@
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "d37pPmWlxJUIN6zysJ9yJb"
"_id": "f9HkRqzmJCWInVgxt78hWn"
},
{
"__type__": "cc.PrivateNode",
......@@ -3056,7 +3059,7 @@
"_groupIndex": 0,
"groupIndex": 0,
"showInEditor": false,
"_id": "83TRNax8ZKHZBevi9ehIpy"
"_id": "04GZc+rjFK2IOn6oiCnryw"
},
{
"__type__": "cc.Label",
......@@ -3089,7 +3092,7 @@
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "10LbE4AlFL4pI5VbGx9eA+"
"_id": "83APZ7IJxMYa+sJsPhOA4A"
},
{
"__type__": "cc.PrivateNode",
......@@ -3152,7 +3155,7 @@
"_groupIndex": 0,
"groupIndex": 0,
"showInEditor": false,
"_id": "0cPWHD1N9KV6+nNkgHf1Pa"
"_id": "bbMHdJ6aRNiKEu4OQidPry"
},
{
"__type__": "cc.Label",
......@@ -3185,7 +3188,7 @@
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "c2gH6NnoxCHK0M0XYpw18K"
"_id": "93Fx4Ao29NlpyRWm6TiDJ8"
},
{
"__type__": "cc.RichText",
......@@ -6366,7 +6369,7 @@
"_groupIndex": 0,
"groupIndex": 0,
"showInEditor": false,
"_id": "c0KMHTJKdJ+6yKy4grvalL"
"_id": "b05pQUbaxOXomttpOoFNbE"
},
{
"__type__": "cc.Label",
......@@ -6399,7 +6402,7 @@
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "5a7kJxhs5E1pKVAC5IWqXZ"
"_id": "98uPm21w5L4pMl29KQBqh9"
},
{
"__type__": "cc.PrivateNode",
......@@ -6462,7 +6465,7 @@
"_groupIndex": 0,
"groupIndex": 0,
"showInEditor": false,
"_id": "bcgJ+eFJhLErIofYRBBPne"
"_id": "4f8wd4FW9CoaQALEq0fK/a"
},
{
"__type__": "cc.Label",
......@@ -6495,7 +6498,7 @@
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "64hN/7rGJIE5sIZtKH+mFc"
"_id": "95c9RRhXxKoa5fOeY1OT8l"
},
{
"__type__": "cc.PrivateNode",
......@@ -6558,7 +6561,7 @@
"_groupIndex": 0,
"groupIndex": 0,
"showInEditor": false,
"_id": "92tp5KpxpPpJSgCFuBCJ4i"
"_id": "e1RXFUxv9PX73btPFgpxbA"
},
{
"__type__": "cc.Label",
......@@ -6591,7 +6594,7 @@
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "39F94Jm4VKEqdXh5KLamjX"
"_id": "bd3+CA2DhHgZvLcnyNJquR"
},
{
"__type__": "cc.RichText",
......@@ -7070,7 +7073,7 @@
"_groupIndex": 0,
"groupIndex": 0,
"showInEditor": false,
"_id": "0dzsuXZBJB3p6wGs3zDj76"
"_id": "140nC2polA35Mlc0WIQsy5"
},
{
"__type__": "cc.Label",
......@@ -7103,7 +7106,7 @@
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "97WXwr/1VEHKL8O6q/tQeJ"
"_id": "5d20hZqGlO9bQgqJImPJ66"
},
{
"__type__": "cc.PrivateNode",
......@@ -7166,7 +7169,7 @@
"_groupIndex": 0,
"groupIndex": 0,
"showInEditor": false,
"_id": "cfTYVE3jlI45wsACfmrAew"
"_id": "4b/IcXrAZA6K9JDQ2xgUS5"
},
{
"__type__": "cc.Label",
......@@ -7199,7 +7202,7 @@
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "35kZwpmr1JAbbevQjcBA4r"
"_id": "5fuxnDagFGW6hViORc7+ey"
},
{
"__type__": "cc.PrivateNode",
......@@ -7262,7 +7265,7 @@
"_groupIndex": 0,
"groupIndex": 0,
"showInEditor": false,
"_id": "c1aYU8h8NIa7qXM0Q9n4OW"
"_id": "4bwhOcCB5O1qEJmNxG/eRw"
},
{
"__type__": "cc.Label",
......@@ -7295,7 +7298,7 @@
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "39azC9hd5C4I+eFNdchNkz"
"_id": "33COUEYypH3IDenzgodYX0"
},
{
"__type__": "cc.RichText",
......@@ -7585,7 +7588,7 @@
"_groupIndex": 0,
"groupIndex": 0,
"showInEditor": false,
"_id": "70rn+8rL9P76Uj6//PDmP8"
"_id": "d4Bsn4kT9KBJWj698IzQqk"
},
{
"__type__": "cc.Label",
......@@ -7618,7 +7621,7 @@
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "70oPBCpjtO441yWf/nFMgI"
"_id": "44oS5dLQ1D9oIK5pq6wldy"
},
{
"__type__": "cc.PrivateNode",
......@@ -7681,7 +7684,7 @@
"_groupIndex": 0,
"groupIndex": 0,
"showInEditor": false,
"_id": "72oQI280hH64hksKZUYAyo"
"_id": "a1Dew72ZBCQKRSvX3NPGLm"
},
{
"__type__": "cc.Label",
......@@ -7714,7 +7717,7 @@
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "51WsiAZY1L2qq11cNdDKLd"
"_id": "88589SUWdDkYPrH6Zfw/5L"
},
{
"__type__": "cc.PrivateNode",
......@@ -7777,7 +7780,7 @@
"_groupIndex": 0,
"groupIndex": 0,
"showInEditor": false,
"_id": "92S5o4RDZFBoRSxsDmPbJM"
"_id": "05kp3lyfZI7Y3frnBXvSa2"
},
{
"__type__": "cc.Label",
......@@ -7810,7 +7813,7 @@
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "78ERoCNnBG2bjcclILrFhq"
"_id": "49b/WhGA9AZ6LoyQcjZ4d9"
},
{
"__type__": "cc.RichText",
......@@ -9235,7 +9238,7 @@
"_groupIndex": 0,
"groupIndex": 0,
"showInEditor": false,
"_id": "7b5o95OLVKErfdTxLZymqb"
"_id": "3bQOjQMBRCmalXEPxJbJ7p"
},
{
"__type__": "cc.Label",
......@@ -9268,7 +9271,7 @@
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "27tqCqHhVMLr2BY0OIMf0Q"
"_id": "81/gUEeyxOPIRTt5m2jqWv"
},
{
"__type__": "cc.PrivateNode",
......@@ -9331,7 +9334,7 @@
"_groupIndex": 0,
"groupIndex": 0,
"showInEditor": false,
"_id": "bbcDASazlJLLn1cE6g7Cos"
"_id": "faHsoSZCRAnZoocj0ZVtWB"
},
{
"__type__": "cc.Label",
......@@ -9364,7 +9367,7 @@
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "8eX4TdVt5Ms4XDwzXhyXW5"
"_id": "83jdLMY2JDhZepHcZK0MDB"
},
{
"__type__": "cc.PrivateNode",
......@@ -9427,7 +9430,7 @@
"_groupIndex": 0,
"groupIndex": 0,
"showInEditor": false,
"_id": "24iKwtzgBNGpxzNWAmKLHt"
"_id": "f7JhsTGHlCNKtJRj6sSYX4"
},
{
"__type__": "cc.Label",
......@@ -9460,7 +9463,7 @@
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "c6g9q4Ac9EzZyTLmDW2WK4"
"_id": "6371vR7v1KBY8sfAejCME5"
},
{
"__type__": "cc.PrivateNode",
......@@ -9523,7 +9526,7 @@
"_groupIndex": 0,
"groupIndex": 0,
"showInEditor": false,
"_id": "6ckRTGHepNR65lQCz5HIWm"
"_id": "efkqwNjUNHM71W7cBX9ODE"
},
{
"__type__": "cc.Label",
......@@ -9556,7 +9559,7 @@
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "fd3h/aEyFO4oaeDN3hzIZu"
"_id": "1fRTQ+P65BRLjOougp8fcm"
},
{
"__type__": "cc.PrivateNode",
......@@ -9619,7 +9622,7 @@
"_groupIndex": 0,
"groupIndex": 0,
"showInEditor": false,
"_id": "34ZSXqkbtIjZNPszHSH23E"
"_id": "3dHT3+g85Cca4g9E1caQ+W"
},
{
"__type__": "cc.Label",
......@@ -9652,7 +9655,7 @@
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "46RHom7pFGyKZqk0cGXbV2"
"_id": "b7dMNjSNxGcZtxHtBmG81W"
},
{
"__type__": "cc.PrivateNode",
......@@ -9715,7 +9718,7 @@
"_groupIndex": 0,
"groupIndex": 0,
"showInEditor": false,
"_id": "07bNN9rZtCHrzkuQ6WsUPn"
"_id": "fe98KKNh5IKKzBrC8OBspN"
},
{
"__type__": "cc.Label",
......@@ -9748,7 +9751,7 @@
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "03BGqkXzpN7plH8NwuUJ15"
"_id": "60KIFToS1ML5aQClkLQBYM"
},
{
"__type__": "cc.PrivateNode",
......@@ -9811,7 +9814,7 @@
"_groupIndex": 0,
"groupIndex": 0,
"showInEditor": false,
"_id": "c1qW2Br4VN0oNiW6xfkFCU"
"_id": "ed9kFikmdF/LQy3cpw+PFf"
},
{
"__type__": "cc.Label",
......@@ -9844,7 +9847,7 @@
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "134/zoeLNF4LM74jPrPXRE"
"_id": "76pFFpPqJOpKZK3+X30Bch"
},
{
"__type__": "cc.RichText",
......@@ -12590,7 +12593,7 @@
"_groupIndex": 0,
"groupIndex": 0,
"showInEditor": false,
"_id": "dd77GeqmNA8apt1wLiYIyn"
"_id": "94pzSJ/pdMIYmoCO9UyFAO"
},
{
"__type__": "cc.Label",
......@@ -12623,7 +12626,7 @@
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "03XMSLuy5PCZM+jsbyxJ5M"
"_id": "018UVRVA9DkoZ7mgPSlMq9"
},
{
"__type__": "cc.PrivateNode",
......@@ -12686,7 +12689,7 @@
"_groupIndex": 0,
"groupIndex": 0,
"showInEditor": false,
"_id": "e09s6hB6lIq7FlKtcyk13w"
"_id": "bd/2hegxBHko7ZOvzAmB4k"
},
{
"__type__": "cc.Label",
......@@ -12719,7 +12722,7 @@
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "63Qr1rlSVBG58ZOeqTydrJ"
"_id": "f9BQ1irgBMh70OVlHXw+2T"
},
{
"__type__": "cc.PrivateNode",
......@@ -12782,7 +12785,7 @@
"_groupIndex": 0,
"groupIndex": 0,
"showInEditor": false,
"_id": "53PbzJVrhMiJjHJji3HIyT"
"_id": "e5Bj1AeUNItppliMltYBtf"
},
{
"__type__": "cc.Label",
......@@ -12815,7 +12818,7 @@
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "b9Q9y4/wpDkqoPdjr8GneF"
"_id": "d0FOBNHzpM/obWhD/2Y9vy"
},
{
"__type__": "cc.RichText",
......@@ -26877,19 +26880,19 @@
"__id__": 577
},
{
"__id__": 732
"__id__": 735
}
],
"_active": false,
"_components": [
{
"__id__": 738
"__id__": 741
},
{
"__id__": 739
"__id__": 742
},
{
"__id__": 740
"__id__": 743
}
],
"_prefab": null,
......@@ -26955,10 +26958,10 @@
"_active": true,
"_components": [
{
"__id__": 730
"__id__": 733
},
{
"__id__": 731
"__id__": 734
}
],
"_prefab": null,
......@@ -27024,7 +27027,7 @@
"_active": true,
"_components": [
{
"__id__": 729
"__id__": 732
}
],
"_prefab": null,
......@@ -27099,10 +27102,10 @@
"_active": true,
"_components": [
{
"__id__": 727
"__id__": 730
},
{
"__id__": 728
"__id__": 731
}
],
"_prefab": null,
......@@ -29269,7 +29272,7 @@
"_active": true,
"_components": [
{
"__id__": 726
"__id__": 729
}
],
"_prefab": null,
......@@ -29567,13 +29570,13 @@
"_active": true,
"_components": [
{
"__id__": 723
"__id__": 726
},
{
"__id__": 724
"__id__": 727
},
{
"__id__": 725
"__id__": 728
}
],
"_prefab": null,
......@@ -33492,13 +33495,13 @@
"__id__": 714
},
{
"__id__": 716
"__id__": 719
}
],
"_active": true,
"_components": [
{
"__id__": 722
"__id__": 725
}
],
"_prefab": null,
......@@ -33655,6 +33658,12 @@
"_components": [
{
"__id__": 715
},
{
"__id__": 716
},
{
"__id__": 718
}
],
"_prefab": null,
......@@ -33737,6 +33746,100 @@
"_atlas": null,
"_id": "6f8E5ntRRP/Yf6QOzu6TdX"
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 714
},
"_enabled": true,
"_normalMaterial": null,
"_grayMaterial": null,
"duration": 0.1,
"zoomScale": 1.2,
"clickEvents": [
{
"__id__": 717
}
],
"_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": {
"__id__": 714
},
"_id": "e9BN1dkV9OdplrQ5d5HU7K"
},
{
"__type__": "cc.ClickEvent",
"target": {
"__id__": 714
},
"component": "",
"_componentId": "9c154tqr7dIDptMURdYlia+",
"handler": "onClickToPlayVideo",
"customEventData": ""
},
{
"__type__": "9c154tqr7dIDptMURdYlia+",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 714
},
"_enabled": true,
"_id": "49mvGABxJCXIynRx6lRSH5"
},
{
"__type__": "cc.Node",
"_name": "video_process_bg",
......@@ -33746,16 +33849,16 @@
},
"_children": [
{
"__id__": 717
"__id__": 720
},
{
"__id__": 719
"__id__": 722
}
],
"_active": true,
"_components": [
{
"__id__": 721
"__id__": 724
}
],
"_prefab": null,
......@@ -33811,13 +33914,13 @@
"_name": "video_process",
"_objFlags": 0,
"_parent": {
"__id__": 716
"__id__": 719
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 718
"__id__": 721
}
],
"_prefab": null,
......@@ -33873,7 +33976,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 717
"__id__": 720
},
"_enabled": true,
"_materials": [
......@@ -33905,13 +34008,13 @@
"_name": "video_dot",
"_objFlags": 0,
"_parent": {
"__id__": 716
"__id__": 719
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 720
"__id__": 723
}
],
"_prefab": null,
......@@ -33967,7 +34070,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 719
"__id__": 722
},
"_enabled": true,
"_materials": [
......@@ -33999,7 +34102,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 716
"__id__": 719
},
"_enabled": true,
"_materials": [
......@@ -34320,16 +34423,16 @@
"_active": true,
"_components": [
{
"__id__": 733
"__id__": 736
},
{
"__id__": 734
"__id__": 737
},
{
"__id__": 735
"__id__": 738
},
{
"__id__": 737
"__id__": 740
}
],
"_prefab": null,
......@@ -34385,7 +34488,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 732
"__id__": 735
},
"_enabled": true,
"_materials": [
......@@ -34417,7 +34520,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 732
"__id__": 735
},
"_enabled": true,
"alignMode": 1,
......@@ -34444,7 +34547,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 732
"__id__": 735
},
"_enabled": true,
"_normalMaterial": null,
......@@ -34453,7 +34556,7 @@
"zoomScale": 1.2,
"clickEvents": [
{
"__id__": 736
"__id__": 739
}
],
"_N$interactable": true,
......@@ -34514,7 +34617,7 @@
{
"__type__": "cc.ClickEvent",
"target": {
"__id__": 732
"__id__": 735
},
"component": "",
"_componentId": "9c154tqr7dIDptMURdYlia+",
......@@ -34526,7 +34629,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 732
"__id__": 735
},
"_enabled": true,
"_id": "fa3KV6EbFDwJdO89ber4Ip"
......@@ -34616,6 +34719,1020 @@
"_originalHeight": 720,
"_id": "ecogla5qlOZKV/d+pOO6DZ"
},
{
"__type__": "cc.Node",
"_name": "videoContainer",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [
{
"__id__": 745
},
{
"__id__": 748
},
{
"__id__": 757
},
{
"__id__": 763
}
],
"_active": false,
"_components": [
{
"__id__": 766
},
{
"__id__": 767
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 1280,
"height": 720
},
"_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": "25swPsST5LMJ89xMuPy1I8"
},
{
"__type__": "cc.Node",
"_name": "qpyVideo",
"_objFlags": 0,
"_parent": {
"__id__": 744
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 746
},
{
"__id__": 747
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 1280,
"height": 720
},
"_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": "cfRqNp8m1K9oq8K4p6RYlg"
},
{
"__type__": "cc.VideoPlayer",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 745
},
"_enabled": true,
"_resourceType": 0,
"_remoteURL": "",
"_clip": {
"__uuid__": "2be36297-9abb-4fee-8049-9ed5e271da8a"
},
"_volume": 1,
"_mute": false,
"_isFullscreen": false,
"_N$isFullscreen": false,
"_stayOnBottom": true,
"videoPlayerEvent": [],
"_N$keepAspectRatio": true,
"_id": "58utnq+VJFsq6KmVUKGAxa"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 745
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 45,
"_left": 0,
"_right": 0,
"_top": 0,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 494,
"_originalHeight": 280,
"_id": "b4dGOWd8BOXbol+WDxylw/"
},
{
"__type__": "cc.Node",
"_name": "video_process_bg",
"_objFlags": 0,
"_parent": {
"__id__": 744
},
"_children": [
{
"__id__": 749
},
{
"__id__": 752
}
],
"_active": true,
"_components": [
{
"__id__": 755
},
{
"__id__": 756
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 1258,
"height": 10
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
-309.033,
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": "715cYLJnZLZJuKeQC0OMCg"
},
{
"__type__": "cc.Node",
"_name": "video_process",
"_objFlags": 0,
"_parent": {
"__id__": 748
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 750
},
{
"__id__": 751
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 1,
"height": 10
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-629,
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": "95Whf8jDxPo4FMadMfe2Ul"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 749
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "a6392d3f-096c-4299-ab18-cdd0ee2b21d0"
},
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "f88U83NsNOfrtYGUwJEoWU"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 749
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 8,
"_left": 0,
"_right": 0,
"_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": "bf1DTg8ONKFoVzxIUsEKHq"
},
{
"__type__": "cc.Node",
"_name": "video_dot",
"_objFlags": 0,
"_parent": {
"__id__": 748
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 753
},
{
"__id__": 754
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 26,
"height": 26
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-629,
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": "a6U6qTsXFIyqLN5zCrPWvw"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 752
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "f1cfbadd-64e2-43de-b35b-6e7f3937b706"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "28dxdJ5X1EzZ+d9W1xh3Kq"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 752
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 8,
"_left": 0,
"_right": 0,
"_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": "98RuniFApMbZaoElbniHnk"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 748
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "b051fe84-93fd-4c49-912f-f8da503c2443"
},
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "faHXPUHAZIaLnTev2/KdpY"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 748
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 44,
"_left": 11,
"_right": 11,
"_top": 328.621,
"_bottom": 45.966999999999985,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 490,
"_originalHeight": 10,
"_id": "07DMaNOotKQZwPu9JStfju"
},
{
"__type__": "cc.Node",
"_name": "back",
"_objFlags": 0,
"_parent": {
"__id__": 744
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 758
},
{
"__id__": 759
},
{
"__id__": 760
},
{
"__id__": 762
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 108,
"height": 113
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-581.898,
313.04,
0,
0,
0,
0,
1,
0.5,
0.5,
0.5
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "93PKlQbXBA+7+lVVoJQl94"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 757
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "6f9f8f5e-1ed3-42bf-987a-c03663ff6b03"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "7b3VCVx7lH3JqHlfNBKqRu"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 757
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 9,
"_left": 31.101999999999975,
"_right": 0,
"_top": 18.70999999999998,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "d1i6PNvLVKM5AhAcwznt8K"
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 757
},
"_enabled": true,
"_normalMaterial": null,
"_grayMaterial": null,
"duration": 0.1,
"zoomScale": 1.2,
"clickEvents": [
{
"__id__": 761
}
],
"_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": {
"__id__": 757
},
"_id": "63efETDzBJTq9PD1gP/oLR"
},
{
"__type__": "cc.ClickEvent",
"target": {
"__id__": 757
},
"component": "",
"_componentId": "9c154tqr7dIDptMURdYlia+",
"handler": "onClickExitVideoPlay",
"customEventData": ""
},
{
"__type__": "9c154tqr7dIDptMURdYlia+",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 757
},
"_enabled": true,
"_id": "6bO/s4q0JC/7tFb3YzguFS"
},
{
"__type__": "cc.Node",
"_name": "play",
"_objFlags": 0,
"_parent": {
"__id__": 744
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 764
},
{
"__id__": 765
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 112,
"height": 112
},
"_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": "0bQjLmp+VDNae62Jlpk1IU"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 763
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "746cd059-db9d-4f7c-bd62-e5e390289b16"
},
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "88bBKKVnRN7Y2narx464A/"
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 763
},
"_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": {
"__id__": 763
},
"_id": "a3qfAeWZdLRbldRWbD/SHz"
},
{
"__type__": "21524phAVND5pFjjthejNuV",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 744
},
"_enabled": true,
"dot": {
"__id__": 752
},
"processBg": {
"__id__": 748
},
"process": {
"__id__": 749
},
"playBtn": {
"__id__": 763
},
"videoplayer": {
"__id__": 746
},
"_id": "dej+nExBZLLKTp/uZgfxJs"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 744
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 45,
"_left": 0,
"_right": 0,
"_top": 0,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 1280,
"_originalHeight": 720,
"_id": "b5N/sIsdxGQotkln9DYLgJ"
},
{
"__type__": "cc.Canvas",
"_name": "",
......
......@@ -2,7 +2,7 @@ import {
asyncDelay,
onHomeworkFinish,
asyncCallNetworkApiGet,
asyncCallNetworkApiPost
asyncCallNetworkApiPost,
} from "../script/util";
import { MyCocosSceneComponent } from "../script/MyCocosSceneComponent";
......@@ -41,7 +41,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
initData() {
const middleLayer = cc.find('middleLayer');
if (!middleLayer) {
cc.sys.localStorage.setItem('token', 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6NCwicGhvbmUiOiIxNTUwMDAwMDAwMSIsInNpZ24iOiI3MjhlYzkwZC1kZmIyLTQxMzktOWMyMS0yNGQwZjg4NDYwMmUiLCJpYXQiOjE2NTU3MDY4MjUsImV4cCI6MTY1ODI5ODgyNX0.Rkhjn9MJxXAOoHnjBzjdCcLBtE-87ps5790SIdYQrZE');
cc.sys.localStorage.setItem('token', 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6NCwicGhvbmUiOiIxNTUwMDAwMDAwMSIsInNpZ24iOiJjZTRlMDk1Yi1mNTVkLTQyNGUtYWQyMC0yN2UxNjc2ZTcyZDQiLCJpYXQiOjE2NTU3MjgyNDQsImV4cCI6MTY1ODMyMDI0NH0.JFVw7Ip-qzDlMU2qp7iMaOuuIT-NkWxRndZog3CAU1s');
}
this.token = cc.sys.localStorage.getItem("token");
}
......@@ -270,10 +270,12 @@ export default class SceneComponent extends MyCocosSceneComponent {
cc.find(`Canvas/usercenter/view/content/scollpage/bg`).height = Math.abs(bottomItem.y) + 400;
}
// update (dt) {}
initListener() {
}
update (dt) {
}
}
......@@ -332,13 +332,22 @@ export default class NewClass extends cc.Component {
cc.find(`Canvas/reportdetail/view/content/userdetail_scollpage/learnresult/itembg/tips_bg/row`).active = false;
}
if (OP_06_3) {
const rowData = JSON.parse(OP_06_3);
cc.find(`Canvas/videoContainer`).attr({rowData});
// TODO 星星算法和评语
cc.find(`Canvas/reportdetail/view/content/userdetail_scollpage/learnresult/itembg/pyx`).active = true;
} else {
cc.find(`Canvas/reportdetail/view/content/userdetail_scollpage/learnresult/itembg/pyx`).active = false;
}
// 设置页面高度
this.scheduleOnce(() => {
setTimeout(() => {
const learnresult = cc.find(`Canvas/reportdetail/view/content/userdetail_scollpage/learnresult`);
const pageHight = cc.find(`itembg`, learnresult).height + Math.abs(learnresult.y);
cc.find(`Canvas/reportdetail/view/content`).height = pageHight + 100;
cc.find(`Canvas/reportdetail/view/content/userdetail_scollpage`).height = pageHight + 100;
}, 0);
}, 1000);
}
......@@ -396,4 +405,12 @@ export default class NewClass extends cc.Component {
cc.find("Canvas/reportdetail").active = false;
}
// 播放趣配音视频
async onClickToPlayVideo() {
cc.find(`Canvas/videoContainer`).active = true;
cc.find(`Canvas/bg`).opacity = 0;
cc.find("Canvas/reportdetail").opacity = 0;
}
}
......@@ -483,3 +483,71 @@ export function callNetworkApiGet(uri, data, callBack) {
xhr.open('GET', url, true);
xhr.send();
}
function httpHeadCall(requsetUrl, callback) {
let xhr = new XMLHttpRequest();
console.log("Status: Send Post Request to " + requsetUrl);
try {
xhr.onreadystatechange = () => {
try {
console.log('xhr.readyState: ', xhr.readyState);
if (xhr.readyState == 4) {
if ((xhr.status >= 200 && xhr.status < 400)) {
callback(true);
} else {
callback(false);
}
}
} catch (e) {
console.log(e)
}
};
xhr.open("HEAD", requsetUrl, true);
xhr.send();
xhr.timeout = 15000;
xhr.onerror = (e) => {
console.log("汪汪汪 posterror", e);
callback(false);
};
xhr.ontimeout = (e) => {
console.log("汪汪汪 ontimeout", e);
callback(false);
};
} catch (e) {
console.log("Send Get Request error: ", e)
}
};
export function getVideoUrl(video_url, callback) {
const url1 = video_url;
const url2 = url1.replace(/.mp4$/g, "_l.mp4");
httpHeadCall(url2, (success) => {
if (success) {
console.log('return url2: ', url2);
callback(url2);
} else {
console.log('return url1: ', url1);
callback(url1);
}
})
};
export function buttonOnClick(button: cc.Node, callback: Function, scale = 1.0) {
button.addComponent(cc.Button);
button.on('click', () => {
if (button['cantClick']) {
return;
}
button['cantClick'] = true;
cc.tween(button)
.to(0.1, { scale: scale * 1.1 })
.to(0.1, { scale: scale })
.call(() => {
button['cantClick'] = false;
callback && callback();
})
.start();
});
}
import {
getVideoUrl, buttonOnClick,
} from "../script/util";
import { MyCocosSceneComponent } from "./MyCocosSceneComponent";
const {ccclass, property} = cc._decorator;
@ccclass
export default class NewClass extends MyCocosSceneComponent {
@property(cc.Node)
dot: cc.Node = null;
@property(cc.Node)
processBg: cc.Node = null;
@property(cc.Node)
process: cc.Node = null;
@property(cc.Node)
playBtn: cc.Node = null;
@property(cc.VideoPlayer)
videoplayer: cc.VideoPlayer = null;
dotX = null;
processX = null;
onLoad () {
this.dotX = this.dot.x;
this.processX = this.process.x;
this.initListener();
}
rowData = null;
start () {
}
onEnable () {
// this.videoplayer.remoteURL = "";
this.rowData = this.node["rowData"];
this.dot.x = this.dotX;
this.process.width = 0;
getVideoUrl(this.rowData.video_url, (url) => {
this.videoplayer.remoteURL = url+`?t=${Date.now()}`;
})
}
updateVideoStrip() {
if (!this.videoplayer?.isPlaying()) {
return;
}
let percent;
const duration = this.videoplayer.getDuration();
if (!duration) {
percent = 0;
} else {
percent = this.videoplayer.currentTime / duration;
}
this.setProgress(percent);
}
setProgress(progress) {
setTimeout(() => {
const w = this.processBg.width * progress;
this.process.width = w;
this.dot.x = this.dotX + w -5;
}, 1);
}
closeVideo() {
this.videoplayer.stop();
this.dot.x = this.dotX;
this.process.width = 0;
cc.find(`Canvas/videoContainer`).active = false;
cc.find(`Canvas/bg`).opacity = 255;
cc.find("Canvas/reportdetail").opacity = 255;
}
initListener() {
const back = cc.find(`Canvas/videoContainer/back`);
buttonOnClick(back, () => {
this.closeVideo();
}, 0.5);
buttonOnClick(this.playBtn, () => {
this.videoplayer.play();
});
this.videoplayer.node.on('clicked', () => {
if (this.videoplayer.isPlaying()) {
this.videoplayer.pause();
this.playBtn.active = true;
}
});
this.videoplayer.node.on('ready-to-play', () => {
this.videoplayer.play();
});
this.videoplayer.node.on('playing', (evt) => {
this.playBtn.active = false;
});
this.videoplayer.node.on('completed', (evt) => {
this.closeVideo();
});
}
update (dt) {
this.updateVideoStrip();
}
}
{
"ver": "1.0.8",
"uuid": "21524a61-0153-43e6-9163-8ed85e8cdb95",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
......@@ -26,10 +26,10 @@
"height": 298,
"rawWidth": 512,
"rawHeight": 298,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"borderTop": 25,
"borderBottom": 25,
"borderLeft": 25,
"borderRight": 25,
"subMetas": {}
}
}
......
......@@ -26,10 +26,10 @@
"height": 280,
"rawWidth": 494,
"rawHeight": 280,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"borderTop": 25,
"borderBottom": 25,
"borderLeft": 25,
"borderRight": 25,
"subMetas": {}
}
}
......
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