Commit bba74941 authored by limingzhe's avatar limingzhe

update preload audio

parent ed63dcea
......@@ -140,13 +140,15 @@ export class Cartoon {
return new Promise((resolve, reject) => {
const audio = new Audio();
audio.oncanplay = a => {
resolve(audio);
// resolve(audio);
};
audio.onerror = () => {
reject();
};
audio.src = url;
audio.load();
resolve(audio);
});
}
......@@ -249,4 +251,4 @@ export class Cartoon {
}
animation = new CartoonAnimation(this)
}
\ No newline at end of file
}
......@@ -687,10 +687,10 @@ export class PlayComponent implements OnInit, OnDestroy {
this.initGroup();
if(this.g_teacherFlag){
this.initStartButton()
this.initTeacherListener()
// this.initTeacherListener()
}else{
this.initCover()
this.initStudentListener();
// this.initStudentListener();
}
}
......@@ -1987,6 +1987,12 @@ export class PlayComponent implements OnInit, OnDestroy {
this.update();
this.systemReady();
if(this.g_teacherFlag){
this.initTeacherListener()
}else{
this.initStudentListener();
}
window["air"].hideAirClassLoading(this.g_KEY, this.g_data);
});
......
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