remotion 4.0.351 → 4.0.352

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.
@@ -1,3 +1,3 @@
1
1
  export declare const injectCSS: (css: string) => void;
2
- export declare const OFFTHREAD_VIDEO_CLASS_NAME = "__remotion_offthreadvideo";
2
+ export declare const OBJECTFIT_CONTAIN_CLASS_NAME = "__remotion_objectfitcontain";
3
3
  export declare const makeDefaultPreviewCSS: (scope: string | null, backgroundColor: string) => string;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.makeDefaultPreviewCSS = exports.OFFTHREAD_VIDEO_CLASS_NAME = exports.injectCSS = void 0;
3
+ exports.makeDefaultPreviewCSS = exports.OBJECTFIT_CONTAIN_CLASS_NAME = exports.injectCSS = void 0;
4
4
  const injected = {};
5
5
  const injectCSS = (css) => {
6
6
  // Skip in node
@@ -17,7 +17,8 @@ const injectCSS = (css) => {
17
17
  injected[css] = true;
18
18
  };
19
19
  exports.injectCSS = injectCSS;
20
- exports.OFFTHREAD_VIDEO_CLASS_NAME = '__remotion_offthreadvideo';
20
+ // make object-fit: contain low priority, so it can be overridden by another class name
21
+ exports.OBJECTFIT_CONTAIN_CLASS_NAME = '__remotion_objectfitcontain';
21
22
  const makeDefaultPreviewCSS = (scope, backgroundColor) => {
22
23
  if (!scope) {
23
24
  return `
@@ -28,7 +29,7 @@ const makeDefaultPreviewCSS = (scope, backgroundColor) => {
28
29
  margin: 0;
29
30
  background-color: ${backgroundColor};
30
31
  }
31
- .${exports.OFFTHREAD_VIDEO_CLASS_NAME} {
32
+ .${exports.OBJECTFIT_CONTAIN_CLASS_NAME} {
32
33
  object-fit: contain;
33
34
  }
34
35
  `;
@@ -41,7 +42,7 @@ const makeDefaultPreviewCSS = (scope, backgroundColor) => {
41
42
  width: 100%;
42
43
  height: 100%;
43
44
  }
44
- ${scope} .${exports.OFFTHREAD_VIDEO_CLASS_NAME} {
45
+ ${scope} .${exports.OBJECTFIT_CONTAIN_CLASS_NAME} {
45
46
  object-fit: contain;
46
47
  }
47
48
  `;
@@ -48,6 +48,8 @@ declare global {
48
48
  remotion_inputProps: string;
49
49
  remotion_envVariables: string;
50
50
  remotion_isMainTab: boolean;
51
+ remotion_mediaCacheSizeInBytes: number | null;
52
+ remotion_initialMemoryAvailable: number | null;
51
53
  remotion_collectAssets: () => TRenderAsset[];
52
54
  remotion_isPlayer: boolean;
53
55
  remotion_isStudio: boolean;
@@ -292,5 +292,6 @@ export declare const Internals: {
292
292
  readonly stack?: string | undefined;
293
293
  readonly onNativeError: React.ReactEventHandler<HTMLAudioElement>;
294
294
  }, "ref"> & import("react").RefAttributes<HTMLAudioElement>>;
295
+ readonly OBJECTFIT_CONTAIN_CLASS_NAME: "__remotion_objectfitcontain";
295
296
  };
296
297
  export type { CompositionManagerContext, CompProps, LoggingContextValue, MediaVolumeContextValue, RemotionEnvironment, SerializedJSONWithCustomFields, SetMediaVolumeContextValue, SetTimelineContextValue, TCompMetadata, TComposition, TimelineContextValue, TRenderAsset, TSequence, WatchRemotionStaticFilesPayload, };
@@ -44,6 +44,7 @@ const CanUseRemotionHooks_js_1 = require("./CanUseRemotionHooks.js");
44
44
  const CompositionManager_js_1 = require("./CompositionManager.js");
45
45
  const CompositionManagerContext_js_1 = require("./CompositionManagerContext.js");
46
46
  const CSSUtils = __importStar(require("./default-css.js"));
47
+ const default_css_js_1 = require("./default-css.js");
47
48
  const EditorProps_js_1 = require("./EditorProps.js");
48
49
  const enable_sequence_stack_traces_js_1 = require("./enable-sequence-stack-traces.js");
49
50
  const get_preview_dom_element_js_1 = require("./get-preview-dom-element.js");
@@ -167,4 +168,5 @@ exports.Internals = {
167
168
  RemotionEnvironmentContext: remotion_environment_context_js_1.RemotionEnvironmentContext,
168
169
  warnAboutTooHighVolume: volume_safeguard_js_1.warnAboutTooHighVolume,
169
170
  AudioForPreview: AudioForPreview_js_1.AudioForPreview,
171
+ OBJECTFIT_CONTAIN_CLASS_NAME: default_css_js_1.OBJECTFIT_CONTAIN_CLASS_NAME,
170
172
  };
@@ -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.351";
6
+ export declare const VERSION = "4.0.352";
@@ -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.351';
10
+ exports.VERSION = '4.0.352';
@@ -193,7 +193,7 @@ crossOrigin, audioStreamIndex, ...props }) => {
193
193
  }
194
194
  }, [imageSrc, onError]);
195
195
  const className = (0, react_1.useMemo)(() => {
196
- return [default_css_js_1.OFFTHREAD_VIDEO_CLASS_NAME, props.className]
196
+ return [default_css_js_1.OBJECTFIT_CONTAIN_CLASS_NAME, props.className]
197
197
  .filter(truthy_js_1.truthy)
198
198
  .join(' ');
199
199
  }, [props.className]);
@@ -105,7 +105,7 @@ function truthy(value) {
105
105
  }
106
106
 
107
107
  // src/version.ts
108
- var VERSION = "4.0.351";
108
+ var VERSION = "4.0.352";
109
109
 
110
110
  // src/multiple-versions-warning.ts
111
111
  var checkMultipleRemotionVersions = () => {
@@ -5740,7 +5740,7 @@ var exports_default_css = {};
5740
5740
  __export(exports_default_css, {
5741
5741
  makeDefaultPreviewCSS: () => makeDefaultPreviewCSS,
5742
5742
  injectCSS: () => injectCSS,
5743
- OFFTHREAD_VIDEO_CLASS_NAME: () => OFFTHREAD_VIDEO_CLASS_NAME
5743
+ OBJECTFIT_CONTAIN_CLASS_NAME: () => OBJECTFIT_CONTAIN_CLASS_NAME
5744
5744
  });
5745
5745
  var injected = {};
5746
5746
  var injectCSS = (css) => {
@@ -5756,7 +5756,7 @@ var injectCSS = (css) => {
5756
5756
  head.prepend(style);
5757
5757
  injected[css] = true;
5758
5758
  };
5759
- var OFFTHREAD_VIDEO_CLASS_NAME = "__remotion_offthreadvideo";
5759
+ var OBJECTFIT_CONTAIN_CLASS_NAME = "__remotion_objectfitcontain";
5760
5760
  var makeDefaultPreviewCSS = (scope, backgroundColor) => {
5761
5761
  if (!scope) {
5762
5762
  return `
@@ -5767,7 +5767,7 @@ var makeDefaultPreviewCSS = (scope, backgroundColor) => {
5767
5767
  margin: 0;
5768
5768
  background-color: ${backgroundColor};
5769
5769
  }
5770
- .${OFFTHREAD_VIDEO_CLASS_NAME} {
5770
+ .${OBJECTFIT_CONTAIN_CLASS_NAME} {
5771
5771
  object-fit: contain;
5772
5772
  }
5773
5773
  `;
@@ -5780,7 +5780,7 @@ var makeDefaultPreviewCSS = (scope, backgroundColor) => {
5780
5780
  width: 100%;
5781
5781
  height: 100%;
5782
5782
  }
5783
- ${scope} .${OFFTHREAD_VIDEO_CLASS_NAME} {
5783
+ ${scope} .${OBJECTFIT_CONTAIN_CLASS_NAME} {
5784
5784
  object-fit: contain;
5785
5785
  }
5786
5786
  `;
@@ -6484,7 +6484,8 @@ var Internals = {
6484
6484
  compositionSelectorRef,
6485
6485
  RemotionEnvironmentContext,
6486
6486
  warnAboutTooHighVolume,
6487
- AudioForPreview
6487
+ AudioForPreview,
6488
+ OBJECTFIT_CONTAIN_CLASS_NAME
6488
6489
  };
6489
6490
  // src/interpolate-colors.ts
6490
6491
  var NUMBER = "[-+]?\\d*\\.?\\d+";
@@ -7509,7 +7510,7 @@ var OffthreadVideoForRendering = ({
7509
7510
  }
7510
7511
  }, [imageSrc, onError]);
7511
7512
  const className = useMemo29(() => {
7512
- return [OFFTHREAD_VIDEO_CLASS_NAME, props2.className].filter(truthy).join(" ");
7513
+ return [OBJECTFIT_CONTAIN_CLASS_NAME, props2.className].filter(truthy).join(" ");
7513
7514
  }, [props2.className]);
7514
7515
  const onImageFrame = useCallback15((img) => {
7515
7516
  if (onVideoFrame) {
@@ -1,5 +1,5 @@
1
1
  // src/version.ts
2
- var VERSION = "4.0.351";
2
+ var VERSION = "4.0.352";
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.351",
6
+ "version": "4.0.352",
7
7
  "description": "Make videos programmatically",
8
8
  "main": "dist/cjs/index.js",
9
9
  "types": "dist/cjs/index.d.ts",
@@ -28,7 +28,7 @@
28
28
  "webpack": "5.96.1",
29
29
  "zod": "3.22.3",
30
30
  "eslint": "9.19.0",
31
- "@remotion/eslint-config-internal": "4.0.351"
31
+ "@remotion/eslint-config-internal": "4.0.352"
32
32
  },
33
33
  "keywords": [
34
34
  "video",