适用版本:≥ 1.72.402
| 项 | 说明 |
|---|---|
recordId | 历史课堂 ID |
| 播放器 query | 服务端按 appType=player 生成签名 query(🔒 签名在服务端完成) |
| 播放容器 | jssdk 接入时挂载的 DOM,创建播放器时必须传入 |
| 资源 URL 接口 | 播放含以 info 方式插入的资源(私有资源 / 预解析资源)时需要 |
| 资源 | 地址 |
|---|---|
| URL 接入 | https://wwwr.plaso.cn/static/sdk/styleupime/{version}/?{query} |
| jssdk JS | https://wwwr.plaso.cn/static/sdk/js/plaso_upime_player-{version}.js |
| jssdk CSS | https://wwwr.plaso.cn/static/sdk/js/plaso_upime_player-{version}.css |
| 参数 | 类型 | 必填 | 默认值 | 说明 | 起始版本 |
|---|---|---|---|---|---|
appId | string | 是 | - | 机构 appId | - |
appType | string | 是 | - | 固定 player | - |
recordId | string | 是 | - | 历史课堂 ID | - |
validBegin / validTime | number | 是 | - | 签名有效期(Unix 秒) | - |
signature | string | 是 | - | 签名 | - |
showType | number | 否 | - | 1 仅头像,2 仅白板,40 头像+白板 | 1.60.131 |
avatarHeight | number | 否 | - | showType=40 时生效,最小 90;大于播放器高度按播放器高度 | 1.60.131 |
setSrcconst player = new PlasoUpimePlayer(dom: HTMLElement); // dom 必填:播放器挂载的容器元素
await player.setSrc(query: string, option?: SetSrcOption);setSrc,重复调用抛出 DOMException('already set src');切换课堂请 destroy() 后新建实例。SetSrcOption| 参数 | 类型 | 必填 | 默认值 | 说明 | 起始版本 |
|---|---|---|---|---|---|
getFileName | (fileName: string, isPublic: boolean) => Promise<string> | 否 | - | 历史课堂存储于客户自有 OSS 时使用;isPublic=true 表示期望无签名公开地址 | - |
path | string | 否 | - | 与 getFileName 配合,作为相对路径前缀 | - |
getExtFileName | (info: any[]) => Promise<string> | 否 | - | 含以 info 方式插入的普通资源时必填 | - |
getPreParseFileName | (info: any[], option: { suffix: string }) => Promise<string> | 否 | - | 含预解析资源时必填 | 1.60.116 |
