适用版本:≥ 1.3.18
// 主进程
const { initRemoteMain } = require('@plasosdk/plaso-electron-sdk');
// 渲染进程
const PlasoElectronSdk = window.require('@plasosdk/plaso-electron-sdk');| API | 进程 | 返回值 | 起始版本 |
|---|---|---|---|
initRemoteMain(remoteMain) | 主 | - | - |
getVersion() | 渲染 | string(异常 -99) | - |
initLogConfig(logDir) | 渲染 | - | - |
createLiveClassWindow(params) | 渲染 | number 错误码(实时课堂 / 极速课堂) | - |
createLocalRecordWindow(params) | 渲染 | number 错误码 | 1.3.19 |
insertObject(fileObject) | 渲染 | 无(异常 -99) | - |
uploadMiniLesson(query, path, options) | 渲染 | Promise<{code,path,cover}> | 1.3.19 |
updateProhibitedWords(words) | 渲染 | 无(异常 -99) | 1.3.16 |
closeLiveClassWindow() | 渲染 | number 错误码 | 1.3.19 |
closeLocalRecordWindow() | 渲染 | number 错误码 | 1.3.19 |
FILE_TYPE | 渲染 | 常量 | - |
function initRemoteMain(remoteMain: typeof import('@electron/remote/main')): void;initialize() 的 @electron/remote/main。function getVersion(): string;function initLogConfig(logFilePath: string): void;function createLiveClassWindow(params: ClassWindowType): number;
function createLocalRecordWindow(params: ClassWindowType): number;function insertObject(fileData: FileDataObj): void;onClassWindowReadyFn 之后调用,见 资料中心。function updateProhibitedWords(words: string[]): void;userType=listener)生效;onClassWindowReadyFn 之后调用。function closeLiveClassWindow(): number;
function closeLocalRecordWindow(): number;onClassWindowLeaveFn 回调为准。| 方法 | 对应窗口 |
|---|---|
closeLiveClassWindow() | 实时课堂窗口 |
closeLocalRecordWindow() | 微课录制窗口 |
| 返回值 | 情况 |
|---|---|
0 | 已发起退出流程;退出流程已在进行中时重复调用也返回 0 |
-99 | 当前没有打开的窗口,或窗口尚未就绪(onClassWindowReadyFn 之前) |
-99 | 当前打开的窗口类型与方法不匹配(如微课窗口打开时调用 closeLiveClassWindow()) |
-99 | 发起退出时发生其他异常 |
