@video-lab/react-frame 4.0.1 → 4.1.1

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/dist/index.cjs CHANGED
@@ -246,6 +246,7 @@ function useFrameConnection(props, hasCustomPoster = false, hasCustomPause = fal
246
246
  let cancelled = false;
247
247
  const container = containerRef.current;
248
248
  if (!container) return;
249
+ const handshake = new AbortController();
249
250
  const p = propsRef.current;
250
251
  setHostOwnsOverlays(false);
251
252
  (0, _video_lab_frame_core.createPlayerFrame)({
@@ -253,6 +254,7 @@ function useFrameConnection(props, hasCustomPoster = false, hasCustomPause = fal
253
254
  source: activeSourceRef.current,
254
255
  config: toConfig(p, hasCustomPoster, hasCustomPause),
255
256
  renderDefaultFallback: false,
257
+ signal: handshake.signal,
256
258
  onHostOverlayOwnershipChange: (owned) => setHostOwnsOverlays(owned),
257
259
  sourceSwitching: sourceSwitchRef.current !== null,
258
260
  pageFullscreen: p.pageFullscreen,
@@ -355,6 +357,7 @@ function useFrameConnection(props, hasCustomPoster = false, hasCustomPause = fal
355
357
  });
356
358
  return () => {
357
359
  cancelled = true;
360
+ handshake.abort();
358
361
  handleRef.current?.destroy();
359
362
  handleRef.current = null;
360
363
  };
package/dist/index.mjs CHANGED
@@ -245,6 +245,7 @@ function useFrameConnection(props, hasCustomPoster = false, hasCustomPause = fal
245
245
  let cancelled = false;
246
246
  const container = containerRef.current;
247
247
  if (!container) return;
248
+ const handshake = new AbortController();
248
249
  const p = propsRef.current;
249
250
  setHostOwnsOverlays(false);
250
251
  createPlayerFrame({
@@ -252,6 +253,7 @@ function useFrameConnection(props, hasCustomPoster = false, hasCustomPause = fal
252
253
  source: activeSourceRef.current,
253
254
  config: toConfig(p, hasCustomPoster, hasCustomPause),
254
255
  renderDefaultFallback: false,
256
+ signal: handshake.signal,
255
257
  onHostOverlayOwnershipChange: (owned) => setHostOwnsOverlays(owned),
256
258
  sourceSwitching: sourceSwitchRef.current !== null,
257
259
  pageFullscreen: p.pageFullscreen,
@@ -354,6 +356,7 @@ function useFrameConnection(props, hasCustomPoster = false, hasCustomPause = fal
354
356
  });
355
357
  return () => {
356
358
  cancelled = true;
359
+ handshake.abort();
357
360
  handleRef.current?.destroy();
358
361
  handleRef.current = null;
359
362
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@video-lab/react-frame",
3
- "version": "4.0.1",
3
+ "version": "4.1.1",
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": "4.0.1",
38
- "@video-lab/react-config": "4.0.1",
39
- "@video-lab/frame-core": "4.0.1"
37
+ "@video-lab/protocol": "4.1.1",
38
+ "@video-lab/frame-core": "4.1.1",
39
+ "@video-lab/react-config": "4.1.1"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@testing-library/jest-dom": "^6.0.0",
@@ -3,8 +3,8 @@ name: video-lab-host-integration
3
3
  skillVersion: 1
4
4
  sdkMajor: 4
5
5
  supportedPackages:
6
- - '@video-lab/react-frame@4.0.1'
7
- - '@video-lab/vue-frame@4.0.1'
6
+ - '@video-lab/react-frame@4.1.1'
7
+ - '@video-lab/vue-frame@4.1.1'
8
8
  description: >-
9
9
  在业务宿主项目中接入 Video Lab Player 时使用。选择五种接入面之一,完成可验证 demo,
10
10
  并交接 SDK、宿主与服务端责任;不用于修改 SDK 契约或设计品牌 UI。