remotion 4.0.364 → 4.0.366

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.
@@ -57,12 +57,15 @@ const Freeze = ({ frame: frameToFreeze, children, active = true, }) => {
57
57
  if (!sequenceContext) {
58
58
  return null;
59
59
  }
60
+ if (!isActive) {
61
+ return sequenceContext;
62
+ }
60
63
  return {
61
64
  ...sequenceContext,
62
65
  relativeFrom: 0,
63
66
  cumulatedFrom: 0,
64
67
  };
65
- }, [sequenceContext]);
68
+ }, [sequenceContext, isActive]);
66
69
  return ((0, jsx_runtime_1.jsx)(timeline_position_state_js_1.TimelineContext.Provider, { value: timelineValue, children: (0, jsx_runtime_1.jsx)(SequenceContext_js_1.SequenceContext.Provider, { value: newSequenceContext, children: children }) }));
67
70
  };
68
71
  exports.Freeze = Freeze;
@@ -356,5 +356,19 @@ export declare const Internals: {
356
356
  readonly setInputPropsOverride: (override: Record<string, unknown> | null) => void;
357
357
  readonly useVideoEnabled: () => boolean;
358
358
  readonly useAudioEnabled: () => boolean;
359
+ readonly useIsPlayerBuffering: (bufferManager: {
360
+ addBlock: (block: {
361
+ id: string;
362
+ }) => {
363
+ unblock: () => void;
364
+ };
365
+ listenForBuffering: (callback: () => void) => {
366
+ remove: () => void;
367
+ };
368
+ listenForResume: (callback: () => void) => {
369
+ remove: () => void;
370
+ };
371
+ buffering: React.MutableRefObject<boolean>;
372
+ }) => boolean;
359
373
  };
360
374
  export type { CompositionManagerContext, CompProps, LoggingContextValue, MediaVolumeContextValue, RemotionEnvironment, SerializedJSONWithCustomFields, SetMediaVolumeContextValue, SetTimelineContextValue, TCompMetadata, TComposition, TimelineContextValue, TRenderAsset, TSequence, WatchRemotionStaticFilesPayload, };
@@ -182,4 +182,5 @@ exports.Internals = {
182
182
  setInputPropsOverride: input_props_override_js_1.setInputPropsOverride,
183
183
  useVideoEnabled: use_media_enabled_js_1.useVideoEnabled,
184
184
  useAudioEnabled: use_media_enabled_js_1.useAudioEnabled,
185
+ useIsPlayerBuffering: buffering_js_1.useIsPlayerBuffering,
185
186
  };
@@ -3,4 +3,4 @@
3
3
  * @see [Documentation](https://remotion.dev/docs/version)
4
4
  * @returns {string} The current version of the remotion package
5
5
  */
6
- export declare const VERSION = "4.0.364";
6
+ export declare const VERSION = "4.0.366";
@@ -7,4 +7,4 @@ exports.VERSION = void 0;
7
7
  * @see [Documentation](https://remotion.dev/docs/version)
8
8
  * @returns {string} The current version of the remotion package
9
9
  */
10
- exports.VERSION = '4.0.364';
10
+ exports.VERSION = '4.0.366';
@@ -110,7 +110,7 @@ function truthy(value) {
110
110
  }
111
111
 
112
112
  // src/version.ts
113
- var VERSION = "4.0.364";
113
+ var VERSION = "4.0.366";
114
114
 
115
115
  // src/multiple-versions-warning.ts
116
116
  var checkMultipleRemotionVersions = () => {
@@ -1367,12 +1367,15 @@ var Freeze = ({
1367
1367
  if (!sequenceContext) {
1368
1368
  return null;
1369
1369
  }
1370
+ if (!isActive) {
1371
+ return sequenceContext;
1372
+ }
1370
1373
  return {
1371
1374
  ...sequenceContext,
1372
1375
  relativeFrom: 0,
1373
1376
  cumulatedFrom: 0
1374
1377
  };
1375
- }, [sequenceContext]);
1378
+ }, [sequenceContext, isActive]);
1376
1379
  return /* @__PURE__ */ jsx7(TimelineContext.Provider, {
1377
1380
  value: timelineValue,
1378
1381
  children: /* @__PURE__ */ jsx7(SequenceContext.Provider, {
@@ -7051,7 +7054,8 @@ var Internals = {
7051
7054
  getInputPropsOverride,
7052
7055
  setInputPropsOverride,
7053
7056
  useVideoEnabled,
7054
- useAudioEnabled
7057
+ useAudioEnabled,
7058
+ useIsPlayerBuffering
7055
7059
  };
7056
7060
  // src/interpolate-colors.ts
7057
7061
  var NUMBER = "[-+]?\\d*\\.?\\d+";
@@ -1,5 +1,5 @@
1
1
  // src/version.ts
2
- var VERSION = "4.0.364";
2
+ var VERSION = "4.0.366";
3
3
  export {
4
4
  VERSION
5
5
  };
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "url": "https://github.com/remotion-dev/remotion/tree/main/packages/core"
4
4
  },
5
5
  "name": "remotion",
6
- "version": "4.0.364",
6
+ "version": "4.0.366",
7
7
  "description": "Make videos programmatically",
8
8
  "main": "dist/cjs/index.js",
9
9
  "types": "dist/cjs/index.d.ts",
@@ -34,7 +34,7 @@
34
34
  "react-dom": "19.0.0",
35
35
  "webpack": "5.96.1",
36
36
  "zod": "3.22.3",
37
- "@remotion/eslint-config-internal": "4.0.364",
37
+ "@remotion/eslint-config-internal": "4.0.366",
38
38
  "eslint": "9.19.0"
39
39
  },
40
40
  "keywords": [
package/bundle.ts DELETED
@@ -1,52 +0,0 @@
1
- import {build, semver, version} from 'bun';
2
-
3
- if (process.env.NODE_ENV !== 'production') {
4
- throw new Error('This script must be run using NODE_ENV=production');
5
- }
6
-
7
- if (!semver.satisfies(version, '^1.1.7')) {
8
- // eslint-disable-next-line no-console
9
- console.error(
10
- `There is a bug with bundling when using Bun <1.1.7. You use ${version}. Please use a newer version`,
11
- );
12
- process.exit(1);
13
- }
14
-
15
- const output = await build({
16
- entrypoints: ['src/index.ts'],
17
- naming: '[name].mjs',
18
- target: 'browser',
19
- external: ['remotion', 'remotion/no-react', 'react', 'react-dom'],
20
- });
21
-
22
- const [file] = output.outputs;
23
- const text = await file.text();
24
- await Bun.write('dist/esm/index.mjs', text);
25
-
26
- const versionOutput = await build({
27
- entrypoints: ['src/version.ts'],
28
- naming: '[name].mjs',
29
- target: 'browser',
30
- });
31
-
32
- const [versionFile] = versionOutput.outputs;
33
- await Bun.write('dist/esm/version.mjs', await versionFile.text());
34
-
35
- const noReactOutput = await build({
36
- entrypoints: ['src/no-react.ts'],
37
- naming: '[name].mjs',
38
- target: 'browser',
39
- external: ['remotion', 'react', 'react-dom'],
40
- });
41
- const [noReactFile] = noReactOutput.outputs;
42
- const noReactText = await noReactFile.text();
43
-
44
- if (noReactText.includes('createContext')) {
45
- throw new Error('remotion/no-react.mjs should not import React');
46
- }
47
-
48
- await Bun.write('dist/esm/no-react.mjs', noReactText);
49
-
50
- export {};
51
-
52
- console.log('Done.');
@@ -1,48 +0,0 @@
1
- const path = require('node:path');
2
- const fs = require('node:fs');
3
- const cp = require('node:child_process');
4
-
5
- const packageJson = JSON.parse(fs.readFileSync('package.json'));
6
- const {version} = packageJson;
7
- const src =
8
- `
9
- // Automatically generated on publish
10
-
11
- /**
12
- * @description Provides the current version number of the Remotion library.
13
- * @see [Documentation](https://remotion.dev/docs/version)
14
- * @returns {string} The current version of the remotion package
15
- */
16
- export const VERSION = '${version}';
17
- `.trim() + '\n';
18
-
19
- fs.writeFileSync(path.resolve(process.cwd(), 'src/version.ts'), src);
20
-
21
- cp.execSync('bun run make');
22
- cp.execSync('bun x tsc -d');
23
-
24
- const distFile = fs.readFileSync('dist/esm/version.mjs', 'utf-8');
25
-
26
- if (!distFile.includes(version)) {
27
- console.log('In dist file, did not include ' + JSON.stringify(version));
28
- process.exit(1);
29
- }
30
-
31
- const distFileCjs = fs.readFileSync('dist/cjs/version.js', 'utf-8');
32
-
33
- if (!distFileCjs.includes(version)) {
34
- console.log('In dist file, did not include ' + JSON.stringify(version));
35
- process.exit(1);
36
- }
37
-
38
- console.log('Updated version to v' + version);
39
-
40
- const wrongDistFileExists = fs.existsSync('dist/index.js', 'utf-8');
41
- if (wrongDistFileExists) {
42
- throw new Error('Wrong dist file exists');
43
- }
44
-
45
- const wrongDistFileExists2 = fs.existsSync('dist/index.mjs', 'utf-8');
46
- if (wrongDistFileExists2) {
47
- throw new Error('Wrong dist file exists');
48
- }
package/eslint.config.mjs DELETED
@@ -1,11 +0,0 @@
1
- import {remotionFlatConfig} from '@remotion/eslint-config-internal';
2
-
3
- const config = remotionFlatConfig({react: true});
4
-
5
- export default {
6
- ...config,
7
- rules: {
8
- ...config.rules,
9
- 'no-console': 'error',
10
- },
11
- };
package/happydom.ts DELETED
@@ -1,6 +0,0 @@
1
- import {GlobalRegistrator} from '@happy-dom/global-registrator';
2
-
3
- GlobalRegistrator.register();
4
- window.origin = 'http://localhost:3000';
5
- // @ts-expect-error
6
- window.remotion_staticBase = '/static-abcdef';
package/test.ts DELETED
@@ -1 +0,0 @@
1
- import 'whatwg-mimetype';