@video-lab/react 1.0.1 → 2.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.
Files changed (2) hide show
  1. package/README.md +6 -6
  2. package/package.json +4 -4
package/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # @video-lab/react
2
2
 
3
- Video Lab Player 的 **React inline 消费面(L7)**。直连 player-core + player-ui,不走 iframe,首帧最快。
3
+ Video Lab Player 的 React inline 接入方式。它直连播放核心与覆盖层,不经过 iframe,首帧开销最低。
4
4
 
5
- 对外只有一个组件 `<VideoPlayer />` + 一个命令句柄。见 ADR-001。
5
+ 对外提供一个组件 `<VideoPlayer />` 与一个命令句柄。
6
6
 
7
7
  ## 什么时候用它
8
8
 
@@ -36,7 +36,7 @@ function Player() {
36
36
  return (
37
37
  <VideoPlayer
38
38
  ref={ref}
39
- source="https://cdn.example.com/live/master.m3u8"
39
+ source="https://media.example.com/live/master.m3u8"
40
40
  autoplay
41
41
  muted
42
42
  onReady={({ duration, quality, subtitles }) => {
@@ -66,9 +66,9 @@ await ref.current?.enterFullscreen()
66
66
 
67
67
  ## 边界
68
68
 
69
- - **只做技术**——播放能力、事件、命令、容错。品牌 UI(结束覆盖层、清晰度菜单、皮肤)归团队封装层,不在本包(ADR-021)
70
- - **props 面刻意和 `react-frame` 对齐**(去掉 iframe 专属的 `origin` / `version`),团队封装层在 inline / iframe 间切换成本最低(cross-mode-parity 测试保障)
71
- - **认证只支持签名 URL**,不接受自定义请求头(ADR-022)
69
+ - **只提供技术能力**——播放、事件、命令与容错;品牌 UI(结束覆盖层、清晰度菜单、皮肤)由消费应用提供。
70
+ - **props `@video-lab/react-frame` 尽量对齐**,但不包含 iframe 专属的 `origin` / `version`。
71
+ - **认证只支持签名 URL**,不接受自定义请求头。
72
72
  - `getPlayerHandle()` 是逃生舱,返回底层 player-core 句柄,给需要绕过 React 直接下命令的高级场景
73
73
 
74
74
  ## 相关
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@video-lab/react",
3
- "version": "1.0.1",
3
+ "version": "2.0.0",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -34,9 +34,9 @@
34
34
  "react-dom": ">=19.0.0"
35
35
  },
36
36
  "dependencies": {
37
- "@video-lab/protocol": "1.0.1",
38
- "@video-lab/player-core": "1.0.1",
39
- "@video-lab/player-ui": "1.0.1"
37
+ "@video-lab/protocol": "2.0.0",
38
+ "@video-lab/player-core": "2.0.0",
39
+ "@video-lab/player-ui": "2.0.0"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@testing-library/jest-dom": "^6.0.0",