Commit 73d8e085 authored by 李维's avatar 李维

添加录屏回调

parent 929ddc3a
...@@ -223,11 +223,19 @@ export function initAir(_this) { ...@@ -223,11 +223,19 @@ export function initAir(_this) {
window.courseware.callOcMethod("stopTestConvert", {}); window.courseware.callOcMethod("stopTestConvert", {});
}, },
startRecordScreen(option) { startRecordScreen(option, callback) {
window.courseware.hasCalledStartRecordScreen = true; window.courseware.hasCalledStartRecordScreen = true;
_this.log(`===成功调用startRecordScreen===`); _this.log(`===成功调用startRecordScreen===`);
// 录屏回调
window.air.recordScreenCallBack = (res) => {
res = typeof(res) == 'string' ? res : JSON.stringify(res);
_this.log(`===成功调用recordScreenCallBack=== res == ${res}`);
callback && callback(res);
window.air.recordScreenCallBack = null;
};
window.courseware.callOcMethod("startRecordScreen", option); window.courseware.callOcMethod("startRecordScreen", option);
}, },
stopRecordScreen(callback) { stopRecordScreen(callback) {
window.courseware.hasCalledStartRecordScreen = false; window.courseware.hasCalledStartRecordScreen = false;
_this.log(`===成功调用stopRecordScreen===`); _this.log(`===成功调用stopRecordScreen===`);
......
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