Commit 1832cb60 authored by limingzhe's avatar limingzhe

feat: 适配整屏

parent 7f8b9d0a
...@@ -996,8 +996,8 @@ ...@@ -996,8 +996,8 @@
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
460.4180000000001, 474.06499999999994,
291.003, 271.898,
0, 0,
0, 0,
0, 0,
...@@ -1065,8 +1065,8 @@ ...@@ -1065,8 +1065,8 @@
"_target": null, "_target": null,
"_alignFlags": 33, "_alignFlags": 33,
"_left": 0, "_left": 0,
"_right": 106.58199999999994, "_right": 92.93500000000006,
"_top": 33.497000000000014, "_top": 52.601999999999975,
"_bottom": 0, "_bottom": 0,
"_verticalCenter": 0, "_verticalCenter": 0,
"_horizontalCenter": 0, "_horizontalCenter": 0,
......
...@@ -249,14 +249,23 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -249,14 +249,23 @@ export default class SceneComponent extends MyCocosSceneComponent {
const canvas = cc.find("Canvas");
video.node.on('ready-to-play', (e) => {
video.node.on('ready-to-play', () => { console.log('e: ', e);
// console.log(' in ready-to-play') // console.log(' in ready-to-play')
// if (this.isDestroy) { // if (this.isDestroy) {
// return; // return;
// } // }
video.node.width = e.width;
video.node.height = e.height;
const sx = canvas.width / e.width;
const sy = canvas.height / e.height;
video.node.scale = Math.min(sx, sy);
video.play(); video.play();
this.refreshBtnState(); this.refreshBtnState();
window["air"].hideAirClassLoading(); window["air"].hideAirClassLoading();
......
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