remotion 4.0.350 → 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.
- package/dist/cjs/default-css.d.ts +1 -1
- package/dist/cjs/default-css.js +5 -4
- package/dist/cjs/index.d.ts +2 -0
- package/dist/cjs/internals.d.ts +28 -0
- package/dist/cjs/internals.js +4 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/video/OffthreadVideoForRendering.js +1 -1
- package/dist/cjs/video/use-audio-channel-index.d.ts +4 -0
- package/dist/cjs/video/use-audio-channel-index.js +13 -0
- package/dist/esm/index.mjs +9 -7
- package/dist/esm/version.mjs +1 -1
- package/package.json +2 -2
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export declare const injectCSS: (css: string) => void;
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const OBJECTFIT_CONTAIN_CLASS_NAME = "__remotion_objectfitcontain";
|
|
3
3
|
export declare const makeDefaultPreviewCSS: (scope: string | null, backgroundColor: string) => string;
|
package/dist/cjs/default-css.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.makeDefaultPreviewCSS = exports.
|
|
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
|
-
|
|
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.
|
|
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.
|
|
45
|
+
${scope} .${exports.OBJECTFIT_CONTAIN_CLASS_NAME} {
|
|
45
46
|
object-fit: contain;
|
|
46
47
|
}
|
|
47
48
|
`;
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -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;
|
package/dist/cjs/internals.d.ts
CHANGED
|
@@ -265,5 +265,33 @@ export declare const Internals: {
|
|
|
265
265
|
} | null>;
|
|
266
266
|
readonly RemotionEnvironmentContext: import("react").Context<RemotionEnvironment | null>;
|
|
267
267
|
readonly warnAboutTooHighVolume: (volume: number) => void;
|
|
268
|
+
readonly AudioForPreview: import("react").ForwardRefExoticComponent<Omit<import("./index.js").NativeAudioProps & {
|
|
269
|
+
name?: string;
|
|
270
|
+
volume?: import("./volume-prop.js").VolumeProp;
|
|
271
|
+
playbackRate?: number;
|
|
272
|
+
acceptableTimeShiftInSeconds?: number;
|
|
273
|
+
allowAmplificationDuringRender?: boolean;
|
|
274
|
+
_remotionInternalNeedsDurationCalculation?: boolean;
|
|
275
|
+
_remotionInternalNativeLoopPassed?: boolean;
|
|
276
|
+
toneFrequency?: number;
|
|
277
|
+
useWebAudioApi?: boolean;
|
|
278
|
+
pauseWhenBuffering?: boolean;
|
|
279
|
+
showInTimeline?: boolean;
|
|
280
|
+
delayRenderTimeoutInMilliseconds?: number;
|
|
281
|
+
delayRenderRetries?: number;
|
|
282
|
+
loopVolumeCurveBehavior?: import("./audio/use-audio-frame.js").LoopVolumeCurveBehavior;
|
|
283
|
+
onError?: (err: Error) => void;
|
|
284
|
+
audioStreamIndex?: number;
|
|
285
|
+
} & {
|
|
286
|
+
readonly shouldPreMountAudioTags: boolean;
|
|
287
|
+
readonly onDuration: (src: string, durationInSeconds: number) => void;
|
|
288
|
+
readonly pauseWhenBuffering: boolean;
|
|
289
|
+
readonly _remotionInternalNativeLoopPassed: boolean;
|
|
290
|
+
readonly _remotionInternalStack: string | null;
|
|
291
|
+
readonly showInTimeline: boolean;
|
|
292
|
+
readonly stack?: string | undefined;
|
|
293
|
+
readonly onNativeError: React.ReactEventHandler<HTMLAudioElement>;
|
|
294
|
+
}, "ref"> & import("react").RefAttributes<HTMLAudioElement>>;
|
|
295
|
+
readonly OBJECTFIT_CONTAIN_CLASS_NAME: "__remotion_objectfitcontain";
|
|
268
296
|
};
|
|
269
297
|
export type { CompositionManagerContext, CompProps, LoggingContextValue, MediaVolumeContextValue, RemotionEnvironment, SerializedJSONWithCustomFields, SetMediaVolumeContextValue, SetTimelineContextValue, TCompMetadata, TComposition, TimelineContextValue, TRenderAsset, TSequence, WatchRemotionStaticFilesPayload, };
|
package/dist/cjs/internals.js
CHANGED
|
@@ -36,6 +36,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
36
36
|
exports.Internals = void 0;
|
|
37
37
|
const react_1 = require("react");
|
|
38
38
|
const absolute_src_js_1 = require("./absolute-src.js");
|
|
39
|
+
const AudioForPreview_js_1 = require("./audio/AudioForPreview.js");
|
|
39
40
|
const shared_audio_tags_js_1 = require("./audio/shared-audio-tags.js");
|
|
40
41
|
const use_audio_frame_js_1 = require("./audio/use-audio-frame.js");
|
|
41
42
|
const buffering_js_1 = require("./buffering.js");
|
|
@@ -43,6 +44,7 @@ const CanUseRemotionHooks_js_1 = require("./CanUseRemotionHooks.js");
|
|
|
43
44
|
const CompositionManager_js_1 = require("./CompositionManager.js");
|
|
44
45
|
const CompositionManagerContext_js_1 = require("./CompositionManagerContext.js");
|
|
45
46
|
const CSSUtils = __importStar(require("./default-css.js"));
|
|
47
|
+
const default_css_js_1 = require("./default-css.js");
|
|
46
48
|
const EditorProps_js_1 = require("./EditorProps.js");
|
|
47
49
|
const enable_sequence_stack_traces_js_1 = require("./enable-sequence-stack-traces.js");
|
|
48
50
|
const get_preview_dom_element_js_1 = require("./get-preview-dom-element.js");
|
|
@@ -165,4 +167,6 @@ exports.Internals = {
|
|
|
165
167
|
compositionSelectorRef,
|
|
166
168
|
RemotionEnvironmentContext: remotion_environment_context_js_1.RemotionEnvironmentContext,
|
|
167
169
|
warnAboutTooHighVolume: volume_safeguard_js_1.warnAboutTooHighVolume,
|
|
170
|
+
AudioForPreview: AudioForPreview_js_1.AudioForPreview,
|
|
171
|
+
OBJECTFIT_CONTAIN_CLASS_NAME: default_css_js_1.OBJECTFIT_CONTAIN_CLASS_NAME,
|
|
168
172
|
};
|
package/dist/cjs/version.d.ts
CHANGED
package/dist/cjs/version.js
CHANGED
|
@@ -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.
|
|
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]);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useAudioChannelIndex = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const useAudioChannelIndex = ({ ref, audioChannelIndex, }) => {
|
|
6
|
+
(0, react_1.useEffect)(() => {
|
|
7
|
+
var _a;
|
|
8
|
+
// @ts-expect-error
|
|
9
|
+
const audioChannels = (_a = ref === null || ref === void 0 ? void 0 : ref.current) === null || _a === void 0 ? void 0 : _a.audioTracks;
|
|
10
|
+
console.log({ audioChannels, audioChannelIndex });
|
|
11
|
+
}, [ref, audioChannelIndex]);
|
|
12
|
+
};
|
|
13
|
+
exports.useAudioChannelIndex = useAudioChannelIndex;
|
package/dist/esm/index.mjs
CHANGED
|
@@ -105,7 +105,7 @@ function truthy(value) {
|
|
|
105
105
|
}
|
|
106
106
|
|
|
107
107
|
// src/version.ts
|
|
108
|
-
var VERSION = "4.0.
|
|
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
|
-
|
|
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
|
|
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
|
-
.${
|
|
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} .${
|
|
5783
|
+
${scope} .${OBJECTFIT_CONTAIN_CLASS_NAME} {
|
|
5784
5784
|
object-fit: contain;
|
|
5785
5785
|
}
|
|
5786
5786
|
`;
|
|
@@ -6483,7 +6483,9 @@ var Internals = {
|
|
|
6483
6483
|
timeValueRef,
|
|
6484
6484
|
compositionSelectorRef,
|
|
6485
6485
|
RemotionEnvironmentContext,
|
|
6486
|
-
warnAboutTooHighVolume
|
|
6486
|
+
warnAboutTooHighVolume,
|
|
6487
|
+
AudioForPreview,
|
|
6488
|
+
OBJECTFIT_CONTAIN_CLASS_NAME
|
|
6487
6489
|
};
|
|
6488
6490
|
// src/interpolate-colors.ts
|
|
6489
6491
|
var NUMBER = "[-+]?\\d*\\.?\\d+";
|
|
@@ -7508,7 +7510,7 @@ var OffthreadVideoForRendering = ({
|
|
|
7508
7510
|
}
|
|
7509
7511
|
}, [imageSrc, onError]);
|
|
7510
7512
|
const className = useMemo29(() => {
|
|
7511
|
-
return [
|
|
7513
|
+
return [OBJECTFIT_CONTAIN_CLASS_NAME, props2.className].filter(truthy).join(" ");
|
|
7512
7514
|
}, [props2.className]);
|
|
7513
7515
|
const onImageFrame = useCallback15((img) => {
|
|
7514
7516
|
if (onVideoFrame) {
|
package/dist/esm/version.mjs
CHANGED
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.
|
|
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.
|
|
31
|
+
"@remotion/eslint-config-internal": "4.0.352"
|
|
32
32
|
},
|
|
33
33
|
"keywords": [
|
|
34
34
|
"video",
|