Commit a215a87f authored by 李维's avatar 李维

修复app中全屏错误问题

parent 6e2e7e80
{ {"ver":"1.1.2","uuid":"4f557179-a05f-4891-bac0-6a3d0275c8ce","isBundle":false,"bundleName":"","priority":1,"compressionType":{},"optimizeHotUpdate":{},"inlineSpriteFrames":{},"isRemoteBundle":{"ios":false,"android":false},"subMetas":{}}
"ver": "1.1.2", \ No newline at end of file
"uuid": "4f557179-a05f-4891-bac0-6a3d0275c8ce",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {
"ios": false,
"android": false
},
"subMetas": {}
}
\ No newline at end of file
...@@ -606,8 +606,8 @@ export default class VideoPlayerComponent extends cc.Component { ...@@ -606,8 +606,8 @@ export default class VideoPlayerComponent extends cc.Component {
this.tempPos.videoPos = { x: videoContainer.x, y: videoContainer.y, width: videoContainer.width, height: videoContainer.height, scale: this.videoPlayer.node.scale }; this.tempPos.videoPos = { x: videoContainer.x, y: videoContainer.y, width: videoContainer.width, height: videoContainer.height, scale: this.videoPlayer.node.scale };
// this.tempPos.videoPos.width *= videoContainer.scale; // this.tempPos.videoPos.width *= videoContainer.scale;
// this.tempPos.videoPos.height *= videoContainer.scale; // this.tempPos.videoPos.height *= videoContainer.scale;
// videoContainer.width = this.node.width; videoContainer.width = this.node.width;
// videoContainer.height = this.node.height; videoContainer.height = this.node.height;
videoContainer.x = 0; videoContainer.x = 0;
videoContainer.y = 0; videoContainer.y = 0;
...@@ -628,6 +628,10 @@ export default class VideoPlayerComponent extends cc.Component { ...@@ -628,6 +628,10 @@ export default class VideoPlayerComponent extends cc.Component {
controlBg.opacity = 240; controlBg.opacity = 240;
controlBg.width = this.node.width; controlBg.width = this.node.width;
const sx = this.node.width / this.videoPlayer.node.width;
const sy = this.node.height / this.videoPlayer.node.height;
const scale = Math.min(sx, sy)
this.videoPlayer.node.scale = scale;
this.videoPlayer.node.x = 0; this.videoPlayer.node.x = 0;
this.videoPlayer.node.y = 0; this.videoPlayer.node.y = 0;
......
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