remotion 4.0.0-alpha14 → 4.0.0-alpha17
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/AssetManager.d.ts +1 -1
- package/dist/cjs/Composition.d.ts +6 -6
- package/dist/cjs/CompositionManager.d.ts +11 -11
- package/dist/cjs/CompositionManagerContext.d.ts +2 -2
- package/dist/cjs/EditorProps.d.ts +2 -2
- package/dist/cjs/Folder.d.ts +2 -2
- package/dist/cjs/NativeLayers.d.ts +2 -2
- package/dist/cjs/ResolveCompositionConfig.d.ts +2 -2
- package/dist/cjs/Sequence.d.ts +2 -2
- package/dist/cjs/SequenceContext.d.ts +1 -1
- package/dist/cjs/SequenceManager.d.ts +1 -1
- package/dist/cjs/audio/props.d.ts +2 -2
- package/dist/cjs/audio/shared-audio-tags.d.ts +2 -2
- package/dist/cjs/freeze.d.ts +1 -1
- package/dist/cjs/get-environment.d.ts +1 -1
- package/dist/cjs/get-static-files.d.ts +1 -1
- package/dist/cjs/interpolate.d.ts +2 -2
- package/dist/cjs/loop/index.d.ts +1 -1
- package/dist/cjs/nonce.d.ts +1 -1
- package/dist/cjs/prefetch-state.d.ts +1 -1
- package/dist/cjs/prefetch.d.ts +1 -1
- package/dist/cjs/props-if-has-props.d.ts +3 -3
- package/dist/cjs/random.d.ts +1 -1
- package/dist/cjs/series/index.d.ts +1 -1
- package/dist/cjs/spring/spring-utils.d.ts +2 -2
- package/dist/cjs/static-file.d.ts +2 -2
- package/dist/cjs/timeline-position-state.d.ts +4 -4
- package/dist/cjs/truthy.d.ts +1 -1
- package/dist/cjs/use-lazy-component.d.ts +1 -1
- package/dist/cjs/use-sync-volume-with-media-tag.d.ts +1 -1
- package/dist/cjs/use-video.d.ts +1 -1
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/video/duration-state.d.ts +3 -3
- package/dist/cjs/video/props.d.ts +4 -4
- package/dist/cjs/video-config.d.ts +1 -1
- package/dist/cjs/volume-position-state.d.ts +4 -4
- package/dist/cjs/volume-prop.d.ts +1 -1
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/dist/cjs/SequenceAndAssetManager.d.ts +0 -11
- package/dist/cjs/SequenceAndAssetManager.js +0 -57
- package/dist/cjs/config.d.ts +0 -294
- package/dist/cjs/config.js +0 -21
- package/dist/cjs/validation/validate-offthreadvideo-image-format.d.ts +0 -1
- package/dist/cjs/validation/validate-offthreadvideo-image-format.js +0 -15
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { TAsset } from './CompositionManager.js';
|
|
3
|
-
export
|
|
3
|
+
export type AssetManagerContext = {
|
|
4
4
|
registerAsset: (asset: TAsset) => void;
|
|
5
5
|
unregisterAsset: (id: string) => void;
|
|
6
6
|
assets: TAsset[];
|
|
@@ -2,34 +2,34 @@ import type { ComponentType } from 'react';
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import type { AnyZodObject } from 'zod';
|
|
4
4
|
import type { InferProps, PropsIfHasProps } from './props-if-has-props.js';
|
|
5
|
-
|
|
6
|
-
export
|
|
5
|
+
type LooseComponentType<T> = ComponentType<T> | ((props: T) => React.ReactNode);
|
|
6
|
+
export type CompProps<Props> = {
|
|
7
7
|
lazyComponent: () => Promise<{
|
|
8
8
|
default: LooseComponentType<Props>;
|
|
9
9
|
}>;
|
|
10
10
|
} | {
|
|
11
11
|
component: LooseComponentType<Props>;
|
|
12
12
|
};
|
|
13
|
-
export
|
|
13
|
+
export type CalcMetadataReturnType<T> = {
|
|
14
14
|
durationInFrames?: number;
|
|
15
15
|
fps?: number;
|
|
16
16
|
width?: number;
|
|
17
17
|
height?: number;
|
|
18
18
|
props?: T;
|
|
19
19
|
};
|
|
20
|
-
export
|
|
20
|
+
export type CalculateMetadataFunction<T> = (options: {
|
|
21
21
|
defaultProps: T;
|
|
22
22
|
props: T;
|
|
23
23
|
abortSignal: AbortSignal;
|
|
24
24
|
}) => Promise<CalcMetadataReturnType<T>> | CalcMetadataReturnType<T>;
|
|
25
|
-
export
|
|
25
|
+
export type StillProps<Schema extends AnyZodObject, Props extends Record<string, unknown> | undefined> = {
|
|
26
26
|
width: number;
|
|
27
27
|
height: number;
|
|
28
28
|
id: string;
|
|
29
29
|
calculateMetadata?: CalculateMetadataFunction<InferProps<Schema, Props>>;
|
|
30
30
|
schema?: Schema;
|
|
31
31
|
} & CompProps<Props> & PropsIfHasProps<Schema, Props>;
|
|
32
|
-
export
|
|
32
|
+
export type CompositionProps<Schema extends AnyZodObject, Props extends Record<string, unknown> | undefined> = StillProps<Schema, Props> & {
|
|
33
33
|
fps: number;
|
|
34
34
|
durationInFrames: number;
|
|
35
35
|
};
|
|
@@ -3,7 +3,7 @@ import React from 'react';
|
|
|
3
3
|
import type { AnyZodObject } from 'zod';
|
|
4
4
|
import type { CalculateMetadataFunction } from './Composition.js';
|
|
5
5
|
import type { InferProps, PropsIfHasProps } from './props-if-has-props.js';
|
|
6
|
-
export
|
|
6
|
+
export type TComposition<Schema extends AnyZodObject, Props extends Record<string, unknown> | undefined> = {
|
|
7
7
|
width: number;
|
|
8
8
|
height: number;
|
|
9
9
|
fps: number;
|
|
@@ -16,13 +16,13 @@ export declare type TComposition<Schema extends AnyZodObject, Props extends Reco
|
|
|
16
16
|
schema: Schema | null;
|
|
17
17
|
calculateMetadata: CalculateMetadataFunction<InferProps<Schema, Props>> | null;
|
|
18
18
|
} & PropsIfHasProps<Schema, Props>;
|
|
19
|
-
export
|
|
20
|
-
export
|
|
21
|
-
export
|
|
22
|
-
export
|
|
23
|
-
export
|
|
24
|
-
export
|
|
25
|
-
|
|
19
|
+
export type AnyComposition = TComposition<AnyZodObject, Record<string, unknown> | undefined>;
|
|
20
|
+
export type TCompMetadataWithCalcFunction<Schema extends AnyZodObject, Props extends Record<string, unknown> | undefined> = Pick<TComposition<Schema, Props>, 'id' | 'height' | 'width' | 'fps' | 'durationInFrames' | 'defaultProps' | 'calculateMetadata'>;
|
|
21
|
+
export type TCompMetadata<Schema extends AnyZodObject, Props extends Record<string, unknown> | undefined> = Pick<TComposition<Schema, Props>, 'id' | 'height' | 'width' | 'fps' | 'durationInFrames' | 'defaultProps'>;
|
|
22
|
+
export type AnyCompMetadata = TCompMetadata<AnyZodObject, Record<string, unknown> | undefined>;
|
|
23
|
+
export type SmallTCompMetadata<T extends AnyZodObject, Props extends Record<string, unknown> | undefined> = Pick<TComposition<T, Props>, 'id' | 'height' | 'width' | 'fps' | 'durationInFrames'> & Partial<Pick<TComposition<T, Props>, 'defaultProps'>>;
|
|
24
|
+
export type AnySmallCompMetadata = SmallTCompMetadata<AnyZodObject, Record<string, unknown> | undefined>;
|
|
25
|
+
type EnhancedTSequenceData = {
|
|
26
26
|
type: 'sequence';
|
|
27
27
|
} | {
|
|
28
28
|
type: 'audio';
|
|
@@ -39,12 +39,12 @@ declare type EnhancedTSequenceData = {
|
|
|
39
39
|
startMediaFrom: number;
|
|
40
40
|
playbackRate: number;
|
|
41
41
|
};
|
|
42
|
-
export
|
|
42
|
+
export type LoopDisplay = {
|
|
43
43
|
numberOfTimes: number;
|
|
44
44
|
startOffset: number;
|
|
45
45
|
durationInFrames: number;
|
|
46
46
|
};
|
|
47
|
-
export
|
|
47
|
+
export type TSequence = {
|
|
48
48
|
from: number;
|
|
49
49
|
duration: number;
|
|
50
50
|
id: string;
|
|
@@ -55,7 +55,7 @@ export declare type TSequence = {
|
|
|
55
55
|
nonce: number;
|
|
56
56
|
loopDisplay: LoopDisplay | undefined;
|
|
57
57
|
} & EnhancedTSequenceData;
|
|
58
|
-
export
|
|
58
|
+
export type TAsset = {
|
|
59
59
|
type: 'audio' | 'video';
|
|
60
60
|
src: string;
|
|
61
61
|
id: string;
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import type { AnyZodObject } from 'zod';
|
|
3
3
|
import type { AnyCompMetadata, AnyComposition, TComposition } from './CompositionManager.js';
|
|
4
4
|
import type { TFolder } from './Folder.js';
|
|
5
|
-
export
|
|
6
|
-
export
|
|
5
|
+
export type BaseMetadata = Pick<AnyCompMetadata, 'durationInFrames' | 'fps' | 'defaultProps' | 'height' | 'width'>;
|
|
6
|
+
export type CompositionManagerContext = {
|
|
7
7
|
compositions: AnyComposition[];
|
|
8
8
|
registerComposition: <Schema extends AnyZodObject, Props extends Record<string, unknown> | undefined>(comp: TComposition<Schema, Props>) => void;
|
|
9
9
|
unregisterComposition: (name: string) => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
export
|
|
2
|
+
type Props = Record<string, Record<string, unknown>>;
|
|
3
|
+
export type EditorPropsContextType = {
|
|
4
4
|
props: Props;
|
|
5
5
|
updateProps: (options: {
|
|
6
6
|
id: string;
|
package/dist/cjs/Folder.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { FC } from 'react';
|
|
2
|
-
export
|
|
2
|
+
export type TFolder = {
|
|
3
3
|
name: string;
|
|
4
4
|
parent: string | null;
|
|
5
5
|
};
|
|
6
|
-
|
|
6
|
+
type FolderContextType = {
|
|
7
7
|
folderName: string | null;
|
|
8
8
|
parentName: string | null;
|
|
9
9
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { PropsWithChildren } from 'react';
|
|
2
|
-
export
|
|
2
|
+
export type ClipRegion = {
|
|
3
3
|
x: number;
|
|
4
4
|
y: number;
|
|
5
5
|
width: number;
|
|
6
6
|
height: number;
|
|
7
7
|
} | 'hide';
|
|
8
|
-
export
|
|
8
|
+
export type TNativeLayersContext = {
|
|
9
9
|
clipRegion: ClipRegion | null;
|
|
10
10
|
setClipRegion: React.Dispatch<React.SetStateAction<ClipRegion | null>>;
|
|
11
11
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import type { PropsWithChildren } from 'react';
|
|
2
2
|
import type { AnyComposition } from './CompositionManager.js';
|
|
3
3
|
import type { VideoConfig } from './video-config.js';
|
|
4
|
-
|
|
4
|
+
type ResolveCompositionConfigContect = Record<string, VideoConfigState | undefined>;
|
|
5
5
|
export declare const ResolveCompositionContext: import("react").Context<ResolveCompositionConfigContect | null>;
|
|
6
6
|
export declare const resolveCompositionsRef: import("react").RefObject<{
|
|
7
7
|
setCurrentRenderModalComposition: (compositionId: string | null) => void;
|
|
8
8
|
reloadCurrentlySelectedComposition: () => void;
|
|
9
9
|
}>;
|
|
10
|
-
|
|
10
|
+
type VideoConfigState = {
|
|
11
11
|
type: 'loading';
|
|
12
12
|
} | {
|
|
13
13
|
type: 'success';
|
package/dist/cjs/Sequence.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { LoopDisplay } from './CompositionManager.js';
|
|
3
|
-
export
|
|
3
|
+
export type LayoutAndStyle = {
|
|
4
4
|
layout: 'none';
|
|
5
5
|
} | {
|
|
6
6
|
layout?: 'absolute-fill';
|
|
7
7
|
style?: React.CSSProperties;
|
|
8
8
|
className?: string;
|
|
9
9
|
};
|
|
10
|
-
export
|
|
10
|
+
export type SequenceProps = {
|
|
11
11
|
children: React.ReactNode;
|
|
12
12
|
from?: number;
|
|
13
13
|
durationInFrames?: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export declare const SequenceContext: import("react").Context<SequenceContextType | null>;
|
|
3
|
-
export
|
|
3
|
+
export type SequenceContextType = {
|
|
4
4
|
cumulatedFrom: number;
|
|
5
5
|
relativeFrom: number;
|
|
6
6
|
parentFrom: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { TSequence } from './CompositionManager.js';
|
|
3
|
-
export
|
|
3
|
+
export type SequenceManagerContext = {
|
|
4
4
|
registerSequence: (seq: TSequence) => void;
|
|
5
5
|
unregisterSequence: (id: string) => void;
|
|
6
6
|
sequences: TSequence[];
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { VolumeProp } from '../volume-prop.js';
|
|
3
|
-
export
|
|
3
|
+
export type RemotionMainAudioProps = {
|
|
4
4
|
startFrom?: number;
|
|
5
5
|
endAt?: number;
|
|
6
6
|
};
|
|
7
|
-
export
|
|
7
|
+
export type RemotionAudioProps = Omit<React.DetailedHTMLProps<React.AudioHTMLAttributes<HTMLAudioElement>, HTMLAudioElement>, 'autoPlay' | 'controls' | 'onEnded' | 'nonce' | 'onResize' | 'onResizeCapture'> & {
|
|
8
8
|
volume?: VolumeProp;
|
|
9
9
|
playbackRate?: number;
|
|
10
10
|
acceptableTimeShiftInSeconds?: number;
|
|
@@ -12,13 +12,13 @@ import type { RemotionAudioProps } from './props.js';
|
|
|
12
12
|
*
|
|
13
13
|
* The behavior can be disabled by passing `0` as the number of shared audio tracks.
|
|
14
14
|
*/
|
|
15
|
-
|
|
15
|
+
type AudioElem = {
|
|
16
16
|
id: number;
|
|
17
17
|
props: RemotionAudioProps;
|
|
18
18
|
el: React.RefObject<HTMLAudioElement>;
|
|
19
19
|
audioId: string;
|
|
20
20
|
};
|
|
21
|
-
|
|
21
|
+
type SharedContext = {
|
|
22
22
|
registerAudio: (aud: RemotionAudioProps, audioId: string) => AudioElem;
|
|
23
23
|
unregisterAudio: (id: number) => void;
|
|
24
24
|
updateAudio: (options: {
|
package/dist/cjs/freeze.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type RemotionEnvironment = 'preview' | 'rendering' | 'player-development' | 'player-production';
|
|
2
2
|
export declare const getRemotionEnvironment: () => RemotionEnvironment;
|
|
3
3
|
export declare const useRemotionEnvironment: () => RemotionEnvironment;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* @see [Documentation](https://www.remotion.dev/docs/getstaticfiles)
|
|
4
4
|
*/
|
|
5
5
|
export declare const getStaticFiles: () => StaticFile[];
|
|
6
|
-
export
|
|
6
|
+
export type StaticFile = {
|
|
7
7
|
/**
|
|
8
8
|
* A string that you can pass to the `src` attribute of an `<Audio>`, `<Img>` and `<Video>` element.
|
|
9
9
|
*/
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type ExtrapolateType = 'extend' | 'identity' | 'clamp';
|
|
2
2
|
/**
|
|
3
3
|
* @description This function allows you to map a range of values to another with a conside syntax
|
|
4
4
|
* @see [Documentation](https://www.remotion.dev/docs/interpolate)
|
|
5
5
|
*/
|
|
6
|
-
export
|
|
6
|
+
export type InterpolateOptions = Partial<{
|
|
7
7
|
easing: (input: number) => number;
|
|
8
8
|
extrapolateLeft: ExtrapolateType;
|
|
9
9
|
extrapolateRight: ExtrapolateType;
|
package/dist/cjs/loop/index.d.ts
CHANGED
package/dist/cjs/nonce.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
2
|
+
type Value = Record<string, string>;
|
|
3
3
|
export declare const PreloadContext: React.Context<Value>;
|
|
4
4
|
export declare const setPreloads: (updater: (p: Value) => Value) => void;
|
|
5
5
|
export declare const PrefetchProvider: React.FC<{
|
package/dist/cjs/prefetch.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { AnyZodObject, z } from 'zod';
|
|
2
|
-
|
|
3
|
-
export
|
|
2
|
+
type And<A extends boolean, B extends boolean> = A extends true ? B extends true ? true : false : false;
|
|
3
|
+
export type PropsIfHasProps<Schema extends AnyZodObject, Props extends Record<string, unknown> | undefined> = And<AnyZodObject extends Schema ? true : false, {} extends Props ? true : false> extends true ? {
|
|
4
4
|
defaultProps?: {};
|
|
5
5
|
} : {
|
|
6
6
|
defaultProps: InferProps<Schema, Props>;
|
|
7
7
|
};
|
|
8
|
-
export
|
|
8
|
+
export type InferProps<Schema extends AnyZodObject, Props> = AnyZodObject extends Schema ? {} extends Props ? unknown : Props : {} extends Props ? z.infer<Schema> : // Props and schema specified
|
|
9
9
|
z.infer<Schema> & Props;
|
|
10
10
|
export {};
|
package/dist/cjs/random.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type RandomSeed = number | string | null;
|
|
2
2
|
/**
|
|
3
3
|
* @description A deterministic pseudo-random number generator. Pass in the same seed and get the same pseudorandom number.
|
|
4
4
|
* @see [Documentation](https://remotion.dev/docs/random)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { FC, PropsWithChildren } from 'react';
|
|
2
2
|
import type { LayoutAndStyle, SequenceProps } from '../Sequence.js';
|
|
3
|
-
|
|
3
|
+
type SeriesSequenceProps = PropsWithChildren<{
|
|
4
4
|
durationInFrames: number;
|
|
5
5
|
offset?: number;
|
|
6
6
|
} & Pick<SequenceProps, 'layout' | 'name'> & LayoutAndStyle>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
type AnimationNode = {
|
|
2
2
|
lastTimestamp: number;
|
|
3
3
|
toValue: number;
|
|
4
4
|
current: number;
|
|
5
5
|
velocity: number;
|
|
6
6
|
prevPosition?: number;
|
|
7
7
|
};
|
|
8
|
-
export
|
|
8
|
+
export type SpringConfig = {
|
|
9
9
|
damping: number;
|
|
10
10
|
mass: number;
|
|
11
11
|
stiffness: number;
|
|
@@ -17,8 +17,8 @@ declare const problematicCharacters: {
|
|
|
17
17
|
'%2C': string;
|
|
18
18
|
'%3B': string;
|
|
19
19
|
};
|
|
20
|
-
|
|
21
|
-
export
|
|
20
|
+
type HexCode = keyof typeof problematicCharacters;
|
|
21
|
+
export type HexInfo = {
|
|
22
22
|
containsHex: false;
|
|
23
23
|
} | {
|
|
24
24
|
containsHex: true;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { MutableRefObject } from 'react';
|
|
2
|
-
export
|
|
2
|
+
export type PlayableMediaTag = {
|
|
3
3
|
play: () => void;
|
|
4
4
|
id: string;
|
|
5
5
|
};
|
|
6
|
-
export
|
|
6
|
+
export type TimelineContextValue = {
|
|
7
7
|
frame: number;
|
|
8
8
|
playing: boolean;
|
|
9
9
|
rootId: string;
|
|
@@ -12,7 +12,7 @@ export declare type TimelineContextValue = {
|
|
|
12
12
|
setPlaybackRate: (u: React.SetStateAction<number>) => void;
|
|
13
13
|
audioAndVideoTags: MutableRefObject<PlayableMediaTag[]>;
|
|
14
14
|
};
|
|
15
|
-
export
|
|
15
|
+
export type SetTimelineContextValue = {
|
|
16
16
|
setFrame: (u: React.SetStateAction<number>) => void;
|
|
17
17
|
setPlaying: (u: React.SetStateAction<boolean>) => void;
|
|
18
18
|
};
|
|
@@ -20,7 +20,7 @@ export declare const TimelineContext: import("react").Context<TimelineContextVal
|
|
|
20
20
|
export declare const SetTimelineContext: import("react").Context<SetTimelineContextValue>;
|
|
21
21
|
export declare const useTimelinePosition: () => number;
|
|
22
22
|
export declare const useTimelineSetFrame: () => (u: React.SetStateAction<number>) => void;
|
|
23
|
-
|
|
23
|
+
type PlayingReturnType = readonly [
|
|
24
24
|
boolean,
|
|
25
25
|
(u: React.SetStateAction<boolean>) => void,
|
|
26
26
|
MutableRefObject<boolean>
|
package/dist/cjs/truthy.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ComponentPropsWithRef, ComponentType, ExoticComponent } from 'react';
|
|
2
2
|
import type { CompProps } from './Composition.js';
|
|
3
|
-
|
|
3
|
+
type LazyExoticComponent<T extends ComponentType<any>> = ExoticComponent<ComponentPropsWithRef<T>> & {
|
|
4
4
|
readonly _result: T;
|
|
5
5
|
};
|
|
6
6
|
export declare const useLazyComponent: <Props>(compProps: CompProps<Props>) => LazyExoticComponent<ComponentType<Props>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { RefObject } from 'react';
|
|
2
2
|
import type { VolumeProp } from './volume-prop.js';
|
|
3
|
-
export
|
|
3
|
+
export type UseSyncVolumeWithMediaTagOptions = {
|
|
4
4
|
volumePropFrame: number;
|
|
5
5
|
actualVolume: number;
|
|
6
6
|
volume?: VolumeProp;
|
package/dist/cjs/use-video.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ComponentType, LazyExoticComponent } from 'react';
|
|
2
2
|
import type { VideoConfig } from './video-config.js';
|
|
3
|
-
|
|
3
|
+
type ReturnType = (VideoConfig & {
|
|
4
4
|
component: LazyExoticComponent<ComponentType<Record<string, unknown> | undefined>>;
|
|
5
5
|
}) | null;
|
|
6
6
|
export declare const useVideo: () => ReturnType;
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "4.0.0-
|
|
1
|
+
export declare const VERSION = "4.0.0-alpha17";
|
package/dist/cjs/version.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
type DurationState = Record<string, number>;
|
|
3
|
+
type DurationAction = {
|
|
4
4
|
type: 'got-duration';
|
|
5
5
|
src: string;
|
|
6
6
|
durationInSeconds: number;
|
|
7
7
|
};
|
|
8
8
|
export declare const durationReducer: (state: DurationState, action: DurationAction) => DurationState;
|
|
9
|
-
|
|
9
|
+
type TDurationsContext = {
|
|
10
10
|
durations: DurationState;
|
|
11
11
|
setDurations: React.Dispatch<DurationAction>;
|
|
12
12
|
};
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
import type { VolumeProp } from '../volume-prop.js';
|
|
3
|
-
export
|
|
3
|
+
export type RemotionMainVideoProps = {
|
|
4
4
|
startFrom?: number;
|
|
5
5
|
endAt?: number;
|
|
6
6
|
};
|
|
7
|
-
export
|
|
7
|
+
export type RemotionVideoProps = Omit<React.DetailedHTMLProps<React.VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>, 'autoPlay' | 'controls' | 'onEnded' | 'nonce'> & {
|
|
8
8
|
volume?: VolumeProp;
|
|
9
9
|
playbackRate?: number;
|
|
10
10
|
acceptableTimeShiftInSeconds?: number;
|
|
11
11
|
allowAmplificationDuringRender?: boolean;
|
|
12
12
|
};
|
|
13
|
-
|
|
13
|
+
type DeprecatedOffthreadVideoProps = {
|
|
14
14
|
/**
|
|
15
15
|
* @deprecated Use the `transparent` prop instead
|
|
16
16
|
*/
|
|
17
17
|
imageFormat?: never;
|
|
18
18
|
};
|
|
19
|
-
export
|
|
19
|
+
export type OffthreadVideoProps = {
|
|
20
20
|
src: string;
|
|
21
21
|
className?: string;
|
|
22
22
|
id?: string;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export
|
|
2
|
+
export type MediaVolumeContextValue = {
|
|
3
3
|
mediaMuted: boolean;
|
|
4
4
|
mediaVolume: number;
|
|
5
5
|
};
|
|
6
|
-
export
|
|
6
|
+
export type SetMediaVolumeContextValue = {
|
|
7
7
|
setMediaMuted: (u: React.SetStateAction<boolean>) => void;
|
|
8
8
|
setMediaVolume: (u: number) => void;
|
|
9
9
|
};
|
|
10
10
|
export declare const MediaVolumeContext: import("react").Context<MediaVolumeContextValue>;
|
|
11
11
|
export declare const SetMediaVolumeContext: import("react").Context<SetMediaVolumeContextValue>;
|
|
12
|
-
|
|
12
|
+
type MediaVolumeReturnType = readonly [number, (u: number) => void];
|
|
13
13
|
export declare const useMediaVolumeState: () => MediaVolumeReturnType;
|
|
14
|
-
|
|
14
|
+
type MediaMutedReturnType = readonly [
|
|
15
15
|
boolean,
|
|
16
16
|
(u: React.SetStateAction<boolean>) => void
|
|
17
17
|
];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type VolumeProp = number | ((frame: number) => number);
|
|
2
2
|
export declare const evaluateVolume: ({ frame, volume, mediaVolume, allowAmplificationDuringRender, }: {
|
|
3
3
|
frame: number;
|
|
4
4
|
volume: VolumeProp | undefined;
|
package/dist/esm/index.mjs
CHANGED
package/dist/esm/version.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { TSequence } from './CompositionManager.js';
|
|
3
|
-
export declare type SequenceManagerContext = {
|
|
4
|
-
registerSequence: (seq: TSequence) => void;
|
|
5
|
-
unregisterSequence: (id: string) => void;
|
|
6
|
-
sequences: TSequence[];
|
|
7
|
-
};
|
|
8
|
-
export declare const SequenceManager: React.Context<SequenceManagerContext>;
|
|
9
|
-
export declare const SequenceAndAssetManagerProvider: React.FC<{
|
|
10
|
-
children: React.ReactNode;
|
|
11
|
-
}>;
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.SequenceAndAssetManagerProvider = exports.SequenceManager = void 0;
|
|
27
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
28
|
-
const react_1 = __importStar(require("react"));
|
|
29
|
-
exports.SequenceManager = react_1.default.createContext({
|
|
30
|
-
registerSequence: () => {
|
|
31
|
-
throw new Error('SequenceManagerContext not initialized');
|
|
32
|
-
},
|
|
33
|
-
unregisterSequence: () => {
|
|
34
|
-
throw new Error('SequenceManagerContext not initialized');
|
|
35
|
-
},
|
|
36
|
-
sequences: [],
|
|
37
|
-
});
|
|
38
|
-
const SequenceAndAssetManagerProvider = ({ children }) => {
|
|
39
|
-
const [sequences, setSequences] = (0, react_1.useState)([]);
|
|
40
|
-
const registerSequence = (0, react_1.useCallback)((seq) => {
|
|
41
|
-
setSequences((seqs) => {
|
|
42
|
-
return [...seqs, seq];
|
|
43
|
-
});
|
|
44
|
-
}, []);
|
|
45
|
-
const unregisterSequence = (0, react_1.useCallback)((seq) => {
|
|
46
|
-
setSequences((seqs) => seqs.filter((s) => s.id !== seq));
|
|
47
|
-
}, []);
|
|
48
|
-
const context = (0, react_1.useMemo)(() => {
|
|
49
|
-
return {
|
|
50
|
-
registerSequence,
|
|
51
|
-
sequences,
|
|
52
|
-
unregisterSequence,
|
|
53
|
-
};
|
|
54
|
-
}, [registerSequence, sequences, unregisterSequence]);
|
|
55
|
-
return ((0, jsx_runtime_1.jsx)(exports.SequenceManager.Provider, { value: context, children: children }));
|
|
56
|
-
};
|
|
57
|
-
exports.SequenceAndAssetManagerProvider = SequenceAndAssetManagerProvider;
|
package/dist/cjs/config.d.ts
DELETED
|
@@ -1,294 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The configuration has moved to @remotion/cli.
|
|
3
|
-
* For the moment the type definitions are going to stay here
|
|
4
|
-
*/
|
|
5
|
-
import type { Configuration } from 'webpack';
|
|
6
|
-
declare type Concurrency = number | null;
|
|
7
|
-
declare type BrowserExecutable = string | null;
|
|
8
|
-
declare type FrameRange = number | [number, number];
|
|
9
|
-
declare type FfmpegExecutable = string | null;
|
|
10
|
-
declare type Loop = number | null;
|
|
11
|
-
declare type CodecOrUndefined = 'h264' | 'h265' | 'vp8' | 'vp9' | 'mp3' | 'aac' | 'wav' | 'prores' | 'h264-mkv' | 'gif' | undefined;
|
|
12
|
-
declare type Crf = number | undefined;
|
|
13
|
-
export declare type WebpackConfiguration = Configuration;
|
|
14
|
-
export declare type WebpackOverrideFn = (currentConfiguration: WebpackConfiguration) => WebpackConfiguration;
|
|
15
|
-
declare type FlatConfig = RemotionConfigObject['Bundling'] & RemotionConfigObject['Log'] & RemotionConfigObject['Preview'] & RemotionConfigObject['Puppeteer'] & RemotionConfigObject['Output'] & RemotionConfigObject['Rendering'] & {
|
|
16
|
-
/**
|
|
17
|
-
* Set the audio codec to use for the output video.
|
|
18
|
-
* See the Encoding guide in the docs for defaults and available options.
|
|
19
|
-
*/
|
|
20
|
-
setAudioCodec: (codec: 'pcm-16' | 'aac' | 'mp3' | 'opus') => void;
|
|
21
|
-
};
|
|
22
|
-
declare global {
|
|
23
|
-
interface RemotionBundlingOptions {
|
|
24
|
-
/**
|
|
25
|
-
* Specify the entry point so you don't have to specify it in the
|
|
26
|
-
* CLI command
|
|
27
|
-
*/
|
|
28
|
-
readonly setEntryPoint: (src: string) => void;
|
|
29
|
-
/**
|
|
30
|
-
* Whether Webpack bundles should be cached to make
|
|
31
|
-
* subsequent renders faster. Default: true
|
|
32
|
-
*/
|
|
33
|
-
readonly setCachingEnabled: (flag: boolean) => void;
|
|
34
|
-
/**
|
|
35
|
-
* Define on which port Remotion should start it's HTTP servers during preview and rendering.
|
|
36
|
-
* By default, Remotion will try to find a free port.
|
|
37
|
-
* If you specify a port, but it's not available, Remotion will throw an error.
|
|
38
|
-
*/
|
|
39
|
-
readonly setPort: (port: number | undefined) => void;
|
|
40
|
-
/**
|
|
41
|
-
* Define the location of the public/ directory.
|
|
42
|
-
* By default it is a folder named "public" inside the current working directory.
|
|
43
|
-
* You can set an absolute path or a relative path that will be resolved from the closest package.json location.
|
|
44
|
-
*/
|
|
45
|
-
readonly setPublicDir: (publicDir: string | null) => void;
|
|
46
|
-
readonly overrideWebpackConfig: (f: WebpackOverrideFn) => void;
|
|
47
|
-
}
|
|
48
|
-
interface RemotionConfigObject {
|
|
49
|
-
/**
|
|
50
|
-
* @deprecated New flat config format: You can now replace `Config.Preview.` with `Config.`
|
|
51
|
-
*/
|
|
52
|
-
readonly Preview: {
|
|
53
|
-
/**
|
|
54
|
-
* Change the maximum amount of tracks that are shown in the timeline.
|
|
55
|
-
* @param maxTracks The maximum amount of timeline tracks that you would like to show.
|
|
56
|
-
* @default 15
|
|
57
|
-
*/
|
|
58
|
-
readonly setMaxTimelineTracks: (maxTracks: number) => void;
|
|
59
|
-
/**
|
|
60
|
-
* Enable Keyboard shortcuts in the Remotion Preview.
|
|
61
|
-
* @param enabled Boolean whether to enable the keyboard shortcuts
|
|
62
|
-
* @default true
|
|
63
|
-
*/
|
|
64
|
-
readonly setKeyboardShortcutsEnabled: (enableShortcuts: boolean) => void;
|
|
65
|
-
/**
|
|
66
|
-
* Set number of shared audio tags. https://www.remotion.dev/docs/player/autoplay#use-the-numberofsharedaudiotags-property
|
|
67
|
-
* @param numberOfAudioTags
|
|
68
|
-
* @default 0
|
|
69
|
-
*/
|
|
70
|
-
readonly setNumberOfSharedAudioTags: (numberOfAudioTags: number) => void;
|
|
71
|
-
/**
|
|
72
|
-
* Enable Webpack polling instead of file system listeners for hot reloading in the preview.
|
|
73
|
-
* This is useful if you are using a remote directory or a virtual machine.
|
|
74
|
-
* @param interval
|
|
75
|
-
* @default null
|
|
76
|
-
*/
|
|
77
|
-
readonly setWebpackPollingInMilliseconds: (interval: number | null) => void;
|
|
78
|
-
/**
|
|
79
|
-
* Whether Remotion should open a browser when starting the Preview.
|
|
80
|
-
* @param should
|
|
81
|
-
* @default true
|
|
82
|
-
*/
|
|
83
|
-
readonly setShouldOpenBrowser: (should: boolean) => void;
|
|
84
|
-
};
|
|
85
|
-
/**
|
|
86
|
-
* @deprecated New flat config format: You can now replace `Config.Bundling.` with `Config.`
|
|
87
|
-
*/
|
|
88
|
-
readonly Bundling: RemotionBundlingOptions;
|
|
89
|
-
/**
|
|
90
|
-
* @deprecated New flat config format: You can now replace `Config.Log.` with `Config.`
|
|
91
|
-
*/
|
|
92
|
-
readonly Log: {
|
|
93
|
-
/**
|
|
94
|
-
* Set the log level.
|
|
95
|
-
* Acceptable values: 'error' | 'warning' | 'info' | 'verbose'
|
|
96
|
-
* Default value: 'info'
|
|
97
|
-
*
|
|
98
|
-
* Set this to 'verbose' to get browser logs and other IO.
|
|
99
|
-
*/
|
|
100
|
-
readonly setLevel: (newLogLevel: 'verbose' | 'info' | 'warn' | 'error') => void;
|
|
101
|
-
};
|
|
102
|
-
/**
|
|
103
|
-
* @deprecated New flat config format: You can now replace `Config.Puppeteer.` with `Config.`
|
|
104
|
-
*/
|
|
105
|
-
readonly Puppeteer: {
|
|
106
|
-
/**
|
|
107
|
-
* Specify executable path for the browser to use.
|
|
108
|
-
* Default: null, which will make Remotion find or download a version of said browser.
|
|
109
|
-
*/
|
|
110
|
-
readonly setBrowserExecutable: (newBrowserExecutablePath: BrowserExecutable) => void;
|
|
111
|
-
/**
|
|
112
|
-
* Set how many milliseconds a frame may take to render before it times out.
|
|
113
|
-
* Default: `30000`
|
|
114
|
-
*/
|
|
115
|
-
readonly setDelayRenderTimeoutInMilliseconds: (newPuppeteerTimeout: number) => void;
|
|
116
|
-
/**
|
|
117
|
-
* @deprecated Renamed to `setDelayRenderTimeoutInMilliseconds`.
|
|
118
|
-
* Set how many milliseconds a frame may take to render before it times out.
|
|
119
|
-
* Default: `30000`
|
|
120
|
-
*/
|
|
121
|
-
readonly setTimeoutInMilliseconds: (newPuppeteerTimeout: number) => void;
|
|
122
|
-
/**
|
|
123
|
-
* Setting deciding whether to disable CORS and other Chrome security features.
|
|
124
|
-
* Default: false
|
|
125
|
-
*/
|
|
126
|
-
readonly setChromiumDisableWebSecurity: (should: boolean) => void;
|
|
127
|
-
/**
|
|
128
|
-
* Setting whether to ignore any invalid SSL certificates, such as self-signed ones.
|
|
129
|
-
* Default: false
|
|
130
|
-
*/
|
|
131
|
-
readonly setChromiumIgnoreCertificateErrors: (should: boolean) => void;
|
|
132
|
-
/**
|
|
133
|
-
* If false, will open an actual browser during rendering to observe progress.
|
|
134
|
-
* Default: true
|
|
135
|
-
*/
|
|
136
|
-
readonly setChromiumHeadlessMode: (should: boolean) => void;
|
|
137
|
-
/**
|
|
138
|
-
* Set the OpenGL rendering backend for Chrome. Possible values: 'egl', 'angle', 'swiftshader' and 'swangle'.
|
|
139
|
-
* Default: 'swangle' in Lambda, null elsewhere.
|
|
140
|
-
*/
|
|
141
|
-
readonly setChromiumOpenGlRenderer: (renderer: 'swangle' | 'angle' | 'egl' | 'swiftshader') => void;
|
|
142
|
-
/**
|
|
143
|
-
* Set the user agent for Chrome. Only works during rendering.
|
|
144
|
-
* Default:
|
|
145
|
-
*/
|
|
146
|
-
readonly setChromiumUserAgent: (userAgent: string | null) => void;
|
|
147
|
-
};
|
|
148
|
-
/**
|
|
149
|
-
* @deprecated New flat config format: You can now replace `Config.Rendering.` with `Config.`
|
|
150
|
-
*/
|
|
151
|
-
readonly Rendering: {
|
|
152
|
-
/**
|
|
153
|
-
* Set a custom location for a .env file.
|
|
154
|
-
* Default: `.env`
|
|
155
|
-
*/
|
|
156
|
-
readonly setDotEnvLocation: (file: string) => void;
|
|
157
|
-
/**
|
|
158
|
-
* Sets how many Puppeteer instances will work on rendering your video in parallel.
|
|
159
|
-
* Default: `null`, meaning half of the threads available on your CPU.
|
|
160
|
-
*/
|
|
161
|
-
readonly setConcurrency: (newConcurrency: Concurrency) => void;
|
|
162
|
-
/**
|
|
163
|
-
* Set the JPEG quality for the frames.
|
|
164
|
-
* Must be between 0 and 100.
|
|
165
|
-
* Must be between 0 and 100.
|
|
166
|
-
* Default: 80
|
|
167
|
-
*/
|
|
168
|
-
readonly setQuality: (q: number | undefined) => void;
|
|
169
|
-
/** Decide in which image format to render. Can be either 'jpeg' or 'png'.
|
|
170
|
-
* PNG is slower, but supports transparency.
|
|
171
|
-
*/
|
|
172
|
-
readonly setImageFormat: (format: 'png' | 'jpeg' | 'none') => void;
|
|
173
|
-
/**
|
|
174
|
-
* Render only a subset of a video.
|
|
175
|
-
* Pass in a tuple [20, 30] to only render frames 20-30 into a video.
|
|
176
|
-
* Pass in a single number `20` to only render a single frame as an image.
|
|
177
|
-
* The frame count starts at 0.
|
|
178
|
-
*/
|
|
179
|
-
readonly setFrameRange: (newFrameRange: FrameRange | null) => void;
|
|
180
|
-
/**
|
|
181
|
-
* Specify local ffmpeg executable.
|
|
182
|
-
* Default: null, which will use ffmpeg available in PATH.
|
|
183
|
-
*/
|
|
184
|
-
readonly setFfmpegExecutable: (ffmpegPath: FfmpegExecutable) => void;
|
|
185
|
-
/**
|
|
186
|
-
* Specify local ffprobe executable.
|
|
187
|
-
* Default: null, which will use ffprobe available in PATH.
|
|
188
|
-
*/
|
|
189
|
-
readonly setFfprobeExecutable: (ffprobePath: FfmpegExecutable) => void;
|
|
190
|
-
/**
|
|
191
|
-
* Scales the output dimensions by a factor.
|
|
192
|
-
* Default: 1.
|
|
193
|
-
*/
|
|
194
|
-
readonly setScale: (newScale: number) => void;
|
|
195
|
-
/**
|
|
196
|
-
* Specify which frames should be picked for rendering a GIF
|
|
197
|
-
* Default: 1, which means every frame
|
|
198
|
-
* https://remotion.dev/docs/render-as-gif
|
|
199
|
-
*/
|
|
200
|
-
readonly setEveryNthFrame: (frame: number) => void;
|
|
201
|
-
/**
|
|
202
|
-
* Specify the number of Loop a GIF should have.
|
|
203
|
-
* Default: null (means GIF will loop infinite)
|
|
204
|
-
*/
|
|
205
|
-
readonly setNumberOfGifLoops: (newLoop: Loop) => void;
|
|
206
|
-
/**
|
|
207
|
-
* Disable audio output.
|
|
208
|
-
* Default: false
|
|
209
|
-
*/
|
|
210
|
-
readonly setMuted: (muted: boolean) => void;
|
|
211
|
-
/**
|
|
212
|
-
* Don't render an audio track if it would be silent.
|
|
213
|
-
* Default: true
|
|
214
|
-
*/
|
|
215
|
-
readonly setEnforceAudioTrack: (enforceAudioTrack: boolean) => void;
|
|
216
|
-
};
|
|
217
|
-
/**
|
|
218
|
-
* @deprecated New flat config format: You can now replace `Config.Output.` with `Config.`
|
|
219
|
-
*/
|
|
220
|
-
readonly Output: {
|
|
221
|
-
/**
|
|
222
|
-
* Set the output file location string. Default: `out/{composition}.{codec}`
|
|
223
|
-
*/
|
|
224
|
-
readonly setOutputLocation: (newOutputLocation: string) => void;
|
|
225
|
-
/**
|
|
226
|
-
* If the video file already exists, should Remotion overwrite
|
|
227
|
-
* the output? Default: true
|
|
228
|
-
*/
|
|
229
|
-
readonly setOverwriteOutput: (newOverwrite: boolean) => void;
|
|
230
|
-
/**
|
|
231
|
-
* Sets the pixel format in FFMPEG.
|
|
232
|
-
* See https://trac.ffmpeg.org/wiki/Chroma%20Subsampling for an explanation.
|
|
233
|
-
* You can override this using the `--pixel-format` Cli flag.
|
|
234
|
-
*/
|
|
235
|
-
readonly setPixelFormat: (format: 'yuv420p' | 'yuva420p' | 'yuv422p' | 'yuv444p' | 'yuv420p10le' | 'yuv422p10le' | 'yuv444p10le' | 'yuva444p10le') => void;
|
|
236
|
-
/**
|
|
237
|
-
* @deprecated Use setCodec() and setImageSequence() instead.
|
|
238
|
-
* Specify what kind of output you, either `mp4` or `png-sequence`.
|
|
239
|
-
*/
|
|
240
|
-
readonly setOutputFormat: (newLegacyFormat: 'mp4' | 'png-sequence') => void;
|
|
241
|
-
/**
|
|
242
|
-
* Specify the codec for stitching the frames into a video.
|
|
243
|
-
* Can be `h264` (default), `h265`, `vp8` or `vp9`
|
|
244
|
-
*/
|
|
245
|
-
readonly setCodec: (newCodec: CodecOrUndefined) => void;
|
|
246
|
-
/**
|
|
247
|
-
* Set the Constant Rate Factor to pass to FFMPEG.
|
|
248
|
-
* Lower values mean better quality, but be aware that the ranges of
|
|
249
|
-
* possible values greatly differs between codecs.
|
|
250
|
-
*/
|
|
251
|
-
readonly setCrf: (newCrf: Crf) => void;
|
|
252
|
-
/**
|
|
253
|
-
* Set to true if don't want a video but an image sequence as the output.
|
|
254
|
-
*/
|
|
255
|
-
readonly setImageSequence: (newImageSequence: boolean) => void;
|
|
256
|
-
/**
|
|
257
|
-
* Overrides the height of a composition
|
|
258
|
-
*/
|
|
259
|
-
readonly overrideHeight: (newHeight: number) => void;
|
|
260
|
-
/**
|
|
261
|
-
* Overrides the width of a composition
|
|
262
|
-
*/
|
|
263
|
-
readonly overrideWidth: (newWidth: number) => void;
|
|
264
|
-
/**
|
|
265
|
-
* Set the ProRes profile.
|
|
266
|
-
* This method is only valid if the codec has been set to 'prores'.
|
|
267
|
-
* Possible values: 4444-xq, 4444, hq, standard, light, proxy. Default: 'hq'
|
|
268
|
-
* See https://avpres.net/FFmpeg/im_ProRes.html for meaning of possible values.
|
|
269
|
-
*/
|
|
270
|
-
readonly setProResProfile: (profile: '4444-xq' | '4444' | 'hq' | 'standard' | 'light' | 'proxy' | undefined) => void;
|
|
271
|
-
/**
|
|
272
|
-
* Override the arguments that Remotion passes to FFMPEG.
|
|
273
|
-
* Consult https://remotion.dev/docs/renderer/render-media#ffmpegoverride before using this feature.
|
|
274
|
-
*/
|
|
275
|
-
readonly overrideFfmpegCommand: (command: (info: {
|
|
276
|
-
type: 'pre-stitcher' | 'stitcher';
|
|
277
|
-
args: string[];
|
|
278
|
-
}) => string[]) => void;
|
|
279
|
-
/**
|
|
280
|
-
* Set a target audio bitrate to be passed to FFMPEG.
|
|
281
|
-
*/
|
|
282
|
-
readonly setAudioBitrate: (bitrate: string | null) => void;
|
|
283
|
-
/**
|
|
284
|
-
* Set a target video bitrate to be passed to FFMPEG.
|
|
285
|
-
* Mutually exclusive with setCrf().
|
|
286
|
-
*/
|
|
287
|
-
readonly setVideoBitrate: (bitrate: string | null) => void;
|
|
288
|
-
};
|
|
289
|
-
}
|
|
290
|
-
}
|
|
291
|
-
export declare type ConfigType = RemotionConfigObject & FlatConfig;
|
|
292
|
-
export type { Concurrency };
|
|
293
|
-
export declare const Config: ConfigType;
|
|
294
|
-
export declare const enableLegacyRemotionConfig: () => void;
|
package/dist/cjs/config.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.enableLegacyRemotionConfig = exports.Config = void 0;
|
|
4
|
-
const conf = {};
|
|
5
|
-
let enabled = false;
|
|
6
|
-
exports.Config = new Proxy(conf, {
|
|
7
|
-
get(target, prop, receiver) {
|
|
8
|
-
if (!enabled) {
|
|
9
|
-
if (typeof document !== 'undefined') {
|
|
10
|
-
// We are in the browser
|
|
11
|
-
return {};
|
|
12
|
-
}
|
|
13
|
-
throw new Error('To use the Remotion config file, you need to have @remotion/cli installed.\n- Make sure that all versions of Remotion are the same.\n- Make sure that @remotion/cli is installed.\n- Make sure Config is imported from "@remotion/cli", not "remotion".');
|
|
14
|
-
}
|
|
15
|
-
return Reflect.get(target, prop, receiver);
|
|
16
|
-
},
|
|
17
|
-
});
|
|
18
|
-
const enableLegacyRemotionConfig = () => {
|
|
19
|
-
enabled = true;
|
|
20
|
-
};
|
|
21
|
-
exports.enableLegacyRemotionConfig = enableLegacyRemotionConfig;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const validateOffthreadVideoImageFormat: (input: unknown) => void;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.validateOffthreadVideoImageFormat = void 0;
|
|
4
|
-
const validateOffthreadVideoImageFormat = (input) => {
|
|
5
|
-
if (typeof input === 'undefined') {
|
|
6
|
-
return;
|
|
7
|
-
}
|
|
8
|
-
if (typeof input !== 'string') {
|
|
9
|
-
throw new TypeError(`<OffthreadVideo imageFormat=""> must be a string, but got ${JSON.stringify(input)} instead.`);
|
|
10
|
-
}
|
|
11
|
-
if (input !== 'png' && input !== 'jpeg') {
|
|
12
|
-
throw new TypeError(`<OffthreadVideo imageFormat=""> must be either "png" or "jpeg", but got ${input}`);
|
|
13
|
-
}
|
|
14
|
-
};
|
|
15
|
-
exports.validateOffthreadVideoImageFormat = validateOffthreadVideoImageFormat;
|