Commit 986ab4b6 authored by Li MingZhe's avatar Li MingZhe

feat: 开始事件

parent 2d91f011
......@@ -310,12 +310,31 @@ export class PlayComponent implements OnInit, OnDestroy {
load() {
// 预加载资源
this.loadResources().then(() => {
this.addServerListener();
window['air'].hideAirClassLoading(this.saveKey, this.data);
});
}
start() {
this.init();
this.update();
}
addServerListener() {
const c = (<any> window).courseware;
if (!c || !c.onEvent) {
return;
}
c.onEvent('course-in-screen', (data, next) => { // 学生端 初始化时调用
this.start();
next();
});
}
init() {
this.initCtx();
this.initData();
......
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