Commit 29cb7a5e authored by liujiangnan's avatar liujiangnan

fix: 加载完成后

parent cd643aa3
......@@ -135,25 +135,6 @@ cc.Class({
},
onReadyToPlay(player) {
console.log('onReadyToPlay');
this.gameStatus.load(1);
this.videoplayer.stayOnBottom = true;
},
onMetaLoaded(player) {
console.log('onMetaLoaded');
this.durationLabel.string = this.formatTime(this.videoplayer.getDuration());
},
onClicked(player) {
console.log('onClicked');
},
onPlaying(player) {
console.log('onPlaying');
// this.videoStatus.isVideoPlaying = true;
},
// onPaused(player) {
// console.log('onPaused');
// this.videoStatus.isVideoPlaying = false;
......@@ -549,6 +530,33 @@ cc.Class({
cc.debug.setDisplayStats(false);
},
onReadyToPlay(player) {
console.log('onReadyToPlay');
this.gameStatus.load(1);
this.videoplayer.stayOnBottom = true;
this.videoCanPlay = true;
if (window && window["air"] && this.pageLoaded) {
window["air"].hideAirClassLoading();
}
},
onMetaLoaded(player) {
console.log('onMetaLoaded');
this.durationLabel.string = this.formatTime(this.videoplayer.getDuration());
},
onClicked(player) {
console.log('onClicked');
},
onPlaying(player) {
console.log('onPlaying');
// this.videoStatus.isVideoPlaying = true;
},
videoCanPlay: false,
pageLoaded: false,
preload() {
const preloadArr = this._imageResList.concat(this._audioResList).concat(this._animaResList);
console.log('preloadArr: ', JSON.stringify( preloadArr) );
......@@ -558,8 +566,8 @@ cc.Class({
this.addServerListener();
if (window && window["air"]) {
this.pageLoaded = true;
if (window && window["air"] && this.videoCanPlay) {
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