Commit 502f448c authored by limingzhe's avatar limingzhe

feat: 加载结束后 hide loading

parent f80f4ef9
...@@ -187,29 +187,24 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -187,29 +187,24 @@ export default class SceneComponent extends MyCocosSceneComponent {
// } // }
video.play(); video.play();
this.refreshBtnState(); this.refreshBtnState();
window["air"].hideAirClassLoading();
// checkIsPlaying(); checkIsPlaying();
}) })
const checkIsPlaying = () => { const checkIsPlaying = async () => {
delayCall(0.001, () => { console.log('bbbb 2');
console.log(' in checkIsPlaying 1') await asyncDelay(0.1);
if (video.currentTime) {
console.log(' in aaaa ');
// if (this.isDestroy) { // video.pause();
// return; } else {
// } checkIsPlaying();
}
if (video.currentTime) {
video.pause();
// this.isVideoPlayerReady = true;
// this.checkCanShowRecordList();
} else {
checkIsPlaying();
}
})
} }
} }
...@@ -264,28 +259,23 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -264,28 +259,23 @@ export default class SceneComponent extends MyCocosSceneComponent {
// } // }
video.play(); video.play();
this.refreshBtnState(); this.refreshBtnState();
// checkIsPlaying(); window["air"].hideAirClassLoading();
})
const checkIsPlaying = () => { checkIsPlaying();
})
delayCall(0.001, () => { const checkIsPlaying = async () => {
console.log(' in checkIsPlaying 1') console.log('bbbb');
// if (this.isDestroy) { await asyncDelay(0.1);
// return; if (video.currentTime) {
// } console.log(' in aaaa ');
// video.pause();
} else {
checkIsPlaying();
}
if (video.currentTime) {
video.pause();
// this.isVideoPlayerReady = true;
// this.checkCanShowRecordList();
} else {
checkIsPlaying();
}
})
} }
} }
......
...@@ -96,7 +96,7 @@ export class MyCocosSceneComponent extends cc.Component { ...@@ -96,7 +96,7 @@ export class MyCocosSceneComponent extends cc.Component {
// next(); // next();
// }; // };
this.onLoadEnd(); this.onLoadEnd();
window["air"].hideAirClassLoading(); // window["air"].hideAirClassLoading();
} else { } else {
this.onLoadEnd(); this.onLoadEnd();
} }
......
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