Commit 0ed55050 authored by 智慧's avatar 智慧

style:将时间添加

parent 62a64252
......@@ -509,6 +509,9 @@
{
"__id__": 11
},
{
"__id__": 16
},
{
"__id__": 19
}
......@@ -585,7 +588,7 @@
"_active": true,
"_components": [
{
"__id__": 18
"__id__": 15
}
],
"_prefab": null,
......@@ -643,18 +646,14 @@
"_parent": {
"__id__": 11
},
"_children": [
{
"__id__": 13
}
],
"_children": [],
"_active": true,
"_components": [
{
"__id__": 16
"__id__": 13
},
{
"__id__": 17
"__id__": 14
}
],
"_prefab": null,
......@@ -705,21 +704,112 @@
"groupIndex": 0,
"_id": "113R0zLXtFepxzac9K/CIC"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 12
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "88113a42-ecd9-4466-92f3-473d8d95f1df"
},
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "42AYfV7WRL06RjstJcX2QQ"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 12
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 32,
"_left": 0,
"_right": -47.60000000000002,
"_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": "c7R/FpdJRMBbiA2IUg5hOn"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 11
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "9c0a9a1c-f515-419f-a98b-d1926c0d9791"
},
"_type": 1,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "6aEBayL25NCYjiR2AaURHr"
},
{
"__type__": "cc.Node",
"_name": "New Label",
"_objFlags": 0,
"_parent": {
"__id__": 12
"__id__": 10
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 14
"__id__": 17
},
{
"__id__": 15
"__id__": 18
}
],
"_prefab": null,
......@@ -728,7 +818,7 @@
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"b": 91,
"a": 255
},
"_contentSize": {
......@@ -745,8 +835,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
12,
47,
951.277,
5.88,
0,
0,
0,
......@@ -775,7 +865,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 13
"__id__": 16
},
"_enabled": true,
"_materials": [
......@@ -811,7 +901,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 13
"__id__": 16
},
"_enabled": true,
"_color": {
......@@ -824,97 +914,6 @@
"_width": 4,
"_id": "eahGxjR3VJXJU5Vhkwp4DB"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 12
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "88113a42-ecd9-4466-92f3-473d8d95f1df"
},
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "42AYfV7WRL06RjstJcX2QQ"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 12
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 32,
"_left": 0,
"_right": -47.60000000000002,
"_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": "c7R/FpdJRMBbiA2IUg5hOn"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 11
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "9c0a9a1c-f515-419f-a98b-d1926c0d9791"
},
"_type": 1,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "6aEBayL25NCYjiR2AaURHr"
},
{
"__type__": "cc.Node",
"_name": "TimeLabel",
......@@ -923,7 +922,7 @@
"__id__": 10
},
"_children": [],
"_active": true,
"_active": false,
"_components": [
{
"__id__": 20
......@@ -1076,7 +1075,7 @@
"_enabled": true,
"_N$totalLength": 880,
"_N$barSprite": {
"__id__": 18
"__id__": 15
},
"_N$mode": 0,
"_N$progress": 0,
......@@ -1304,7 +1303,7 @@
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "76c13eac-4d66-46c4-9b35-b194026ff65b"
"__uuid__": "983c7b7f-af31-4ebc-9b2a-bafced30115c"
},
"_type": 1,
"_sizeMode": 0,
......@@ -1588,7 +1587,7 @@
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "4cece7aa-9b9c-43e2-9069-d701fe305cf7"
"__uuid__": "cfdf000d-ca09-46fe-818d-375cc8540d28"
},
"_type": 1,
"_sizeMode": 0,
......@@ -1840,7 +1839,7 @@
1,
1,
1,
1
0
]
},
"_eulerAngles": {
......@@ -1872,7 +1871,7 @@
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "f90ba27d-8dd9-4b2f-97b3-5c1cd05549a9"
"__uuid__": "5ac42155-e9c8-436a-ac3d-8b36b12df539"
},
"_type": 1,
"_sizeMode": 0,
......@@ -2118,7 +2117,7 @@
"ctor": "Float64Array",
"array": [
0,
0,
-10,
0,
0,
0,
......@@ -2158,7 +2157,7 @@
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "52c2675d-0dbb-44a7-af5c-b37e97c3a1ee"
"__uuid__": "fb93bb33-3282-4257-94a9-07c6fa9e9703"
},
"_type": 1,
"_sizeMode": 0,
......@@ -2187,8 +2186,8 @@
"_alignFlags": 45,
"_left": 14,
"_right": 14,
"_top": 8,
"_bottom": 8,
"_top": 18,
"_bottom": -2,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
......@@ -2442,7 +2441,7 @@
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "8a15bf67-c647-4f10-8bf4-73fa74ecf58d"
"__uuid__": "8dbd0162-2e44-4ebc-9c34-3820bb821920"
},
"_type": 1,
"_sizeMode": 0,
......@@ -2636,7 +2635,7 @@
"__id__": 20
},
"currentTimeLabel": {
"__id__": 14
"__id__": 17
},
"barTag": {
"__id__": 12
......
......@@ -190,14 +190,14 @@ cc.Class({
pgBar.opacity = 255;
}
});
// this.tw = cc.tween(this.ProgressBar.node).delay(3).to(.6, {
// opacity: 0
// }).call(() => {
// console.log('This is a callback');
// // this.tw.stop();
// // this.tw.removeSelf()
// // this.tw = null;
// })
this.tw = cc.tween(this.ProgressBar.node).delay(3).to(.6, {
opacity: 0
}).call(() => {
console.log('This is a callback');
// this.tw.stop();
// this.tw.removeSelf()
// this.tw = null;
})
},
start() {
......@@ -255,7 +255,6 @@ cc.Class({
this.videoPlayer.currentTime = percent * dur
},
updateBarByTime(ct){
this.currentTimeLabel.string = this.formatTime(ct);
const dur = this.videoPlayer.getDuration();
const percent = ct / dur;
......@@ -286,8 +285,8 @@ cc.Class({
func(this.getDefaultData());
},
getDefaultData() {
// return {video_url: "http://staging-teach.cdn.ireadabc.com/5826aa205a4d33bf65552778b2aaf6f8.mp4"}
return {video_url: "http://staging-teach.cdn.ireadabc.com/d2b6b86798ef09034bf29417a0e747d2.mp4"}
return {video_url: "http://staging-teach.cdn.ireadabc.com/5826aa205a4d33bf65552778b2aaf6f8.mp4"}
// return {video_url: "http://staging-teach.cdn.ireadabc.com/d2b6b86798ef09034bf29417a0e747d2.mp4"}
},
play(){
......
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