Commit 848859c9 authored by Li MingZhe's avatar Li MingZhe

feat: 开始事件

parent 87ade0fe
...@@ -139,9 +139,26 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -139,9 +139,26 @@ export class PlayComponent implements OnInit, OnDestroy {
// 预加载资源 // 预加载资源
this.loadResources().then(() => { this.loadResources().then(() => {
this.addServerListener();
window["air"].hideAirClassLoading(this.saveKey, this.data); window["air"].hideAirClassLoading(this.saveKey, this.data);
this.init(); });
this.update(); }
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();
}); });
} }
......
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