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(' in checkIsPlaying 1') console.log('bbbb 2');
// if (this.isDestroy) {
// return;
// }
await asyncDelay(0.1);
if (video.currentTime) { if (video.currentTime) {
video.pause(); console.log(' in aaaa ');
// this.isVideoPlayerReady = true;
// this.checkCanShowRecordList();
// video.pause();
} else { } else {
checkIsPlaying(); 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) {
// return;
// }
await asyncDelay(0.1);
if (video.currentTime) { if (video.currentTime) {
video.pause(); console.log(' in aaaa ');
// this.isVideoPlayerReady = true; // video.pause();
// this.checkCanShowRecordList();
} else { } else {
checkIsPlaying(); 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