Commit 98133fde authored by liujiangnan's avatar liujiangnan

debug:

parent 01501c48
...@@ -136,14 +136,17 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -136,14 +136,17 @@ export class PlayComponent implements OnInit, OnDestroy {
this.data.contentObj = {}; this.data.contentObj = {};
} }
console.log("11111111111111111");
this.initDefaultData(); this.initDefaultData();
console.log("222222222222222222");
this.initAudio(); this.initAudio();
console.log("33333333333333");
this.initImg(); this.initImg();
console.log("4444444444444444");
this.initListener(); this.initListener();
console.log("5555555555555555");
}, this.KEY); }, this.KEY);
} }
...@@ -359,7 +362,7 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -359,7 +362,7 @@ export class PlayComponent implements OnInit, OnDestroy {
} }
initImg() { initImg() {
console.log("666666666666666666");
const contentObj = this.data.contentObj; const contentObj = this.data.contentObj;
if (contentObj) { if (contentObj) {
...@@ -389,12 +392,12 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -389,12 +392,12 @@ export class PlayComponent implements OnInit, OnDestroy {
// 预加载资源 // 预加载资源
console.log("777777777777777");
this.loadResources().then(() => { this.loadResources().then(() => {
// this.setfontData(); // this.setfontData();
console.log("888888888888888");
window['air'].hideAirClassLoading(this.KEY, this.data); window['air'].hideAirClassLoading(this.KEY, this.data);
console.log("9999999999999999");
this.init(); this.init();
this.update(); this.update();
}); });
...@@ -1316,13 +1319,13 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -1316,13 +1319,13 @@ export class PlayComponent implements OnInit, OnDestroy {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
const audio = new Audio(); const audio = new Audio();
audio.oncanplay = (a) => { audio.oncanplay = (a) => {
resolve();
}; };
audio.onerror = () => { audio.onerror = () => {
reject(); reject();
}; };
audio.src = url; audio.src = url;
audio.load(); audio.load();
resolve();
}); });
} }
......
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