remotion 2.5.0-alpha.be0e6380 → 3.0.0-lambda.13
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/LICENSE.md +41 -0
- package/README.md +11 -2
- package/coverage/coverage-summary.json +34 -20
- package/dist/CompositionManager.d.ts +1 -0
- package/dist/CompositionManager.d.ts.map +1 -1
- package/dist/CompositionManager.js.map +1 -1
- package/dist/Still.d.ts +1 -0
- package/dist/Still.d.ts.map +1 -1
- package/dist/audio/Audio.d.ts +1 -1
- package/dist/audio/AudioForDevelopment.d.ts +1 -1
- package/dist/audio/AudioForRendering.d.ts +1 -1
- package/dist/config/image-format.d.ts +1 -1
- package/dist/config/index.d.ts +3 -3
- package/dist/config/log.d.ts +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/internals.d.ts +30 -6
- package/dist/internals.d.ts.map +1 -1
- package/dist/internals.js +3 -1
- package/dist/internals.js.map +1 -1
- package/dist/loop/index.d.ts +9 -0
- package/dist/loop/index.d.ts.map +1 -0
- package/dist/loop/index.js +28 -0
- package/dist/loop/index.js.map +1 -0
- package/dist/sequencing/index.d.ts +1 -0
- package/dist/sequencing/index.d.ts.map +1 -1
- package/dist/sequencing/index.js +3 -1
- package/dist/sequencing/index.js.map +1 -1
- package/dist/series/flatten-children.d.ts.map +1 -1
- package/dist/series/flatten-children.js +2 -1
- package/dist/series/flatten-children.js.map +1 -1
- package/dist/timeline-inout-position-state.d.ts +13 -0
- package/dist/timeline-inout-position-state.d.ts.map +1 -0
- package/dist/timeline-inout-position-state.js +24 -0
- package/dist/timeline-inout-position-state.js.map +1 -0
- package/dist/use-current-src.d.ts +3 -0
- package/dist/use-current-src.d.ts.map +1 -0
- package/dist/use-current-src.js +23 -0
- package/dist/use-current-src.js.map +1 -0
- package/dist/use-current-time.d.ts +2 -0
- package/dist/use-current-time.d.ts.map +1 -0
- package/dist/use-current-time.js +12 -0
- package/dist/use-current-time.js.map +1 -0
- package/dist/use-media-in-timeline.d.ts.map +1 -1
- package/dist/use-media-in-timeline.js +1 -0
- package/dist/use-media-in-timeline.js.map +1 -1
- package/dist/use-media-metadata.d.ts +3 -0
- package/dist/use-media-metadata.d.ts.map +1 -0
- package/dist/use-media-metadata.js +24 -0
- package/dist/use-media-metadata.js.map +1 -0
- package/dist/use-time.d.ts +2 -0
- package/dist/use-time.d.ts.map +1 -0
- package/dist/use-time.js +15 -0
- package/dist/use-time.js.map +1 -0
- package/dist/video/Video.d.ts +1 -1
- package/dist/video/VideoForDevelopment.d.ts +1 -1
- package/dist/video/VideoForRendering.d.ts +1 -1
- package/dist/video/VideoForRendering.d.ts.map +1 -1
- package/dist/video/VideoForRendering.js +10 -4
- package/dist/video/VideoForRendering.js.map +1 -1
- package/package.json +8 -8
package/dist/internals.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { LooseAnyComponent } from './any-component';
|
|
2
3
|
import { CompProps } from './Composition';
|
|
3
4
|
import { CompositionManagerContext, RenderAssetInfo, TAsset, TCompMetadata, TComposition, TSequence } from './CompositionManager';
|
|
@@ -7,15 +8,38 @@ import { ProResProfile } from './config/prores-profile';
|
|
|
7
8
|
import * as CSSUtils from './default-css';
|
|
8
9
|
import { RemotionEnvironment } from './get-environment';
|
|
9
10
|
import * as perf from './perf';
|
|
10
|
-
import * as
|
|
11
|
+
import * as TimelineInOutPosition from './timeline-inout-position-state';
|
|
12
|
+
import { SetTimelineInOutContextValue, TimelineInOutContextValue } from './timeline-inout-position-state';
|
|
13
|
+
import * as TimelinePosition from './timeline-position-state';
|
|
11
14
|
import { SetTimelineContextValue, TimelineContextValue } from './timeline-position-state';
|
|
12
15
|
import { truthy } from './truthy';
|
|
13
16
|
import { MediaVolumeContextValue, SetMediaVolumeContextValue } from './volume-position-state';
|
|
14
17
|
import { useRemotionContexts } from './wrap-remotion-context';
|
|
18
|
+
declare const Timeline: {
|
|
19
|
+
TimelineInOutContext: import("react").Context<TimelineInOutPosition.TimelineInOutContextValue>;
|
|
20
|
+
SetTimelineInOutContext: import("react").Context<TimelineInOutPosition.SetTimelineInOutContextValue>;
|
|
21
|
+
useTimelineInOutFramePosition: () => TimelineInOutPosition.TimelineInOutContextValue;
|
|
22
|
+
useTimelineSetInOutFramePosition: () => TimelineInOutPosition.SetTimelineInOutContextValue;
|
|
23
|
+
TimelineContext: import("react").Context<TimelinePosition.TimelineContextValue>;
|
|
24
|
+
SetTimelineContext: import("react").Context<TimelinePosition.SetTimelineContextValue>;
|
|
25
|
+
useTimelinePosition: () => number;
|
|
26
|
+
useTimelineSetFrame: () => (u: import("react").SetStateAction<number>) => void;
|
|
27
|
+
usePlayingState: () => readonly [boolean, (u: import("react").SetStateAction<boolean>) => void];
|
|
28
|
+
};
|
|
15
29
|
export declare const Internals: {
|
|
16
30
|
perf: typeof perf;
|
|
17
31
|
useUnsafeVideoConfig: () => import("./video-config").VideoConfig | null;
|
|
18
|
-
Timeline:
|
|
32
|
+
Timeline: {
|
|
33
|
+
TimelineInOutContext: import("react").Context<TimelineInOutPosition.TimelineInOutContextValue>;
|
|
34
|
+
SetTimelineInOutContext: import("react").Context<TimelineInOutPosition.SetTimelineInOutContextValue>;
|
|
35
|
+
useTimelineInOutFramePosition: () => TimelineInOutPosition.TimelineInOutContextValue;
|
|
36
|
+
useTimelineSetInOutFramePosition: () => TimelineInOutPosition.SetTimelineInOutContextValue;
|
|
37
|
+
TimelineContext: import("react").Context<TimelinePosition.TimelineContextValue>;
|
|
38
|
+
SetTimelineContext: import("react").Context<TimelinePosition.SetTimelineContextValue>;
|
|
39
|
+
useTimelinePosition: () => number;
|
|
40
|
+
useTimelineSetFrame: () => (u: import("react").SetStateAction<number>) => void;
|
|
41
|
+
usePlayingState: () => readonly [boolean, (u: import("react").SetStateAction<boolean>) => void];
|
|
42
|
+
};
|
|
19
43
|
CompositionManager: import("react").Context<CompositionManagerContext>;
|
|
20
44
|
RemotionRoot: import("react").FC<{}>;
|
|
21
45
|
useVideo: () => TComposition<unknown> | null;
|
|
@@ -78,9 +102,9 @@ export declare const Internals: {
|
|
|
78
102
|
validateFps: (fps: number, location: string) => void;
|
|
79
103
|
validateDimension: (amount: number, nameOfProp: string, location: string) => void;
|
|
80
104
|
getRemotionEnvironment: () => RemotionEnvironment;
|
|
81
|
-
getProResProfile: () => "4444-xq" | "4444" | "hq" | "standard" | "
|
|
82
|
-
setProResProfile: (profile: "4444-xq" | "4444" | "hq" | "standard" | "
|
|
83
|
-
validateSelectedCodecAndProResCombination: (actualCodec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv", actualProResProfile: "4444-xq" | "4444" | "hq" | "standard" | "
|
|
105
|
+
getProResProfile: () => "light" | "4444-xq" | "4444" | "hq" | "standard" | "proxy" | undefined;
|
|
106
|
+
setProResProfile: (profile: "light" | "4444-xq" | "4444" | "hq" | "standard" | "proxy" | undefined) => void;
|
|
107
|
+
validateSelectedCodecAndProResCombination: (actualCodec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv", actualProResProfile: "light" | "4444-xq" | "4444" | "hq" | "standard" | "proxy" | undefined) => void;
|
|
84
108
|
getMaxTimelineTracks: () => number;
|
|
85
109
|
SharedAudioContext: import("react").Context<{
|
|
86
110
|
registerAudio: (aud: import("./audio").RemotionAudioProps) => {
|
|
@@ -105,5 +129,5 @@ export declare const Internals: {
|
|
|
105
129
|
invalidCompositionErrorMessage: string;
|
|
106
130
|
isCompositionIdValid: (id: string) => RegExpMatchArray | null;
|
|
107
131
|
};
|
|
108
|
-
export type { TComposition, Timeline, TCompMetadata, TSequence, WebpackOverrideFn, TAsset, RenderAssetInfo, TimelineContextValue, SetTimelineContextValue, CompProps, CompositionManagerContext, MediaVolumeContextValue, SetMediaVolumeContextValue, LooseAnyComponent, RemotionEnvironment, ProResProfile, };
|
|
132
|
+
export type { TComposition, Timeline, TCompMetadata, TSequence, WebpackOverrideFn, TAsset, RenderAssetInfo, TimelineContextValue, SetTimelineContextValue, TimelineInOutContextValue, SetTimelineInOutContextValue, CompProps, CompositionManagerContext, MediaVolumeContextValue, SetMediaVolumeContextValue, LooseAnyComponent, RemotionEnvironment, ProResProfile, };
|
|
109
133
|
//# sourceMappingURL=internals.d.ts.map
|
package/dist/internals.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internals.d.ts","sourceRoot":"","sources":["../src/internals.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,iBAAiB,EAAC,MAAM,iBAAiB,CAAC;AAKlD,OAAO,EAAC,SAAS,EAAC,MAAM,eAAe,CAAC;AACxC,OAAO,EAEN,yBAAyB,EACzB,eAAe,EACf,MAAM,EACN,aAAa,EACb,YAAY,EACZ,SAAS,EACT,MAAM,sBAAsB,CAAC;AA8B9B,OAAO,KAAK,OAAO,MAAM,cAAc,CAAC;AAExC,OAAO,EAEN,iBAAiB,EACjB,MAAM,2BAA2B,CAAC;AAQnC,OAAO,EAEN,aAAa,EAGb,MAAM,yBAAyB,CAAC;AAOjC,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAC;AAE1C,OAAO,EAAyB,mBAAmB,EAAC,MAAM,mBAAmB,CAAC;AAM9E,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAc/B,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"internals.d.ts","sourceRoot":"","sources":["../src/internals.ts"],"names":[],"mappings":";AAAA,OAAO,EAAC,iBAAiB,EAAC,MAAM,iBAAiB,CAAC;AAKlD,OAAO,EAAC,SAAS,EAAC,MAAM,eAAe,CAAC;AACxC,OAAO,EAEN,yBAAyB,EACzB,eAAe,EACf,MAAM,EACN,aAAa,EACb,YAAY,EACZ,SAAS,EACT,MAAM,sBAAsB,CAAC;AA8B9B,OAAO,KAAK,OAAO,MAAM,cAAc,CAAC;AAExC,OAAO,EAEN,iBAAiB,EACjB,MAAM,2BAA2B,CAAC;AAQnC,OAAO,EAEN,aAAa,EAGb,MAAM,yBAAyB,CAAC;AAOjC,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAC;AAE1C,OAAO,EAAyB,mBAAmB,EAAC,MAAM,mBAAmB,CAAC;AAM9E,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAc/B,OAAO,KAAK,qBAAqB,MAAM,iCAAiC,CAAC;AACzE,OAAO,EACN,4BAA4B,EAC5B,yBAAyB,EACzB,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EACN,uBAAuB,EACvB,oBAAoB,EACpB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAC,MAAM,EAAC,MAAM,UAAU,CAAC;AAchC,OAAO,EAEN,uBAAuB,EAEvB,0BAA0B,EAG1B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAEN,mBAAmB,EACnB,MAAM,yBAAyB,CAAC;AAEjC,QAAA,MAAM,QAAQ;;;;;;;;;;CAAkD,CAAC;AAIjE,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2ErB,CAAC;AAEF,YAAY,EACX,YAAY,EACZ,QAAQ,EACR,aAAa,EACb,SAAS,EACT,iBAAiB,EACjB,MAAM,EACN,eAAe,EACf,oBAAoB,EACpB,uBAAuB,EACvB,yBAAyB,EACzB,4BAA4B,EAC5B,SAAS,EACT,yBAAyB,EACzB,uBAAuB,EACvB,0BAA0B,EAC1B,iBAAiB,EACjB,mBAAmB,EACnB,aAAa,GACb,CAAC"}
|
package/dist/internals.js
CHANGED
|
@@ -53,7 +53,8 @@ const register_root_1 = require("./register-root");
|
|
|
53
53
|
const RemotionRoot_1 = require("./RemotionRoot");
|
|
54
54
|
const sequencing_1 = require("./sequencing");
|
|
55
55
|
const setup_env_variables_1 = require("./setup-env-variables");
|
|
56
|
-
const
|
|
56
|
+
const TimelineInOutPosition = __importStar(require("./timeline-inout-position-state"));
|
|
57
|
+
const TimelinePosition = __importStar(require("./timeline-position-state"));
|
|
57
58
|
const truthy_1 = require("./truthy");
|
|
58
59
|
const use_lazy_component_1 = require("./use-lazy-component");
|
|
59
60
|
const use_unsafe_video_config_1 = require("./use-unsafe-video-config");
|
|
@@ -67,6 +68,7 @@ const validate_image_format_1 = require("./validation/validate-image-format");
|
|
|
67
68
|
const validate_quality_1 = require("./validation/validate-quality");
|
|
68
69
|
const volume_position_state_1 = require("./volume-position-state");
|
|
69
70
|
const wrap_remotion_context_1 = require("./wrap-remotion-context");
|
|
71
|
+
const Timeline = { ...TimelinePosition, ...TimelineInOutPosition };
|
|
70
72
|
// Mark them as Internals so use don't assume this is public
|
|
71
73
|
// API and are less likely to use it
|
|
72
74
|
exports.Internals = {
|
package/dist/internals.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internals.js","sourceRoot":"","sources":["../src/internals.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AACA,iEAGmC;AAEnC,6DAQ8B;AAC9B,8CAA6D;AAC7D,oEAAiE;AACjE,0CAIwB;AACxB,sDAAoD;AACpD,sCAIsB;AACtB,gDAAoD;AACpD,sDAI8B;AAC9B,kEAGoC;AACpC,wDAG+B;AAC/B,4DAAqE;AACrE,sDAAqD;AACrD,sDAAwC;AACxC,sEAAkE;AAClE,gEAGmC;AACnC,kDAAsD;AACtD,wDAI+B;AAC/B,4DAAsD;AACtD,4DAKiC;AACjC,8CAA4C;AAC5C,sDAAkE;AAClE,8DAGkC;AAClC,wDAA0C;AAC1C,mDAA6D;AAC7D,uDAA8E;AAC9E,mDAGyB;AACzB,qDAA8C;AAC9C,6CAA+B;AAC/B,mDAKyB;AACzB,iDAA4C;AAC5C,6CAA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;IAClB,qBAAqB,EAArB,6CAAqB;IACrB,wBAAwB,EAAxB,sDAAwB;IACxB,WAAW,EAAX,0BAAW;IACX,iBAAiB,EAAjB,uCAAiB;IACjB,sBAAsB,EAAtB,wCAAsB;IACtB,gBAAgB,EAAhB,iCAAgB;IAChB,gBAAgB,EAAhB,iCAAgB;IAChB,yCAAyC,EAAzC,0DAAyC;IACzC,oBAAoB,EAApB,0CAAoB;IACpB,kBAAkB,EAAlB,sCAAkB;IAClB,0BAA0B,EAA1B,8CAA0B;IAC1B,eAAe,EAAf,kCAAe;IACf,aAAa,EAAb,8BAAa;IACb,aAAa,EAAb,2BAAa;IACb,aAAa,EAAb,2BAAa;IACb,kBAAkB,EAAlB,sCAAkB;IAClB,kBAAkB,EAAlB,sCAAkB;IAClB,8BAA8B,EAA9B,wDAA8B;IAC9B,oBAAoB,EAApB,8CAAoB;CACpB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/loop/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,oBAAY,SAAS,GAAG;IAEvB,gBAAgB,EAAE,MAAM,CAAC;IAEzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,eAAe,GAAG,MAAM,CAAC;IAClC,IAAI,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CAmDpC,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Loop = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const __1 = require("..");
|
|
6
|
+
const validate_duration_in_frames_1 = require("../validation/validate-duration-in-frames");
|
|
7
|
+
const Loop = ({ durationInFrames, times = Infinity, children, layout, name, }) => {
|
|
8
|
+
const { durationInFrames: compDuration } = (0, __1.useVideoConfig)();
|
|
9
|
+
(0, validate_duration_in_frames_1.validateDurationInFrames)(durationInFrames, 'of the <Loop /> component');
|
|
10
|
+
if (typeof times !== 'number') {
|
|
11
|
+
throw new TypeError(`You passed to "times" an argument of type ${typeof times}, but it must be a number.`);
|
|
12
|
+
}
|
|
13
|
+
if (times !== Infinity && times % 1 !== 0) {
|
|
14
|
+
throw new TypeError(`The "times" prop of a loop must be an integer, but got ${times}.`);
|
|
15
|
+
}
|
|
16
|
+
if (times < 0) {
|
|
17
|
+
throw new TypeError(`The "times" prop of a loop must be at least 0, but got ${times}`);
|
|
18
|
+
}
|
|
19
|
+
const maxTimes = Math.ceil(compDuration / durationInFrames);
|
|
20
|
+
const actualTimes = Math.min(maxTimes, times);
|
|
21
|
+
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: new Array(actualTimes).fill(true).map((_, i) => {
|
|
22
|
+
return ((0, jsx_runtime_1.jsx)(__1.Sequence
|
|
23
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
24
|
+
, Object.assign({ durationInFrames: durationInFrames, from: i * durationInFrames, layout: layout, name: name, showLoopTimesInTimeline: actualTimes, showInTimeline: i === 0 }, { children: children }), `loop-${i}`));
|
|
25
|
+
}) }, void 0));
|
|
26
|
+
};
|
|
27
|
+
exports.Loop = Loop;
|
|
28
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/loop/index.tsx"],"names":[],"mappings":";;;;AACA,0BAA4C;AAC5C,2FAAmF;AAW5E,MAAM,IAAI,GAAwB,CAAC,EACzC,gBAAgB,EAChB,KAAK,GAAG,QAAQ,EAChB,QAAQ,EACR,MAAM,EACN,IAAI,GACJ,EAAE,EAAE;IACJ,MAAM,EAAC,gBAAgB,EAAE,YAAY,EAAC,GAAG,IAAA,kBAAc,GAAE,CA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InTimeline?: number;
|
|
17
18
|
};
|
|
18
19
|
export declare const Sequence: React.FC<SequenceProps>;
|
|
19
20
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/sequencing/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAMN,MAAM,OAAO,CAAC;AAQf,oBAAY,mBAAmB,GAAG;IACjC,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,gBAAgB,EAAE,MAAM,CAAC;IACzB,EAAE,EAAE,MAAM,CAAC;CACX,CAAC;AAEF,eAAO,MAAM,eAAe,2CAAkD,CAAC;AAE/E,oBAAY,aAAa,GAAG;IAC3B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,eAAe,GAAG,MAAM,CAAC;IAClC,cAAc,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/sequencing/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAMN,MAAM,OAAO,CAAC;AAQf,oBAAY,mBAAmB,GAAG;IACjC,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,gBAAgB,EAAE,MAAM,CAAC;IACzB,EAAE,EAAE,MAAM,CAAC;CACX,CAAC;AAEF,eAAO,MAAM,eAAe,2CAAkD,CAAC;AAE/E,oBAAY,aAAa,GAAG;IAC3B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,eAAe,GAAG,MAAM,CAAC;IAClC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,uBAAuB,CAAC,EAAE,MAAM,CAAC;CACjC,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CA+J5C,CAAC"}
|
package/dist/sequencing/index.js
CHANGED
|
@@ -10,7 +10,7 @@ const timeline_position_state_1 = require("../timeline-position-state");
|
|
|
10
10
|
const use_frame_1 = require("../use-frame");
|
|
11
11
|
const use_unsafe_video_config_1 = require("../use-unsafe-video-config");
|
|
12
12
|
exports.SequenceContext = (0, react_1.createContext)(null);
|
|
13
|
-
const Sequence = ({ from, durationInFrames = Infinity, children, name, layout = 'absolute-fill', showInTimeline = true, }) => {
|
|
13
|
+
const Sequence = ({ from, durationInFrames = Infinity, children, name, layout = 'absolute-fill', showInTimeline = true, showLoopTimesInTimeline, }) => {
|
|
14
14
|
const [id] = (0, react_1.useState)(() => String(Math.random()));
|
|
15
15
|
const parentSequence = (0, react_1.useContext)(exports.SequenceContext);
|
|
16
16
|
const { rootId } = (0, react_1.useContext)(timeline_position_state_1.TimelineContext);
|
|
@@ -80,6 +80,7 @@ const Sequence = ({ from, durationInFrames = Infinity, children, name, layout =
|
|
|
80
80
|
rootId,
|
|
81
81
|
showInTimeline,
|
|
82
82
|
nonce,
|
|
83
|
+
showLoopTimesInTimeline,
|
|
83
84
|
});
|
|
84
85
|
return () => {
|
|
85
86
|
unregisterSequence(id);
|
|
@@ -98,6 +99,7 @@ const Sequence = ({ from, durationInFrames = Infinity, children, name, layout =
|
|
|
98
99
|
from,
|
|
99
100
|
showInTimeline,
|
|
100
101
|
nonce,
|
|
102
|
+
showLoopTimesInTimeline,
|
|
101
103
|
]);
|
|
102
104
|
const endThreshold = (() => {
|
|
103
105
|
return actualFrom + durationInFrames - 1;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/sequencing/index.tsx"],"names":[],"mappings":";;;;AAAA,iCAMe;AACf,8DAAyD;AACzD,sEAA8D;AAC9D,oCAAkC;AAClC,wEAA2D;AAC3D,4CAAqD;AACrD,wEAAgE;AAUnD,QAAA,eAAe,GAAG,IAAA,qBAAa,EAA6B,IAAI,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/sequencing/index.tsx"],"names":[],"mappings":";;;;AAAA,iCAMe;AACf,8DAAyD;AACzD,sEAA8D;AAC9D,oCAAkC;AAClC,wEAA2D;AAC3D,4CAAqD;AACrD,wEAAgE;AAUnD,QAAA,eAAe,GAAG,IAAA,qBAAa,EAA6B,IAAI,CAAC,CAAC;AAYxE,MAAM,QAAQ,GAA4B,CAAC,EACjD,IAAI,EACJ,gBAAgB,GAAG,QAAQ,EAC3B,QAAQ,EACR,IAAI,EACJ,MAAM,GAAG,eAAe,EACxB,cAAc,GAAG,IAAI,EACrB,uBAAuB,GACvB,EAAE,EAAE;IACJ,MAAM,CAAC,EAAE,CAAC,GAAG,IAAA,gBAAQ,EAAC,GAAG,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;IACnD,MAAM,cAAc,GAAG,IAAA,kBAAU,EAAC,uBAAe,CAAC,CAAC;IACnD,MAAM,EAAC,MAAM,EAAC,GAAG,IAAA,kBAAU,EAAC,yCAAe,CAAC,CAAC;IAC7C,MAAM,aAAa,GAAG,cAAc;QACnC,CAAC,CAAC,cAAc,CAAC,aAAa,GAAG,cAAc,CAAC,YAAY;QAC5D,CAAC,CAAC,CAAC,CAAC;IACL,MAAM,UAAU,GAAG,aAAa,GAAG,IAAI,CAAC;IACxC,MAAM,KAAK,GAAG,IAAA,gBAAQ,GAAE,CAAC;IAEzB,IAAI,MAAM,KAAK,eAAe,IAAI,MAAM,KAAK,MAAM,EAAE;QACpD,MAAM,IAAI,SAAS,CAClB,6FAA6F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MAAM,YAAY,GAAG,CAAC,GAAG,EAAE;QAC1B,OAAO,UAAU,GAAG,gBAAgB,GAAG,CAAC,CAAC;IAC1C,CAAC,CAAC,EAAE,CAAC;IAEL,MAAM,OAAO,GACZ,aAAa,GAAG,UAAU;QACzB,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,aAAa,GAAG,YAAY;YAC9B,CAAC,CAAC,IAAI;YACN,CAAC,CAAC,QAAQ,CAAC;IAEb,OAAO,CACN,uBAAC,uBAAe,CAAC,QAAQ,kBAAC,KAAK,EAAE,YAAY,gBAC3C,OAAO,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,KAAK,eAAe,CAAC,CAAC,CAAC,CACvD,8CACC,KAAK,EAAE;gBACN,QAAQ,EAAE,UAAU;gBACpB,OAAO,EAAE,MAAM;gBACf,KAAK,EAAE,MAAM;gBACb,MAAM,EAAE,MAAM;gBACd,GAAG,EAAE,CAAC;gBACN,MAAM,EAAE,CAAC;gBACT,IAAI,EAAE,CAAC;gBACP,KAAK,EAAE,CAAC;aACR,gBAEA,OAAO,YACH,CACN,CAAC,CAAC,CAAC,CACH,OAAO,CACP,YACyB,CAC3B,CAAC;AACH,CAAC,CAAC;AA/JW,QAAA,QAAQ,YA+JnB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flatten-children.d.ts","sourceRoot":"","sources":["../../src/series/flatten-children.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"flatten-children.d.ts","sourceRoot":"","sources":["../../src/series/flatten-children.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA0B,MAAM,OAAO,CAAC;AAI/C,eAAO,MAAM,eAAe,aAAc,MAAM,SAAS,mEAexD,CAAC"}
|
|
@@ -9,7 +9,8 @@ const flattenChildren = (children) => {
|
|
|
9
9
|
const childrenArray = react_1.default.Children.toArray(children);
|
|
10
10
|
return childrenArray.reduce((flatChildren, child) => {
|
|
11
11
|
if (child.type === react_1.default.Fragment) {
|
|
12
|
-
return flatChildren.concat((0, exports.flattenChildren)(child.props
|
|
12
|
+
return flatChildren.concat((0, exports.flattenChildren)(child.props
|
|
13
|
+
.children));
|
|
13
14
|
}
|
|
14
15
|
flatChildren.push(child);
|
|
15
16
|
return flatChildren;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flatten-children.js","sourceRoot":"","sources":["../../src/series/flatten-children.tsx"],"names":[],"mappings":";;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"flatten-children.js","sourceRoot":"","sources":["../../src/series/flatten-children.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA+C;AAIxC,MAAM,eAAe,GAAG,CAAC,QAAyB,EAAmB,EAAE;IAC7E,MAAM,aAAa,GAAG,eAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IACvD,OAAO,aAAa,CAAC,MAAM,CAAC,CAAC,YAA6B,EAAE,KAAK,EAAE,EAAE;QACpE,IAAK,KAAqC,CAAC,IAAI,KAAK,eAAK,CAAC,QAAQ,EAAE;YACnE,OAAO,YAAY,CAAC,MAAM,CACzB,IAAA,uBAAe,EACb,KAAwD,CAAC,KAAK;iBAC7D,QAAQ,CACV,CACD,CAAC;SACF;QAED,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACzB,OAAO,YAAY,CAAC;IACrB,CAAC,EAAE,EAAE,CAAC,CAAC;AACR,CAAC,CAAC;AAfW,QAAA,eAAe,mBAe1B"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare type TimelineInOutContextValue = {
|
|
3
|
+
inFrame: number | null;
|
|
4
|
+
outFrame: number | null;
|
|
5
|
+
};
|
|
6
|
+
export declare type SetTimelineInOutContextValue = {
|
|
7
|
+
setInAndOutFrames: (u: React.SetStateAction<TimelineInOutContextValue>) => void;
|
|
8
|
+
};
|
|
9
|
+
export declare const TimelineInOutContext: React.Context<TimelineInOutContextValue>;
|
|
10
|
+
export declare const SetTimelineInOutContext: React.Context<SetTimelineInOutContextValue>;
|
|
11
|
+
export declare const useTimelineInOutFramePosition: () => TimelineInOutContextValue;
|
|
12
|
+
export declare const useTimelineSetInOutFramePosition: () => SetTimelineInOutContextValue;
|
|
13
|
+
//# sourceMappingURL=timeline-inout-position-state.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"timeline-inout-position-state.d.ts","sourceRoot":"","sources":["../src/timeline-inout-position-state.ts"],"names":[],"mappings":"AAAA,OAAO,KAAkC,MAAM,OAAO,CAAC;AAEvD,oBAAY,yBAAyB,GAAG;IACvC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB,CAAC;AAEF,oBAAY,4BAA4B,GAAG;IAC1C,iBAAiB,EAAE,CAClB,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,yBAAyB,CAAC,KAC9C,IAAI,CAAC;CACV,CAAC;AAEF,eAAO,MAAM,oBAAoB,0CAG/B,CAAC;AAEH,eAAO,MAAM,uBAAuB,6CAMlC,CAAC;AAEH,eAAO,MAAM,6BAA6B,QAAO,yBAGhD,CAAC;AAEF,eAAO,MAAM,gCAAgC,QAAO,4BAGnD,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useTimelineSetInOutFramePosition = exports.useTimelineInOutFramePosition = exports.SetTimelineInOutContext = exports.TimelineInOutContext = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
exports.TimelineInOutContext = (0, react_1.createContext)({
|
|
6
|
+
inFrame: null,
|
|
7
|
+
outFrame: null,
|
|
8
|
+
});
|
|
9
|
+
exports.SetTimelineInOutContext = (0, react_1.createContext)({
|
|
10
|
+
setInAndOutFrames: () => {
|
|
11
|
+
throw new Error('default');
|
|
12
|
+
},
|
|
13
|
+
});
|
|
14
|
+
const useTimelineInOutFramePosition = () => {
|
|
15
|
+
const state = (0, react_1.useContext)(exports.TimelineInOutContext);
|
|
16
|
+
return state;
|
|
17
|
+
};
|
|
18
|
+
exports.useTimelineInOutFramePosition = useTimelineInOutFramePosition;
|
|
19
|
+
const useTimelineSetInOutFramePosition = () => {
|
|
20
|
+
const { setInAndOutFrames } = (0, react_1.useContext)(exports.SetTimelineInOutContext);
|
|
21
|
+
return { setInAndOutFrames };
|
|
22
|
+
};
|
|
23
|
+
exports.useTimelineSetInOutFramePosition = useTimelineSetInOutFramePosition;
|
|
24
|
+
//# sourceMappingURL=timeline-inout-position-state.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"timeline-inout-position-state.js","sourceRoot":"","sources":["../src/timeline-inout-position-state.ts"],"names":[],"mappings":";;;AAAA,iCAAuD;AAa1C,QAAA,oBAAoB,GAAG,IAAA,qBAAa,EAA4B;IAC5E,OAAO,EAAE,IAAI;IACb,QAAQ,EAAE,IAAI;CACd,CAAC,CAAC;AAEU,QAAA,uBAAuB,GAAG,IAAA,qBAAa,EAElD;IACD,iBAAiB,EAAE,GAAG,EAAE;QACvB,MAAM,IAAI,KAAK,CAAC,SAAS,CAAC,CAAC;IAC5B,CAAC;CACD,CAAC,CAAC;AAEI,MAAM,6BAA6B,GAAG,GAA8B,EAAE;IAC5E,MAAM,KAAK,GAAG,IAAA,kBAAU,EAAC,4BAAoB,CAAC,CAAC;IAC/C,OAAO,KAAK,CAAC;AACd,CAAC,CAAC;AAHW,QAAA,6BAA6B,iCAGxC;AAEK,MAAM,gCAAgC,GAAG,GAAiC,EAAE;IAClF,MAAM,EAAC,iBAAiB,EAAC,GAAG,IAAA,kBAAU,EAAC,+BAAuB,CAAC,CAAC;IAChE,OAAO,EAAC,iBAAiB,EAAC,CAAC;AAC5B,CAAC,CAAC;AAHW,QAAA,gCAAgC,oCAG3C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-current-src.d.ts","sourceRoot":"","sources":["../src/use-current-src.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAsB,MAAM,OAAO,CAAC;AAErD,eAAO,MAAM,aAAa,iBACX,UAAU,gBAAgB,GAAG,gBAAgB,CAAC,kBAuB5D,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useCurrentSrc = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const useCurrentSrc = (mediaElement) => {
|
|
6
|
+
var _a, _b;
|
|
7
|
+
const currentSrc = (_b = (_a = mediaElement.current) === null || _a === void 0 ? void 0 : _a.currentSrc) !== null && _b !== void 0 ? _b : null;
|
|
8
|
+
const [currentCurrentSrc, setCurrentCurrentSrc] = (0, react_1.useState)(currentSrc !== null && currentSrc !== void 0 ? currentSrc : null);
|
|
9
|
+
(0, react_1.useEffect)(() => {
|
|
10
|
+
const check = () => {
|
|
11
|
+
if (currentCurrentSrc !== currentSrc) {
|
|
12
|
+
setCurrentCurrentSrc(currentSrc);
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
const interval = setInterval(check, 100);
|
|
16
|
+
return () => {
|
|
17
|
+
clearInterval(interval);
|
|
18
|
+
};
|
|
19
|
+
}, [currentCurrentSrc, currentSrc]);
|
|
20
|
+
return currentCurrentSrc;
|
|
21
|
+
};
|
|
22
|
+
exports.useCurrentSrc = useCurrentSrc;
|
|
23
|
+
//# sourceMappingURL=use-current-src.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-current-src.js","sourceRoot":"","sources":["../src/use-current-src.ts"],"names":[],"mappings":";;;AAAA,iCAAqD;AAE9C,MAAM,aAAa,GAAG,CAC5B,YAA4D,EAC3D,EAAE;;IACH,MAAM,UAAU,GAAG,MAAA,MAAA,YAAY,CAAC,OAAO,0CAAE,UAAU,mCAAI,IAAI,CAAC;IAE5D,MAAM,CAAC,iBAAiB,EAAE,oBAAoB,CAAC,GAAG,IAAA,gBAAQ,EACzD,UAAU,aAAV,UAAU,cAAV,UAAU,GAAI,IAAI,CAClB,CAAC;IAEF,IAAA,iBAAS,EAAC,GAAG,EAAE;QACd,MAAM,KAAK,GAAG,GAAG,EAAE;YAClB,IAAI,iBAAiB,KAAK,UAAU,EAAE;gBACrC,oBAAoB,CAAC,UAAU,CAAC,CAAC;aACjC;QACF,CAAC,CAAC;QAEF,MAAM,QAAQ,GAAG,WAAW,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QAEzC,OAAO,GAAG,EAAE;YACX,aAAa,CAAC,QAAQ,CAAC,CAAC;QACzB,CAAC,CAAC;IACH,CAAC,EAAE,CAAC,iBAAiB,EAAE,UAAU,CAAC,CAAC,CAAC;IAEpC,OAAO,iBAAiB,CAAC;AAC1B,CAAC,CAAC;AAxBW,QAAA,aAAa,iBAwBxB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-current-time.d.ts","sourceRoot":"","sources":["../src/use-current-time.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,cAAc,QAAO,MAKjC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useCurrentTime = void 0;
|
|
4
|
+
const use_frame_1 = require("./use-frame");
|
|
5
|
+
const use_video_config_1 = require("./use-video-config");
|
|
6
|
+
const useCurrentTime = () => {
|
|
7
|
+
const { fps } = (0, use_video_config_1.useVideoConfig)();
|
|
8
|
+
const currentFrame = (0, use_frame_1.useCurrentFrame)();
|
|
9
|
+
return 1000 * (currentFrame / fps);
|
|
10
|
+
};
|
|
11
|
+
exports.useCurrentTime = useCurrentTime;
|
|
12
|
+
//# sourceMappingURL=use-current-time.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-current-time.js","sourceRoot":"","sources":["../src/use-current-time.ts"],"names":[],"mappings":";;;AAAA,2CAA4C;AAC5C,yDAAkD;AAE3C,MAAM,cAAc,GAAG,GAAW,EAAE;IAC1C,MAAM,EAAC,GAAG,EAAC,GAAG,IAAA,iCAAc,GAAE,CAAC;IAC/B,MAAM,YAAY,GAAG,IAAA,2BAAe,GAAE,CAAC;IAEvC,OAAO,IAAI,GAAG,CAAC,YAAY,GAAG,GAAG,CAAC,CAAC;AACpC,CAAC,CAAC;AALW,QAAA,cAAc,kBAKzB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-media-in-timeline.d.ts","sourceRoot":"","sources":["../src/use-media-in-timeline.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAA2C,MAAM,OAAO,CAAC;AAQ1E,OAAO,EAAiB,UAAU,EAAC,MAAM,eAAe,CAAC;AAEzD,eAAO,MAAM,kBAAkB;YAOtB,UAAU,GAAG,SAAS;iBACjB,MAAM;cACT,UAAU,gBAAgB,GAAG,gBAAgB,CAAC;SACnD,MAAM,GAAG,SAAS;eACZ,OAAO,GAAG,OAAO;
|
|
1
|
+
{"version":3,"file":"use-media-in-timeline.d.ts","sourceRoot":"","sources":["../src/use-media-in-timeline.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAA2C,MAAM,OAAO,CAAC;AAQ1E,OAAO,EAAiB,UAAU,EAAC,MAAM,eAAe,CAAC;AAEzD,eAAO,MAAM,kBAAkB;YAOtB,UAAU,GAAG,SAAS;iBACjB,MAAM;cACT,UAAU,gBAAgB,GAAG,gBAAgB,CAAC;SACnD,MAAM,GAAG,SAAS;eACZ,OAAO,GAAG,OAAO;UAkF5B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-media-in-timeline.js","sourceRoot":"","sources":["../src/use-media-in-timeline.ts"],"names":[],"mappings":";;;AAAA,iCAA0E;AAC1E,6DA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,CAAC,CAAC;AA7FW,QAAA,kBAAkB,sBA6F7B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-media-metadata.d.ts","sourceRoot":"","sources":["../src/use-media-metadata.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAsB,MAAM,OAAO,CAAC;AAErD,eAAO,MAAM,mBAAmB,aACrB,UAAU,gBAAgB,GAAG,gBAAgB,CAAC,YA+BxD,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useMediaHasMetadata = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const useMediaHasMetadata = (mediaRef) => {
|
|
6
|
+
const [hasMetadata, setHasMetadata] = (0, react_1.useState)(false);
|
|
7
|
+
(0, react_1.useEffect)(() => {
|
|
8
|
+
const { current } = mediaRef;
|
|
9
|
+
if (!current) {
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
const hasSourceChild = Array.from(current.childNodes).some((child) => child.nodeName === 'SOURCE');
|
|
13
|
+
if (!current.src && !hasSourceChild) {
|
|
14
|
+
const tagName = current.nodeName === 'AUDIO' ? '<Audio>' : '<Video>';
|
|
15
|
+
throw new Error(`No src found. Please provide a src prop or a <source> child to the ${tagName} element.`);
|
|
16
|
+
}
|
|
17
|
+
const handler = () => setHasMetadata(true);
|
|
18
|
+
current.addEventListener('loadedmetadata', handler);
|
|
19
|
+
return () => current.removeEventListener('loadedmetadata', handler);
|
|
20
|
+
}, [mediaRef]);
|
|
21
|
+
return hasMetadata;
|
|
22
|
+
};
|
|
23
|
+
exports.useMediaHasMetadata = useMediaHasMetadata;
|
|
24
|
+
//# sourceMappingURL=use-media-metadata.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-media-metadata.js","sourceRoot":"","sources":["../src/use-media-metadata.ts"],"names":[],"mappings":";;;AAAA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|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useCurrentTime = void 0;
|
|
4
|
+
const use_frame_1 = require("./use-frame");
|
|
5
|
+
const use_video_1 = require("./use-video");
|
|
6
|
+
const useCurrentTime = () => {
|
|
7
|
+
const video = (0, use_video_1.useVideo)();
|
|
8
|
+
const currentFrame = (0, use_frame_1.useCurrentFrame)();
|
|
9
|
+
if ((video === null || video === void 0 ? void 0 : video.fps) && currentFrame) {
|
|
10
|
+
return 1000 * (currentFrame / video.fps);
|
|
11
|
+
}
|
|
12
|
+
return 0;
|
|
13
|
+
};
|
|
14
|
+
exports.useCurrentTime = useCurrentTime;
|
|
15
|
+
//# sourceMappingURL=use-time.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-time.js","sourceRoot":"","sources":["../src/use-time.ts"],"names":[],"mappings":";;;AAAA,2CAA8C;AAC9C,2CAAuC;AAEhC,MAAM,cAAc,GAAG,GAAW,EAAE;IACzC,MAAM,KAAK,GAAG,IAAA,oBAAQ,GAAE,CAAC;IACzB,MAAM,YAAY,GAAG,IAAA,2BAAe,GAAE,CAAC;IAErC,IAAI,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,GAAG,KAAI,YAAY,EAAE;QAC9B,OAAO,IAAI,GAAG,CAAC,YAAY,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC;KAC1C;IAED,OAAO,CAAC,CAAC;AACb,CAAC,CAAC;AATW,QAAA,cAAc,kBASzB"}
|
package/dist/video/Video.d.ts
CHANGED
|
@@ -3,5 +3,5 @@ import { RemotionMainVideoProps } from './props';
|
|
|
3
3
|
export declare const Video: React.ForwardRefExoticComponent<Pick<Omit<React.DetailedHTMLProps<React.VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>, "autoPlay" | "controls" | "loop"> & {
|
|
4
4
|
volume?: import("../volume-prop").VolumeProp | undefined;
|
|
5
5
|
playbackRate?: number | undefined;
|
|
6
|
-
} & RemotionMainVideoProps, "
|
|
6
|
+
} & RemotionMainVideoProps, "style" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "height" | "width" | "src" | "volume" | "playbackRate" | "controlsList" | "crossOrigin" | "mediaGroup" | "muted" | "playsInline" | "preload" | "key" | "poster" | "disablePictureInPicture" | "disableRemotePlayback" | keyof RemotionMainVideoProps> & React.RefAttributes<HTMLVideoElement>>;
|
|
7
7
|
//# sourceMappingURL=Video.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { RemotionVideoProps } from './props';
|
|
3
|
-
export declare const VideoForDevelopment: React.ForwardRefExoticComponent<Pick<RemotionVideoProps, "
|
|
3
|
+
export declare const VideoForDevelopment: React.ForwardRefExoticComponent<Pick<RemotionVideoProps, "style" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "height" | "width" | "src" | "volume" | "playbackRate" | "controlsList" | "crossOrigin" | "mediaGroup" | "muted" | "playsInline" | "preload" | "key" | "poster" | "disablePictureInPicture" | "disableRemotePlayback"> & React.RefAttributes<HTMLVideoElement>>;
|
|
4
4
|
//# sourceMappingURL=VideoForDevelopment.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { RemotionVideoProps } from './props';
|
|
3
|
-
export declare const VideoForRendering: React.ForwardRefExoticComponent<Pick<RemotionVideoProps, "
|
|
3
|
+
export declare const VideoForRendering: React.ForwardRefExoticComponent<Pick<RemotionVideoProps, "style" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "height" | "width" | "src" | "volume" | "playbackRate" | "controlsList" | "crossOrigin" | "mediaGroup" | "muted" | "playsInline" | "preload" | "key" | "poster" | "disablePictureInPicture" | "disableRemotePlayback"> & React.RefAttributes<HTMLVideoElement>>;
|
|
4
4
|
//# sourceMappingURL=VideoForRendering.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VideoForRendering.d.ts","sourceRoot":"","sources":["../../src/video/VideoForRendering.tsx"],"names":[],"mappings":"AAAA,OAAO,KAON,MAAM,OAAO,CAAC;AAgBf,OAAO,EAAC,kBAAkB,EAAC,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"VideoForRendering.d.ts","sourceRoot":"","sources":["../../src/video/VideoForRendering.tsx"],"names":[],"mappings":"AAAA,OAAO,KAON,MAAM,OAAO,CAAC;AAgBf,OAAO,EAAC,kBAAkB,EAAC,MAAM,SAAS,CAAC;AAkK3C,eAAO,MAAM,iBAAiB,yyJAA+C,CAAC"}
|