@remotion/three 4.0.298 → 4.0.300

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.
@@ -106,6 +106,12 @@ const useVideoTexture = (videoRef) => {
106
106
  };
107
107
  current.requestVideoFrameCallback(ready);
108
108
  }, [frame, loaded, videoRef]);
109
+ (0, react_1.useEffect)(() => {
110
+ // Clean up on unmount
111
+ return () => {
112
+ (0, remotion_1.continueRender)(loaded);
113
+ };
114
+ }, [loaded]);
109
115
  if (typeof HTMLVideoElement === 'undefined' ||
110
116
  !HTMLVideoElement.prototype.requestVideoFrameCallback) {
111
117
  (0, remotion_1.continueRender)(loaded);
@@ -204,7 +204,7 @@ function useOffthreadVideoTexture({
204
204
  });
205
205
  }
206
206
  // src/use-video-texture.ts
207
- import React3, { useCallback as useCallback3, useState as useState3 } from "react";
207
+ import React3, { useCallback as useCallback3, useEffect, useState as useState3 } from "react";
208
208
  import { continueRender as continueRender4, delayRender as delayRender4, useCurrentFrame as useCurrentFrame2 } from "remotion";
209
209
  var warned = false;
210
210
  var warnAboutRequestVideoFrameCallback = () => {
@@ -266,6 +266,11 @@ var useVideoTexture = (videoRef) => {
266
266
  const ready = () => {};
267
267
  current.requestVideoFrameCallback(ready);
268
268
  }, [frame, loaded, videoRef]);
269
+ useEffect(() => {
270
+ return () => {
271
+ continueRender4(loaded);
272
+ };
273
+ }, [loaded]);
269
274
  if (typeof HTMLVideoElement === "undefined" || !HTMLVideoElement.prototype.requestVideoFrameCallback) {
270
275
  continueRender4(loaded);
271
276
  return null;
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "url": "https://github.com/remotion-dev/remotion/tree/main/packages/three"
4
4
  },
5
5
  "name": "@remotion/three",
6
- "version": "4.0.298",
6
+ "version": "4.0.300",
7
7
  "description": "Include React Three Fiber components in a Remotion video",
8
8
  "main": "dist/cjs/index.js",
9
9
  "types": "dist/cjs/index.d.ts",
@@ -16,17 +16,17 @@
16
16
  "url": "https://github.com/remotion-dev/remotion/issues"
17
17
  },
18
18
  "dependencies": {
19
- "remotion": "4.0.298"
19
+ "remotion": "4.0.300"
20
20
  },
21
21
  "peerDependencies": {
22
22
  "@react-three/fiber": ">=8.0.0",
23
23
  "react": ">=16.8.0",
24
24
  "react-dom": ">=16.8.0",
25
25
  "three": ">=0.137.0",
26
- "remotion": "4.0.298"
26
+ "remotion": "4.0.300"
27
27
  },
28
28
  "devDependencies": {
29
- "@react-three/fiber": "9.0.0-rc.6",
29
+ "@react-three/fiber": "9.1.2",
30
30
  "@types/react-reconciler": "0.28.8",
31
31
  "@types/three": "0.170.0",
32
32
  "@types/web": "0.0.166",
@@ -34,8 +34,8 @@
34
34
  "react-dom": "19.0.0",
35
35
  "three": "0.171.0",
36
36
  "eslint": "9.19.0",
37
- "remotion": "4.0.298",
38
- "@remotion/eslint-config-internal": "4.0.298"
37
+ "remotion": "4.0.300",
38
+ "@remotion/eslint-config-internal": "4.0.300"
39
39
  },
40
40
  "keywords": [
41
41
  "remotion",