@video-lab/react-frame 3.1.0 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +146 -15
- package/dist/index.cjs +581 -45
- package/dist/index.d.cts +25 -8
- package/dist/index.d.mts +25 -8
- package/dist/index.mjs +571 -47
- package/package.json +4 -3
- package/skills/host-integration/SKILL.md +6 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@video-lab/react-frame",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -34,8 +34,9 @@
|
|
|
34
34
|
"react-dom": ">=19.0.0"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@video-lab/protocol": "
|
|
38
|
-
"@video-lab/
|
|
37
|
+
"@video-lab/protocol": "4.0.0",
|
|
38
|
+
"@video-lab/react-config": "4.0.0",
|
|
39
|
+
"@video-lab/frame-core": "4.0.0"
|
|
39
40
|
},
|
|
40
41
|
"devDependencies": {
|
|
41
42
|
"@testing-library/jest-dom": "^6.0.0",
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: video-lab-host-integration
|
|
3
3
|
skillVersion: 1
|
|
4
|
-
sdkMajor:
|
|
4
|
+
sdkMajor: 4
|
|
5
5
|
supportedPackages:
|
|
6
|
-
- '@video-lab/react-frame@
|
|
7
|
-
- '@video-lab/vue-frame@
|
|
6
|
+
- '@video-lab/react-frame@4.0.0'
|
|
7
|
+
- '@video-lab/vue-frame@4.0.0'
|
|
8
8
|
description: >-
|
|
9
9
|
在业务宿主项目中接入 Video Lab Player 时使用。选择五种接入面之一,完成可验证 demo,
|
|
10
10
|
并交接 SDK、宿主与服务端责任;不用于修改 SDK 契约或设计品牌 UI。
|
|
@@ -34,7 +34,7 @@ API 以已安装包的类型定义和对应 README 为准;本 Skill 只负责
|
|
|
34
34
|
## 实施顺序
|
|
35
35
|
|
|
36
36
|
1. 在宿主项目建立独立 demo 页面,使用服务端提供的完整、已授权 `MediaSource`。不要传 headers、token 刷新回调或业务 ID 给 SDK。
|
|
37
|
-
2. 以公开 `ready`、`PlayerEvent`、错误码和 `playablechange` 驱动业务状态。runtime Loading 只从 `!playable && recoverable` 派生。跨重连 telemetry
|
|
37
|
+
2. 以公开 `ready`、`PlayerEvent`、错误码和 `playablechange` 驱动业务状态。runtime Loading 只从 `!playable && recoverable` 派生。跨重连 telemetry、排序、去重和迟到事件识别使用唯一完整事件出口:React iframe 为 `onPlayerEvent`,Vue iframe 为 `@player-event`,静态 iframe 为 `onAny()`;新版事件的 `delivery` 提供生产端证据,旧 iframe 缺少时按未知处理。
|
|
38
38
|
3. 业务服务负责签名 URL、CORS、权益、字幕资源、弹幕审核与限流;品牌 UI、CTA、菜单和无障碍交互留在宿主。
|
|
39
39
|
4. 业务 telemetry 只记录允许的播放器事实:不要发送完整媒体 URL、query、签名、token、cookie、身份或弹幕正文。
|
|
40
40
|
5. 用真实或受控媒体覆盖首次加载、自动播放拒绝、可恢复/不可恢复错误、签名换源、字幕失败与卸载清理;恢复必须有时间或画面推进证据。
|
|
@@ -63,10 +63,9 @@ API 以已安装包的类型定义和对应 README 为准;本 Skill 只负责
|
|
|
63
63
|
## 宿主要求隐藏单个内置控件
|
|
64
64
|
|
|
65
65
|
使用初始化 `controlVisibility`,例如 `{ cssFullscreen: false }`;静态 iframe 使用 `controlCssFullscreen=0`。
|
|
66
|
-
保留 `controls` 布尔总开关,不覆盖内部 CSS
|
|
67
|
-
[控件显示指南](../../guides/PLAYER-CONTROL-VISIBILITY.md)。先确认安装版本实际包含该字段,
|
|
66
|
+
保留 `controls` 布尔总开关,不覆盖内部 CSS、不访问私有插件。八字段与重建语义以已安装包 README 和类型定义为准。先确认安装版本实际包含该字段,
|
|
68
67
|
iframe 同时核实支持此功能的精确应用版本已部署;旧 iframe 可能忽略新字段。
|
|
69
68
|
|
|
70
69
|
## 网页全屏交接
|
|
71
70
|
|
|
72
|
-
iframe CSS 全屏必须由宿主布局。四个框架组件传稳定的 `pageFullscreen` 适配器(`setActive`、`dispose`),静态 URL 用 `createPageFullscreenController` 绑定精确 origin 与 iframe。确认、Esc 和销毁清理由 SDK 编排;宿主负责层级、滚动、焦点恢复,不移动 iframe。未接适配器的新 iframe 隐藏入口。旧 iframe
|
|
71
|
+
iframe CSS 全屏必须由宿主布局。四个框架组件传稳定的 `pageFullscreen` 适配器(`setActive`、`dispose`),静态 URL 用 `createPageFullscreenController` 绑定精确 origin 与 iframe。确认、Esc 和销毁清理由 SDK 编排;宿主负责层级、滚动、焦点恢复,不移动 iframe。未接适配器的新 iframe 隐藏入口。旧 iframe 需配套升级,浏览器原生全屏仍独立。具体 API 以已安装包 README 和类型定义为准。
|