Commit 028a89ab authored by 李维's avatar 李维

更新素材

parent 12c66479
......@@ -41,6 +41,9 @@ export default class VideoPlayerComponent extends cc.Component {
@property(cc.Node)
loadingSprite: cc.Node = null;
@property(cc.Node)
noPlayCover: cc.Node = null;
_designSize: cc.Size = null;
_frameSize: cc.Size = null;
_mapScaleMin: number = null;
......@@ -147,9 +150,11 @@ export default class VideoPlayerComponent extends cc.Component {
this.videoPlayer.currentTime = 0;
this.play();
});
this.videoPlayer.node.on('meta-loaded', () => {
console.log('meta-loaded');
});
this.videoPlayer.node.on('clicked', () => {
console.log('clicked');
if (this.isVideoFull) {
......@@ -164,6 +169,7 @@ export default class VideoPlayerComponent extends cc.Component {
}, 6000);
}
});
this.videoPlayer.node.on('touchstarted', () => {
console.log('touchstarted');
if (this.isVideoFull) {
......@@ -178,6 +184,7 @@ export default class VideoPlayerComponent extends cc.Component {
}, 6000);
}
});
this.videoPlayer.node.on(cc.Node.EventType.TOUCH_START, () => {
console.log('touchstarted');
if (this.isVideoFull) {
......@@ -192,24 +199,28 @@ export default class VideoPlayerComponent extends cc.Component {
}, 6000);
}
});
this.videoPlayer.node.on('playing', () => {
this.durationLabel.string = this.formatTime(this.videoPlayer.getDuration());
this.playButton.node.active = false;
this.restartButton.node.active = false;
this.pauseButton.node.active = true;
this.noPlayCover.active = false;
});
this.videoPlayer.node.on('paused', () => {
});
this.videoPlayer.node.on('stopped', () => {
});
this.videoPlayer.node.on('completed', async () => {
this.videoPlayer.node.on('completed', async () => {
this._isPlayComplated = true;
this.playButton.node.active = false;
this.pauseButton.node.active = false;
this.restartButton.node.active = false;
this.restartButton.node.active = true;
const nextItem = this.videoItemList[this.videoPlayIndex + 1];
if (nextItem) {
......@@ -218,6 +229,7 @@ export default class VideoPlayerComponent extends cc.Component {
this.videoItemList[0].emit('my_item_click');
}
});
cc.view.setResizeCallback(() => {
this.initdDrag();
});
......@@ -429,7 +441,7 @@ export default class VideoPlayerComponent extends cc.Component {
cc.find(`Canvas/video_node`).width *= 1.2;
cc.find(`Canvas/video_node`).height *= 1.2;
cc.find(`Canvas/video_node`).y = 93.311;
cc.find(`Canvas/VideoNode`).scale = 1.439;
cc.find(`Canvas/VideoNode`).scale = 1.45;
cc.find(`Canvas/Controls`).scale = 1.2;
cc.find(`Canvas/Controls`).y = -670;
cc.find(`Canvas/Controls`).x += 50;
......@@ -663,25 +675,25 @@ export default class VideoPlayerComponent extends cc.Component {
if (ct) {
this.updateBarByTime(ct);
}
if (this.videoPlayer.isPlaying()) {
if (this.playButton.node.active) {
this.playButton.node.active = false;
this.restartButton.node.active = false;
}
if (!this.pauseButton.node.active) {
this.pauseButton.node.active = true;
}
} else {
if (!this.playButton.node.active) {
this.playButton.node.active = true;
}
if (this.pauseButton.node.active) {
this.pauseButton.node.active = false;
}
if (this.restartButton.node.active) {
this.playButton.node.active = false;
}
}
// if (this.videoPlayer.isPlaying()) {
// if (this.playButton.node.active) {
// this.playButton.node.active = false;
// this.restartButton.node.active = false;
// }
// if (!this.pauseButton.node.active) {
// this.pauseButton.node.active = true;
// }
// } else {
// if (!this.playButton.node.active) {
// this.playButton.node.active = true;
// }
// if (this.pauseButton.node.active) {
// this.pauseButton.node.active = false;
// }
// if (this.restartButton.node.active) {
// this.playButton.node.active = false;
// }
// }
}
}
}
\ No newline at end of file
......@@ -4,11 +4,11 @@
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"premultiplyAlpha": true,
"genMipmaps": false,
"packable": true,
"width": 68,
"height": 68,
"width": 73,
"height": 73,
"platformSettings": {},
"subMetas": {
"btn_tiao": {
......@@ -19,13 +19,13 @@
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 68,
"height": 68,
"rawWidth": 68,
"rawHeight": 68,
"offsetY": 1,
"trimX": 3,
"trimY": 1,
"width": 67,
"height": 69,
"rawWidth": 73,
"rawHeight": 73,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
......
{
"ver": "2.3.5",
"uuid": "4e79555e-fb4b-4880-ba7b-c2adbd68a951",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 967,
"height": 544,
"platformSettings": {},
"subMetas": {
"bg_top": {
"ver": "1.0.4",
"uuid": "5a86e45d-0e83-4ce9-bd11-41747db25b06",
"rawTextureUuid": "4e79555e-fb4b-4880-ba7b-c2adbd68a951",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 967,
"height": 544,
"rawWidth": 967,
"rawHeight": 544,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
......@@ -4,10 +4,10 @@
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"premultiplyAlpha": true,
"genMipmaps": false,
"packable": true,
"width": 971,
"width": 1065,
"height": 717,
"platformSettings": {},
"subMetas": {
......@@ -19,12 +19,12 @@
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0.5,
"offsetY": 0,
"trimX": 4,
"trimY": 2,
"width": 1058,
"height": 712,
"rawWidth": 1066,
"trimY": 4,
"width": 1057,
"height": 709,
"rawWidth": 1065,
"rawHeight": 717,
"borderTop": 0,
"borderBottom": 0,
......
......@@ -4,11 +4,11 @@
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"premultiplyAlpha": true,
"genMipmaps": false,
"packable": true,
"width": 971,
"height": 717,
"width": 967,
"height": 544,
"platformSettings": {},
"subMetas": {
"bg_video_bg_mask": {
......@@ -18,14 +18,14 @@
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": -0.5,
"offsetY": 81.5,
"trimX": 50,
"trimY": 6,
"width": 870,
"height": 542,
"rawWidth": 971,
"rawHeight": 717,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 967,
"height": 544,
"rawWidth": 967,
"rawHeight": 544,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
......
{
"ver": "2.3.5",
"uuid": "cba0b144-43ae-4729-bce9-711a87f5fe63",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": true,
"genMipmaps": false,
"packable": true,
"width": 348,
"height": 228,
"platformSettings": {},
"subMetas": {
"bg_video_unchosen_mask": {
"ver": "1.0.4",
"uuid": "aef08c6d-14fd-4aa9-8dc3-e3510e282b74",
"rawTextureUuid": "cba0b144-43ae-4729-bce9-711a87f5fe63",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": -0.5,
"offsetY": 0.5,
"trimX": 6,
"trimY": 5,
"width": 335,
"height": 217,
"rawWidth": 348,
"rawHeight": 228,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
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