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

更新素材

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