@remotion/promo-pages 4.0.327 → 4.0.330
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/.turbo/turbo-make.log +2 -2
- package/dist/Homepage.js +320 -287
- package/dist/cn.d.ts +2 -0
- package/dist/cn.js +5 -0
- package/dist/components/Homepage.d.ts +6 -0
- package/dist/components/Homepage.js +20 -0
- package/dist/components/homepage/BackgroundAnimation.d.ts +2 -0
- package/dist/components/homepage/BackgroundAnimation.js +66 -0
- package/dist/components/homepage/ChooseTemplate.d.ts +2 -0
- package/dist/components/homepage/ChooseTemplate.js +27 -0
- package/dist/components/homepage/CommunityStats.d.ts +3 -0
- package/dist/components/homepage/CommunityStats.js +6 -0
- package/dist/components/homepage/CommunityStatsItems.d.ts +7 -0
- package/dist/components/homepage/CommunityStatsItems.js +58 -0
- package/dist/components/homepage/Counter.d.ts +9 -0
- package/dist/components/homepage/Counter.js +55 -0
- package/dist/components/homepage/Demo/Card.d.ts +15 -0
- package/dist/components/homepage/Demo/Card.js +174 -0
- package/dist/components/homepage/Demo/Cards.d.ts +15 -0
- package/dist/components/homepage/Demo/Cards.js +57 -0
- package/dist/components/homepage/Demo/Comp.d.ts +38 -0
- package/dist/components/homepage/Demo/Comp.js +71 -0
- package/dist/components/homepage/Demo/CurrentCountry.d.ts +9 -0
- package/dist/components/homepage/Demo/CurrentCountry.js +48 -0
- package/dist/components/homepage/Demo/DemoError.d.ts +2 -0
- package/dist/components/homepage/Demo/DemoError.js +10 -0
- package/dist/components/homepage/Demo/DemoErrorIcon.d.ts +2 -0
- package/dist/components/homepage/Demo/DemoErrorIcon.js +16 -0
- package/dist/components/homepage/Demo/DemoRender.d.ts +102 -0
- package/dist/components/homepage/Demo/DemoRender.js +95 -0
- package/dist/components/homepage/Demo/DigitWheel.d.ts +9 -0
- package/dist/components/homepage/Demo/DigitWheel.js +94 -0
- package/dist/components/homepage/Demo/DisplayedEmoji.d.ts +5 -0
- package/dist/components/homepage/Demo/DisplayedEmoji.js +63 -0
- package/dist/components/homepage/Demo/DoneCheckmark.d.ts +2 -0
- package/dist/components/homepage/Demo/DoneCheckmark.js +20 -0
- package/dist/components/homepage/Demo/DownloadNudge.d.ts +2 -0
- package/dist/components/homepage/Demo/DownloadNudge.js +27 -0
- package/dist/components/homepage/Demo/DragAndDropNudge.d.ts +3 -0
- package/dist/components/homepage/Demo/DragAndDropNudge.js +26 -0
- package/dist/components/homepage/Demo/EmojiCard.d.ts +10 -0
- package/dist/components/homepage/Demo/EmojiCard.js +119 -0
- package/dist/components/homepage/Demo/Minus.d.ts +5 -0
- package/dist/components/homepage/Demo/Minus.js +11 -0
- package/dist/components/homepage/Demo/PlayPauseButton.d.ts +5 -0
- package/dist/components/homepage/Demo/PlayPauseButton.js +47 -0
- package/dist/components/homepage/Demo/PlayerControls.d.ts +8 -0
- package/dist/components/homepage/Demo/PlayerControls.js +15 -0
- package/dist/components/homepage/Demo/PlayerSeekBar.d.ts +11 -0
- package/dist/components/homepage/Demo/PlayerSeekBar.js +216 -0
- package/dist/components/homepage/Demo/PlayerVolume.d.ts +5 -0
- package/dist/components/homepage/Demo/PlayerVolume.js +53 -0
- package/dist/components/homepage/Demo/Progress.d.ts +4 -0
- package/dist/components/homepage/Demo/Progress.js +14 -0
- package/dist/components/homepage/Demo/Spinner.d.ts +5 -0
- package/dist/components/homepage/Demo/Spinner.js +37 -0
- package/dist/components/homepage/Demo/Switcher.d.ts +6 -0
- package/dist/components/homepage/Demo/Switcher.js +25 -0
- package/dist/components/homepage/Demo/Temperature.d.ts +6 -0
- package/dist/components/homepage/Demo/Temperature.js +21 -0
- package/dist/components/homepage/Demo/TemperatureNumber.d.ts +5 -0
- package/dist/components/homepage/Demo/TemperatureNumber.js +36 -0
- package/dist/components/homepage/Demo/ThemeNudge.d.ts +3 -0
- package/dist/components/homepage/Demo/ThemeNudge.js +35 -0
- package/dist/components/homepage/Demo/TimeDisplay.d.ts +6 -0
- package/dist/components/homepage/Demo/TimeDisplay.js +27 -0
- package/dist/components/homepage/Demo/TrendingRepos.d.ts +6 -0
- package/dist/components/homepage/Demo/TrendingRepos.js +65 -0
- package/dist/components/homepage/Demo/icons.d.ts +10 -0
- package/dist/components/homepage/Demo/icons.js +22 -0
- package/dist/components/homepage/Demo/index.d.ts +2 -0
- package/dist/components/homepage/Demo/index.js +95 -0
- package/dist/components/homepage/Demo/math.d.ts +10 -0
- package/dist/components/homepage/Demo/math.js +29 -0
- package/dist/components/homepage/Demo/types.d.ts +6 -0
- package/dist/components/homepage/Demo/types.js +0 -0
- package/dist/components/homepage/EvaluateRemotion.d.ts +3 -0
- package/dist/components/homepage/EvaluateRemotion.js +39 -0
- package/dist/components/homepage/FreePricing.d.ts +4 -0
- package/dist/components/homepage/FreePricing.js +75 -0
- package/dist/components/homepage/GetStartedStrip.d.ts +2 -0
- package/dist/components/homepage/GetStartedStrip.js +14 -0
- package/dist/components/homepage/GitHubButton.d.ts +2 -0
- package/dist/components/homepage/GitHubButton.js +7 -0
- package/dist/components/homepage/IconForTemplate.d.ts +6 -0
- package/dist/components/homepage/IconForTemplate.js +98 -0
- package/dist/components/homepage/IfYouKnowReact.d.ts +3 -0
- package/dist/components/homepage/IfYouKnowReact.js +23 -0
- package/dist/components/homepage/InfoTooltip.d.ts +6 -0
- package/dist/components/homepage/InfoTooltip.js +6 -0
- package/dist/components/homepage/MoreTemplatesButton.d.ts +2 -0
- package/dist/components/homepage/MoreTemplatesButton.js +10 -0
- package/dist/components/homepage/MoreVideoPowerSection.d.ts +2 -0
- package/dist/components/homepage/MoreVideoPowerSection.js +16 -0
- package/dist/components/homepage/MuxVideo.d.ts +7 -0
- package/dist/components/homepage/MuxVideo.js +45 -0
- package/dist/components/homepage/NewsletterButton.d.ts +2 -0
- package/dist/components/homepage/NewsletterButton.js +39 -0
- package/dist/components/homepage/ParameterizeAndEdit.d.ts +2 -0
- package/dist/components/homepage/ParameterizeAndEdit.js +22 -0
- package/dist/components/homepage/Pricing.d.ts +2 -0
- package/dist/components/homepage/Pricing.js +15 -0
- package/dist/components/homepage/PricingBulletPoint.d.ts +6 -0
- package/dist/components/homepage/PricingBulletPoint.js +19 -0
- package/dist/components/homepage/RealMp4Videos.d.ts +2 -0
- package/dist/components/homepage/RealMp4Videos.js +41 -0
- package/dist/components/homepage/Spacer.d.ts +2 -0
- package/dist/components/homepage/Spacer.js +4 -0
- package/dist/components/homepage/TemplateIcon.d.ts +5 -0
- package/dist/components/homepage/TemplateIcon.js +24 -0
- package/dist/components/homepage/TextInput.d.ts +7 -0
- package/dist/components/homepage/TextInput.js +34 -0
- package/dist/components/homepage/TrustedByBanner.d.ts +2 -0
- package/dist/components/homepage/TrustedByBanner.js +32 -0
- package/dist/components/homepage/VideoApps.d.ts +4 -0
- package/dist/components/homepage/VideoApps.js +72 -0
- package/dist/components/homepage/VideoAppsShowcase.d.ts +3 -0
- package/dist/components/homepage/VideoAppsShowcase.js +163 -0
- package/dist/components/homepage/VideoAppsTitle.d.ts +4 -0
- package/dist/components/homepage/VideoAppsTitle.js +4 -0
- package/dist/components/homepage/VideoPlayerWithControls.d.ts +20 -0
- package/dist/components/homepage/VideoPlayerWithControls.js +104 -0
- package/dist/components/homepage/WriteInReact.d.ts +2 -0
- package/dist/components/homepage/WriteInReact.js +10 -0
- package/dist/components/homepage/YouAreHere.d.ts +2 -0
- package/dist/components/homepage/YouAreHere.js +23 -0
- package/dist/components/homepage/layout/Button.d.ts +19 -0
- package/dist/components/homepage/layout/Button.js +29 -0
- package/dist/components/homepage/layout/colors.d.ts +13 -0
- package/dist/components/homepage/layout/colors.js +14 -0
- package/dist/components/homepage/layout/use-color-mode.d.ts +21 -0
- package/dist/components/homepage/layout/use-color-mode.js +22 -0
- package/dist/components/homepage/layout/use-el-size.d.ts +5 -0
- package/dist/components/homepage/layout/use-el-size.js +40 -0
- package/dist/components/homepage/layout/use-mobile-layout.d.ts +1 -0
- package/dist/components/homepage/layout/use-mobile-layout.js +6 -0
- package/dist/components/icons/blank.d.ts +3 -0
- package/dist/components/icons/blank.js +4 -0
- package/dist/components/icons/clone.d.ts +2 -0
- package/dist/components/icons/clone.js +2 -0
- package/dist/components/icons/code-hike.d.ts +3 -0
- package/dist/components/icons/code-hike.js +4 -0
- package/dist/components/icons/cubes.d.ts +3 -0
- package/dist/components/icons/cubes.js +4 -0
- package/dist/components/icons/js.d.ts +3 -0
- package/dist/components/icons/js.js +4 -0
- package/dist/components/icons/music.d.ts +2 -0
- package/dist/components/icons/music.js +4 -0
- package/dist/components/icons/next.d.ts +4 -0
- package/dist/components/icons/next.js +4 -0
- package/dist/components/icons/overlay.d.ts +3 -0
- package/dist/components/icons/overlay.js +4 -0
- package/dist/components/icons/recorder.d.ts +3 -0
- package/dist/components/icons/recorder.js +4 -0
- package/dist/components/icons/remix.d.ts +3 -0
- package/dist/components/icons/remix.js +4 -0
- package/dist/components/icons/skia.d.ts +3 -0
- package/dist/components/icons/skia.js +4 -0
- package/dist/components/icons/stargazer.d.ts +3 -0
- package/dist/components/icons/stargazer.js +4 -0
- package/dist/components/icons/still.d.ts +3 -0
- package/dist/components/icons/still.js +4 -0
- package/dist/components/icons/tailwind.d.ts +3 -0
- package/dist/components/icons/tailwind.js +4 -0
- package/dist/components/icons/tiktok.d.ts +3 -0
- package/dist/components/icons/tiktok.js +4 -0
- package/dist/components/icons/ts.d.ts +3 -0
- package/dist/components/icons/ts.js +4 -0
- package/dist/components/icons/tts.d.ts +3 -0
- package/dist/components/icons/tts.js +4 -0
- package/dist/components/icons/undo.d.ts +3 -0
- package/dist/components/icons/undo.js +2 -0
- package/dist/components/icons/waveform.d.ts +3 -0
- package/dist/components/icons/waveform.js +4 -0
- package/dist/main.d.ts +1 -0
- package/dist/main.js +6 -0
- package/dist/tailwind.css +6 -6
- package/package.json +10 -10
- package/src/components/homepage/EvaluateRemotion.tsx +0 -1
- package/src/index.css +10 -7
- package/public/img/freelancers/florent.jpeg +0 -0
package/dist/Homepage.js
CHANGED
|
@@ -190,34 +190,34 @@ import {
|
|
|
190
190
|
} from "react";
|
|
191
191
|
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
192
192
|
import React25, { createContext as createContext18 } from "react";
|
|
193
|
-
import React26, { useMemo as useMemo26 } from "react";
|
|
194
|
-
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
195
|
-
import { Children, forwardRef as forwardRef9, useMemo as useMemo27 } from "react";
|
|
196
|
-
import React27 from "react";
|
|
197
|
-
import React28, { createContext as createContext19 } from "react";
|
|
198
|
-
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
199
|
-
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
200
|
-
import React30 from "react";
|
|
201
|
-
import { useCallback as useCallback15 } from "react";
|
|
202
193
|
import {
|
|
203
|
-
|
|
194
|
+
forwardRef as forwardRef9,
|
|
204
195
|
useContext as useContext28,
|
|
205
|
-
useEffect as
|
|
206
|
-
|
|
207
|
-
useMemo as
|
|
196
|
+
useEffect as useEffect19,
|
|
197
|
+
useImperativeHandle as useImperativeHandle9,
|
|
198
|
+
useMemo as useMemo26,
|
|
199
|
+
useRef as useRef16,
|
|
208
200
|
useState as useState17
|
|
209
201
|
} from "react";
|
|
202
|
+
import { useEffect as useEffect18 } from "react";
|
|
203
|
+
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
204
|
+
import React27, { useMemo as useMemo27 } from "react";
|
|
205
|
+
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
206
|
+
import { Children, forwardRef as forwardRef10, useMemo as useMemo28 } from "react";
|
|
207
|
+
import React28 from "react";
|
|
208
|
+
import React29, { createContext as createContext19 } from "react";
|
|
209
|
+
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
210
210
|
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
211
|
+
import React31 from "react";
|
|
212
|
+
import { useCallback as useCallback15 } from "react";
|
|
211
213
|
import {
|
|
212
|
-
|
|
214
|
+
useCallback as useCallback14,
|
|
213
215
|
useContext as useContext29,
|
|
214
216
|
useEffect as useEffect20,
|
|
215
|
-
|
|
217
|
+
useLayoutEffect as useLayoutEffect9,
|
|
216
218
|
useMemo as useMemo29,
|
|
217
|
-
useRef as useRef16,
|
|
218
219
|
useState as useState18
|
|
219
220
|
} from "react";
|
|
220
|
-
import { useEffect as useEffect19 } from "react";
|
|
221
221
|
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
222
222
|
import { jsx as jsx322 } from "react/jsx-runtime";
|
|
223
223
|
import { forwardRef as forwardRef12, useCallback as useCallback16, useContext as useContext31 } from "react";
|
|
@@ -238,15 +238,15 @@ function getNodeEnvString() {
|
|
|
238
238
|
function truthy(value) {
|
|
239
239
|
return Boolean(value);
|
|
240
240
|
}
|
|
241
|
-
function
|
|
241
|
+
function validateCodec(defaultCodec, location, name) {
|
|
242
242
|
if (typeof defaultCodec === "undefined") {
|
|
243
243
|
return;
|
|
244
244
|
}
|
|
245
245
|
if (typeof defaultCodec !== "string") {
|
|
246
|
-
throw new TypeError(`The "
|
|
246
|
+
throw new TypeError(`The "${name}" prop ${location} must be a string, but you passed a value of type ${typeof defaultCodec}.`);
|
|
247
247
|
}
|
|
248
248
|
if (!validCodecs.includes(defaultCodec)) {
|
|
249
|
-
throw new Error(`The "
|
|
249
|
+
throw new Error(`The "${name}" prop ${location} must be one of ${validCodecs.join(", ")}, but you passed ${defaultCodec}.`);
|
|
250
250
|
}
|
|
251
251
|
}
|
|
252
252
|
function validateDimension(amount, nameOfProp, location) {
|
|
@@ -436,19 +436,19 @@ function exponentialBackoff(errorCount) {
|
|
|
436
436
|
return 1000 * 2 ** (errorCount - 1);
|
|
437
437
|
}
|
|
438
438
|
function useRemotionContexts() {
|
|
439
|
-
const compositionManagerCtx =
|
|
440
|
-
const timelineContext =
|
|
441
|
-
const setTimelineContext =
|
|
442
|
-
const sequenceContext =
|
|
443
|
-
const nonceContext =
|
|
444
|
-
const canUseRemotionHooksContext =
|
|
445
|
-
const preloadContext =
|
|
446
|
-
const resolveCompositionContext =
|
|
447
|
-
const renderAssetManagerContext =
|
|
448
|
-
const sequenceManagerContext =
|
|
449
|
-
const bufferManagerContext =
|
|
450
|
-
const logLevelContext =
|
|
451
|
-
return
|
|
439
|
+
const compositionManagerCtx = React27.useContext(CompositionManager);
|
|
440
|
+
const timelineContext = React27.useContext(TimelineContext);
|
|
441
|
+
const setTimelineContext = React27.useContext(SetTimelineContext);
|
|
442
|
+
const sequenceContext = React27.useContext(SequenceContext);
|
|
443
|
+
const nonceContext = React27.useContext(NonceContext);
|
|
444
|
+
const canUseRemotionHooksContext = React27.useContext(CanUseRemotionHooks);
|
|
445
|
+
const preloadContext = React27.useContext(PreloadContext);
|
|
446
|
+
const resolveCompositionContext = React27.useContext(ResolveCompositionContext);
|
|
447
|
+
const renderAssetManagerContext = React27.useContext(RenderAssetManager);
|
|
448
|
+
const sequenceManagerContext = React27.useContext(SequenceManager);
|
|
449
|
+
const bufferManagerContext = React27.useContext(BufferingContextReact);
|
|
450
|
+
const logLevelContext = React27.useContext(LogLevelContext);
|
|
451
|
+
return useMemo27(() => ({
|
|
452
452
|
compositionManagerCtx,
|
|
453
453
|
timelineContext,
|
|
454
454
|
setTimelineContext,
|
|
@@ -735,7 +735,7 @@ var __defProp2, __export2 = (target, all) => {
|
|
|
735
735
|
});
|
|
736
736
|
}, useIsPlayer = () => {
|
|
737
737
|
return useContext(IsPlayerContext);
|
|
738
|
-
}, VERSION = "4.0.
|
|
738
|
+
}, VERSION = "4.0.330", checkMultipleRemotionVersions = () => {
|
|
739
739
|
if (typeof globalThis === "undefined") {
|
|
740
740
|
return;
|
|
741
741
|
}
|
|
@@ -1029,7 +1029,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
1029
1029
|
component: `of the "<Composition />" component with the id "${compositionId}"`
|
|
1030
1030
|
});
|
|
1031
1031
|
const defaultCodec = calculated?.defaultCodec;
|
|
1032
|
-
|
|
1032
|
+
validateCodec(defaultCodec, calculateMetadataErrorLocation, "defaultCodec");
|
|
1033
1033
|
const defaultOutName = calculated?.defaultOutName;
|
|
1034
1034
|
const defaultVideoImageFormat = calculated?.defaultVideoImageFormat;
|
|
1035
1035
|
const defaultPixelFormat = calculated?.defaultPixelFormat;
|
|
@@ -5162,31 +5162,251 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
5162
5162
|
return ratio;
|
|
5163
5163
|
}
|
|
5164
5164
|
return Number(previewSize);
|
|
5165
|
-
},
|
|
5165
|
+
}, useEmitVideoFrame = ({
|
|
5166
|
+
ref,
|
|
5167
|
+
onVideoFrame
|
|
5168
|
+
}) => {
|
|
5169
|
+
useEffect18(() => {
|
|
5170
|
+
const { current } = ref;
|
|
5171
|
+
if (!current) {
|
|
5172
|
+
return;
|
|
5173
|
+
}
|
|
5174
|
+
if (!onVideoFrame) {
|
|
5175
|
+
return;
|
|
5176
|
+
}
|
|
5177
|
+
let handle = 0;
|
|
5178
|
+
const callback = () => {
|
|
5179
|
+
if (!ref.current) {
|
|
5180
|
+
return;
|
|
5181
|
+
}
|
|
5182
|
+
onVideoFrame(ref.current);
|
|
5183
|
+
handle = ref.current.requestVideoFrameCallback(callback);
|
|
5184
|
+
};
|
|
5185
|
+
callback();
|
|
5186
|
+
return () => {
|
|
5187
|
+
current.cancelVideoFrameCallback(handle);
|
|
5188
|
+
};
|
|
5189
|
+
}, [onVideoFrame, ref]);
|
|
5190
|
+
}, VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
5191
|
+
const context = useContext28(SharedAudioContext);
|
|
5192
|
+
if (!context) {
|
|
5193
|
+
throw new Error("SharedAudioContext not found");
|
|
5194
|
+
}
|
|
5195
|
+
const videoRef = useRef16(null);
|
|
5196
|
+
const sharedSource = useMemo26(() => {
|
|
5197
|
+
if (!context.audioContext) {
|
|
5198
|
+
return null;
|
|
5199
|
+
}
|
|
5200
|
+
return makeSharedElementSourceNode({
|
|
5201
|
+
audioContext: context.audioContext,
|
|
5202
|
+
ref: videoRef
|
|
5203
|
+
});
|
|
5204
|
+
}, [context.audioContext]);
|
|
5205
|
+
const {
|
|
5206
|
+
volume,
|
|
5207
|
+
muted,
|
|
5208
|
+
playbackRate,
|
|
5209
|
+
onlyWarnForMediaSeekingError,
|
|
5210
|
+
src,
|
|
5211
|
+
onDuration,
|
|
5212
|
+
acceptableTimeShift,
|
|
5213
|
+
acceptableTimeShiftInSeconds,
|
|
5214
|
+
toneFrequency,
|
|
5215
|
+
name,
|
|
5216
|
+
_remotionInternalNativeLoopPassed,
|
|
5217
|
+
_remotionInternalStack,
|
|
5218
|
+
style,
|
|
5219
|
+
pauseWhenBuffering,
|
|
5220
|
+
showInTimeline,
|
|
5221
|
+
loopVolumeCurveBehavior,
|
|
5222
|
+
onError,
|
|
5223
|
+
onAutoPlayError,
|
|
5224
|
+
onVideoFrame,
|
|
5225
|
+
crossOrigin,
|
|
5226
|
+
delayRenderRetries,
|
|
5227
|
+
delayRenderTimeoutInMilliseconds,
|
|
5228
|
+
allowAmplificationDuringRender,
|
|
5229
|
+
useWebAudioApi,
|
|
5230
|
+
...nativeProps
|
|
5231
|
+
} = props2;
|
|
5232
|
+
const _propsValid = true;
|
|
5233
|
+
if (!_propsValid) {
|
|
5234
|
+
throw new Error("typecheck error");
|
|
5235
|
+
}
|
|
5236
|
+
const volumePropFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
|
|
5237
|
+
const { fps, durationInFrames } = useVideoConfig();
|
|
5238
|
+
const parentSequence = useContext28(SequenceContext);
|
|
5239
|
+
const { hidden } = useContext28(SequenceVisibilityToggleContext);
|
|
5240
|
+
const logLevel = useLogLevel();
|
|
5241
|
+
const mountTime = useMountTime();
|
|
5242
|
+
const [timelineId] = useState17(() => String(Math.random()));
|
|
5243
|
+
const isSequenceHidden = hidden[timelineId] ?? false;
|
|
5244
|
+
if (typeof acceptableTimeShift !== "undefined") {
|
|
5245
|
+
throw new Error("acceptableTimeShift has been removed. Use acceptableTimeShiftInSeconds instead.");
|
|
5246
|
+
}
|
|
5247
|
+
const [mediaVolume] = useMediaVolumeState();
|
|
5248
|
+
const [mediaMuted] = useMediaMutedState();
|
|
5249
|
+
const userPreferredVolume = evaluateVolume({
|
|
5250
|
+
frame: volumePropFrame,
|
|
5251
|
+
volume,
|
|
5252
|
+
mediaVolume
|
|
5253
|
+
});
|
|
5254
|
+
useMediaInTimeline({
|
|
5255
|
+
mediaRef: videoRef,
|
|
5256
|
+
volume,
|
|
5257
|
+
mediaVolume,
|
|
5258
|
+
mediaType: "video",
|
|
5259
|
+
src,
|
|
5260
|
+
playbackRate: props2.playbackRate ?? 1,
|
|
5261
|
+
displayName: name ?? null,
|
|
5262
|
+
id: timelineId,
|
|
5263
|
+
stack: _remotionInternalStack,
|
|
5264
|
+
showInTimeline,
|
|
5265
|
+
premountDisplay: null,
|
|
5266
|
+
onAutoPlayError: onAutoPlayError ?? null,
|
|
5267
|
+
isPremounting: Boolean(parentSequence?.premounting)
|
|
5268
|
+
});
|
|
5269
|
+
useMediaPlayback({
|
|
5270
|
+
mediaRef: videoRef,
|
|
5271
|
+
src,
|
|
5272
|
+
mediaType: "video",
|
|
5273
|
+
playbackRate: props2.playbackRate ?? 1,
|
|
5274
|
+
onlyWarnForMediaSeekingError,
|
|
5275
|
+
acceptableTimeshift: acceptableTimeShiftInSeconds ?? null,
|
|
5276
|
+
isPremounting: Boolean(parentSequence?.premounting),
|
|
5277
|
+
pauseWhenBuffering,
|
|
5278
|
+
onAutoPlayError: onAutoPlayError ?? null
|
|
5279
|
+
});
|
|
5280
|
+
useVolume({
|
|
5281
|
+
logLevel,
|
|
5282
|
+
mediaRef: videoRef,
|
|
5283
|
+
volume: userPreferredVolume,
|
|
5284
|
+
source: sharedSource,
|
|
5285
|
+
shouldUseWebAudioApi: useWebAudioApi ?? false
|
|
5286
|
+
});
|
|
5287
|
+
const actualFrom = parentSequence ? parentSequence.relativeFrom : 0;
|
|
5288
|
+
const duration = parentSequence ? Math.min(parentSequence.durationInFrames, durationInFrames) : durationInFrames;
|
|
5289
|
+
const preloadedSrc = usePreload(src);
|
|
5290
|
+
const actualSrc = useAppendVideoFragment({
|
|
5291
|
+
actualSrc: preloadedSrc,
|
|
5292
|
+
actualFrom,
|
|
5293
|
+
duration,
|
|
5294
|
+
fps
|
|
5295
|
+
});
|
|
5296
|
+
useImperativeHandle9(ref, () => {
|
|
5297
|
+
return videoRef.current;
|
|
5298
|
+
}, []);
|
|
5299
|
+
useState17(() => playbackLogging({
|
|
5300
|
+
logLevel,
|
|
5301
|
+
message: `Mounting video with source = ${actualSrc}, v=${VERSION}, user agent=${typeof navigator === "undefined" ? "server" : navigator.userAgent}`,
|
|
5302
|
+
tag: "video",
|
|
5303
|
+
mountTime
|
|
5304
|
+
}));
|
|
5305
|
+
useEffect19(() => {
|
|
5306
|
+
const { current } = videoRef;
|
|
5307
|
+
if (!current) {
|
|
5308
|
+
return;
|
|
5309
|
+
}
|
|
5310
|
+
const errorHandler = () => {
|
|
5311
|
+
if (current.error) {
|
|
5312
|
+
console.error("Error occurred in video", current?.error);
|
|
5313
|
+
if (onError) {
|
|
5314
|
+
const err = new Error(`Code ${current.error.code}: ${current.error.message}`);
|
|
5315
|
+
onError(err);
|
|
5316
|
+
return;
|
|
5317
|
+
}
|
|
5318
|
+
throw new Error(`The browser threw an error while playing the video ${src}: Code ${current.error.code} - ${current?.error?.message}. See https://remotion.dev/docs/media-playback-error for help. Pass an onError() prop to handle the error.`);
|
|
5319
|
+
} else {
|
|
5320
|
+
if (onError) {
|
|
5321
|
+
const err = new Error(`The browser threw an error while playing the video ${src}`);
|
|
5322
|
+
onError(err);
|
|
5323
|
+
return;
|
|
5324
|
+
}
|
|
5325
|
+
throw new Error("The browser threw an error while playing the video");
|
|
5326
|
+
}
|
|
5327
|
+
};
|
|
5328
|
+
current.addEventListener("error", errorHandler, { once: true });
|
|
5329
|
+
return () => {
|
|
5330
|
+
current.removeEventListener("error", errorHandler);
|
|
5331
|
+
};
|
|
5332
|
+
}, [onError, src]);
|
|
5333
|
+
const currentOnDurationCallback = useRef16(onDuration);
|
|
5334
|
+
currentOnDurationCallback.current = onDuration;
|
|
5335
|
+
useEmitVideoFrame({ ref: videoRef, onVideoFrame });
|
|
5336
|
+
useEffect19(() => {
|
|
5337
|
+
const { current } = videoRef;
|
|
5338
|
+
if (!current) {
|
|
5339
|
+
return;
|
|
5340
|
+
}
|
|
5341
|
+
if (current.duration) {
|
|
5342
|
+
currentOnDurationCallback.current?.(src, current.duration);
|
|
5343
|
+
return;
|
|
5344
|
+
}
|
|
5345
|
+
const onLoadedMetadata = () => {
|
|
5346
|
+
currentOnDurationCallback.current?.(src, current.duration);
|
|
5347
|
+
};
|
|
5348
|
+
current.addEventListener("loadedmetadata", onLoadedMetadata);
|
|
5349
|
+
return () => {
|
|
5350
|
+
current.removeEventListener("loadedmetadata", onLoadedMetadata);
|
|
5351
|
+
};
|
|
5352
|
+
}, [src]);
|
|
5353
|
+
useEffect19(() => {
|
|
5354
|
+
const { current } = videoRef;
|
|
5355
|
+
if (!current) {
|
|
5356
|
+
return;
|
|
5357
|
+
}
|
|
5358
|
+
if (isIosSafari()) {
|
|
5359
|
+
current.preload = "metadata";
|
|
5360
|
+
} else {
|
|
5361
|
+
current.preload = "auto";
|
|
5362
|
+
}
|
|
5363
|
+
}, []);
|
|
5364
|
+
const actualStyle = useMemo26(() => {
|
|
5365
|
+
return {
|
|
5366
|
+
...style,
|
|
5367
|
+
opacity: isSequenceHidden ? 0 : style?.opacity ?? 1
|
|
5368
|
+
};
|
|
5369
|
+
}, [isSequenceHidden, style]);
|
|
5370
|
+
const crossOriginValue = getCrossOriginValue({
|
|
5371
|
+
crossOrigin,
|
|
5372
|
+
requestsVideoFrame: Boolean(onVideoFrame)
|
|
5373
|
+
});
|
|
5374
|
+
return /* @__PURE__ */ jsx27("video", {
|
|
5375
|
+
ref: videoRef,
|
|
5376
|
+
muted: muted || mediaMuted || isSequenceHidden || userPreferredVolume <= 0,
|
|
5377
|
+
playsInline: true,
|
|
5378
|
+
src: actualSrc,
|
|
5379
|
+
loop: _remotionInternalNativeLoopPassed,
|
|
5380
|
+
style: actualStyle,
|
|
5381
|
+
disableRemotePlayback: true,
|
|
5382
|
+
crossOrigin: crossOriginValue,
|
|
5383
|
+
...nativeProps
|
|
5384
|
+
});
|
|
5385
|
+
}, VideoForPreview, WATCH_REMOTION_STATIC_FILES = "remotion_staticFilesChanged", RemotionContextProvider = (props2) => {
|
|
5166
5386
|
const { children, contexts } = props2;
|
|
5167
|
-
return /* @__PURE__ */
|
|
5387
|
+
return /* @__PURE__ */ jsx28(LogLevelContext.Provider, {
|
|
5168
5388
|
value: contexts.logLevelContext,
|
|
5169
|
-
children: /* @__PURE__ */
|
|
5389
|
+
children: /* @__PURE__ */ jsx28(CanUseRemotionHooks.Provider, {
|
|
5170
5390
|
value: contexts.canUseRemotionHooksContext,
|
|
5171
|
-
children: /* @__PURE__ */
|
|
5391
|
+
children: /* @__PURE__ */ jsx28(NonceContext.Provider, {
|
|
5172
5392
|
value: contexts.nonceContext,
|
|
5173
|
-
children: /* @__PURE__ */
|
|
5393
|
+
children: /* @__PURE__ */ jsx28(PreloadContext.Provider, {
|
|
5174
5394
|
value: contexts.preloadContext,
|
|
5175
|
-
children: /* @__PURE__ */
|
|
5395
|
+
children: /* @__PURE__ */ jsx28(CompositionManager.Provider, {
|
|
5176
5396
|
value: contexts.compositionManagerCtx,
|
|
5177
|
-
children: /* @__PURE__ */
|
|
5397
|
+
children: /* @__PURE__ */ jsx28(SequenceManager.Provider, {
|
|
5178
5398
|
value: contexts.sequenceManagerContext,
|
|
5179
|
-
children: /* @__PURE__ */
|
|
5399
|
+
children: /* @__PURE__ */ jsx28(RenderAssetManager.Provider, {
|
|
5180
5400
|
value: contexts.renderAssetManagerContext,
|
|
5181
|
-
children: /* @__PURE__ */
|
|
5401
|
+
children: /* @__PURE__ */ jsx28(ResolveCompositionContext.Provider, {
|
|
5182
5402
|
value: contexts.resolveCompositionContext,
|
|
5183
|
-
children: /* @__PURE__ */
|
|
5403
|
+
children: /* @__PURE__ */ jsx28(TimelineContext.Provider, {
|
|
5184
5404
|
value: contexts.timelineContext,
|
|
5185
|
-
children: /* @__PURE__ */
|
|
5405
|
+
children: /* @__PURE__ */ jsx28(SetTimelineContext.Provider, {
|
|
5186
5406
|
value: contexts.setTimelineContext,
|
|
5187
|
-
children: /* @__PURE__ */
|
|
5407
|
+
children: /* @__PURE__ */ jsx28(SequenceContext.Provider, {
|
|
5188
5408
|
value: contexts.sequenceContext,
|
|
5189
|
-
children: /* @__PURE__ */
|
|
5409
|
+
children: /* @__PURE__ */ jsx28(BufferingContextReact.Provider, {
|
|
5190
5410
|
value: contexts.bufferManagerContext,
|
|
5191
5411
|
children
|
|
5192
5412
|
})
|
|
@@ -5225,36 +5445,36 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
5225
5445
|
throw new RangeError(`Cannot use frame ${frame}: Duration of composition is ${durationInFrames}, therefore the highest frame that can be rendered is ${durationInFrames - 1}`);
|
|
5226
5446
|
}
|
|
5227
5447
|
}, flattenChildren = (children) => {
|
|
5228
|
-
const childrenArray =
|
|
5448
|
+
const childrenArray = React28.Children.toArray(children);
|
|
5229
5449
|
return childrenArray.reduce((flatChildren, child) => {
|
|
5230
|
-
if (child.type ===
|
|
5450
|
+
if (child.type === React28.Fragment) {
|
|
5231
5451
|
return flatChildren.concat(flattenChildren(child.props.children));
|
|
5232
5452
|
}
|
|
5233
5453
|
flatChildren.push(child);
|
|
5234
5454
|
return flatChildren;
|
|
5235
5455
|
}, []);
|
|
5236
5456
|
}, IsInsideSeriesContext, IsInsideSeriesContainer = ({ children }) => {
|
|
5237
|
-
return /* @__PURE__ */
|
|
5457
|
+
return /* @__PURE__ */ jsx29(IsInsideSeriesContext.Provider, {
|
|
5238
5458
|
value: true,
|
|
5239
5459
|
children
|
|
5240
5460
|
});
|
|
5241
5461
|
}, IsNotInsideSeriesProvider = ({ children }) => {
|
|
5242
|
-
return /* @__PURE__ */
|
|
5462
|
+
return /* @__PURE__ */ jsx29(IsInsideSeriesContext.Provider, {
|
|
5243
5463
|
value: false,
|
|
5244
5464
|
children
|
|
5245
5465
|
});
|
|
5246
5466
|
}, useRequireToBeInsideSeries = () => {
|
|
5247
|
-
const isInsideSeries =
|
|
5467
|
+
const isInsideSeries = React29.useContext(IsInsideSeriesContext);
|
|
5248
5468
|
if (!isInsideSeries) {
|
|
5249
5469
|
throw new Error("This component must be inside a <Series /> component.");
|
|
5250
5470
|
}
|
|
5251
5471
|
}, SeriesSequenceRefForwardingFunction = ({ children }, _ref) => {
|
|
5252
5472
|
useRequireToBeInsideSeries();
|
|
5253
|
-
return /* @__PURE__ */
|
|
5473
|
+
return /* @__PURE__ */ jsx30(IsNotInsideSeriesProvider, {
|
|
5254
5474
|
children
|
|
5255
5475
|
});
|
|
5256
5476
|
}, SeriesSequence, Series = (props2) => {
|
|
5257
|
-
const childrenValue =
|
|
5477
|
+
const childrenValue = useMemo28(() => {
|
|
5258
5478
|
let startFrame = 0;
|
|
5259
5479
|
const flattenedChildren = flattenChildren(props2.children);
|
|
5260
5480
|
return Children.map(flattenedChildren, (child, i) => {
|
|
@@ -5298,7 +5518,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
5298
5518
|
}
|
|
5299
5519
|
const currentStartFrame = startFrame + offset;
|
|
5300
5520
|
startFrame += durationInFramesProp + offset;
|
|
5301
|
-
return /* @__PURE__ */
|
|
5521
|
+
return /* @__PURE__ */ jsx30(Sequence, {
|
|
5302
5522
|
name: name || "<Series.Sequence>",
|
|
5303
5523
|
from: currentStartFrame,
|
|
5304
5524
|
durationInFrames: durationInFramesProp,
|
|
@@ -5309,14 +5529,14 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
5309
5529
|
});
|
|
5310
5530
|
}, [props2.children]);
|
|
5311
5531
|
if (ENABLE_V5_BREAKING_CHANGES) {
|
|
5312
|
-
return /* @__PURE__ */
|
|
5313
|
-
children: /* @__PURE__ */
|
|
5532
|
+
return /* @__PURE__ */ jsx30(IsInsideSeriesContainer, {
|
|
5533
|
+
children: /* @__PURE__ */ jsx30(Sequence, {
|
|
5314
5534
|
...props2,
|
|
5315
5535
|
children: childrenValue
|
|
5316
5536
|
})
|
|
5317
5537
|
});
|
|
5318
5538
|
}
|
|
5319
|
-
return /* @__PURE__ */
|
|
5539
|
+
return /* @__PURE__ */ jsx30(IsInsideSeriesContainer, {
|
|
5320
5540
|
children: childrenValue
|
|
5321
5541
|
});
|
|
5322
5542
|
}, validateSpringDuration = (dur) => {
|
|
@@ -5397,227 +5617,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
5397
5617
|
return `/${preparsed}`;
|
|
5398
5618
|
}
|
|
5399
5619
|
return preparsed;
|
|
5400
|
-
},
|
|
5401
|
-
ref,
|
|
5402
|
-
onVideoFrame
|
|
5403
|
-
}) => {
|
|
5404
|
-
useEffect19(() => {
|
|
5405
|
-
const { current } = ref;
|
|
5406
|
-
if (!current) {
|
|
5407
|
-
return;
|
|
5408
|
-
}
|
|
5409
|
-
if (!onVideoFrame) {
|
|
5410
|
-
return;
|
|
5411
|
-
}
|
|
5412
|
-
let handle = 0;
|
|
5413
|
-
const callback = () => {
|
|
5414
|
-
if (!ref.current) {
|
|
5415
|
-
return;
|
|
5416
|
-
}
|
|
5417
|
-
onVideoFrame(ref.current);
|
|
5418
|
-
handle = ref.current.requestVideoFrameCallback(callback);
|
|
5419
|
-
};
|
|
5420
|
-
callback();
|
|
5421
|
-
return () => {
|
|
5422
|
-
current.cancelVideoFrameCallback(handle);
|
|
5423
|
-
};
|
|
5424
|
-
}, [onVideoFrame, ref]);
|
|
5425
|
-
}, VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
5426
|
-
const context = useContext29(SharedAudioContext);
|
|
5427
|
-
if (!context) {
|
|
5428
|
-
throw new Error("SharedAudioContext not found");
|
|
5429
|
-
}
|
|
5430
|
-
const videoRef = useRef16(null);
|
|
5431
|
-
const sharedSource = useMemo29(() => {
|
|
5432
|
-
if (!context.audioContext) {
|
|
5433
|
-
return null;
|
|
5434
|
-
}
|
|
5435
|
-
return makeSharedElementSourceNode({
|
|
5436
|
-
audioContext: context.audioContext,
|
|
5437
|
-
ref: videoRef
|
|
5438
|
-
});
|
|
5439
|
-
}, [context.audioContext]);
|
|
5440
|
-
const {
|
|
5441
|
-
volume,
|
|
5442
|
-
muted,
|
|
5443
|
-
playbackRate,
|
|
5444
|
-
onlyWarnForMediaSeekingError,
|
|
5445
|
-
src,
|
|
5446
|
-
onDuration,
|
|
5447
|
-
acceptableTimeShift,
|
|
5448
|
-
acceptableTimeShiftInSeconds,
|
|
5449
|
-
toneFrequency,
|
|
5450
|
-
name,
|
|
5451
|
-
_remotionInternalNativeLoopPassed,
|
|
5452
|
-
_remotionInternalStack,
|
|
5453
|
-
style,
|
|
5454
|
-
pauseWhenBuffering,
|
|
5455
|
-
showInTimeline,
|
|
5456
|
-
loopVolumeCurveBehavior,
|
|
5457
|
-
onError,
|
|
5458
|
-
onAutoPlayError,
|
|
5459
|
-
onVideoFrame,
|
|
5460
|
-
crossOrigin,
|
|
5461
|
-
delayRenderRetries,
|
|
5462
|
-
delayRenderTimeoutInMilliseconds,
|
|
5463
|
-
allowAmplificationDuringRender,
|
|
5464
|
-
useWebAudioApi,
|
|
5465
|
-
...nativeProps
|
|
5466
|
-
} = props2;
|
|
5467
|
-
const _propsValid = true;
|
|
5468
|
-
if (!_propsValid) {
|
|
5469
|
-
throw new Error("typecheck error");
|
|
5470
|
-
}
|
|
5471
|
-
const volumePropFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
|
|
5472
|
-
const { fps, durationInFrames } = useVideoConfig();
|
|
5473
|
-
const parentSequence = useContext29(SequenceContext);
|
|
5474
|
-
const { hidden } = useContext29(SequenceVisibilityToggleContext);
|
|
5475
|
-
const logLevel = useLogLevel();
|
|
5476
|
-
const mountTime = useMountTime();
|
|
5477
|
-
const [timelineId] = useState18(() => String(Math.random()));
|
|
5478
|
-
const isSequenceHidden = hidden[timelineId] ?? false;
|
|
5479
|
-
if (typeof acceptableTimeShift !== "undefined") {
|
|
5480
|
-
throw new Error("acceptableTimeShift has been removed. Use acceptableTimeShiftInSeconds instead.");
|
|
5481
|
-
}
|
|
5482
|
-
const [mediaVolume] = useMediaVolumeState();
|
|
5483
|
-
const [mediaMuted] = useMediaMutedState();
|
|
5484
|
-
const userPreferredVolume = evaluateVolume({
|
|
5485
|
-
frame: volumePropFrame,
|
|
5486
|
-
volume,
|
|
5487
|
-
mediaVolume
|
|
5488
|
-
});
|
|
5489
|
-
useMediaInTimeline({
|
|
5490
|
-
mediaRef: videoRef,
|
|
5491
|
-
volume,
|
|
5492
|
-
mediaVolume,
|
|
5493
|
-
mediaType: "video",
|
|
5494
|
-
src,
|
|
5495
|
-
playbackRate: props2.playbackRate ?? 1,
|
|
5496
|
-
displayName: name ?? null,
|
|
5497
|
-
id: timelineId,
|
|
5498
|
-
stack: _remotionInternalStack,
|
|
5499
|
-
showInTimeline,
|
|
5500
|
-
premountDisplay: null,
|
|
5501
|
-
onAutoPlayError: onAutoPlayError ?? null,
|
|
5502
|
-
isPremounting: Boolean(parentSequence?.premounting)
|
|
5503
|
-
});
|
|
5504
|
-
useMediaPlayback({
|
|
5505
|
-
mediaRef: videoRef,
|
|
5506
|
-
src,
|
|
5507
|
-
mediaType: "video",
|
|
5508
|
-
playbackRate: props2.playbackRate ?? 1,
|
|
5509
|
-
onlyWarnForMediaSeekingError,
|
|
5510
|
-
acceptableTimeshift: acceptableTimeShiftInSeconds ?? null,
|
|
5511
|
-
isPremounting: Boolean(parentSequence?.premounting),
|
|
5512
|
-
pauseWhenBuffering,
|
|
5513
|
-
onAutoPlayError: onAutoPlayError ?? null
|
|
5514
|
-
});
|
|
5515
|
-
useVolume({
|
|
5516
|
-
logLevel,
|
|
5517
|
-
mediaRef: videoRef,
|
|
5518
|
-
volume: userPreferredVolume,
|
|
5519
|
-
source: sharedSource,
|
|
5520
|
-
shouldUseWebAudioApi: useWebAudioApi ?? false
|
|
5521
|
-
});
|
|
5522
|
-
const actualFrom = parentSequence ? parentSequence.relativeFrom : 0;
|
|
5523
|
-
const duration = parentSequence ? Math.min(parentSequence.durationInFrames, durationInFrames) : durationInFrames;
|
|
5524
|
-
const preloadedSrc = usePreload(src);
|
|
5525
|
-
const actualSrc = useAppendVideoFragment({
|
|
5526
|
-
actualSrc: preloadedSrc,
|
|
5527
|
-
actualFrom,
|
|
5528
|
-
duration,
|
|
5529
|
-
fps
|
|
5530
|
-
});
|
|
5531
|
-
useImperativeHandle9(ref, () => {
|
|
5532
|
-
return videoRef.current;
|
|
5533
|
-
}, []);
|
|
5534
|
-
useState18(() => playbackLogging({
|
|
5535
|
-
logLevel,
|
|
5536
|
-
message: `Mounting video with source = ${actualSrc}, v=${VERSION}, user agent=${typeof navigator === "undefined" ? "server" : navigator.userAgent}`,
|
|
5537
|
-
tag: "video",
|
|
5538
|
-
mountTime
|
|
5539
|
-
}));
|
|
5540
|
-
useEffect20(() => {
|
|
5541
|
-
const { current } = videoRef;
|
|
5542
|
-
if (!current) {
|
|
5543
|
-
return;
|
|
5544
|
-
}
|
|
5545
|
-
const errorHandler = () => {
|
|
5546
|
-
if (current.error) {
|
|
5547
|
-
console.error("Error occurred in video", current?.error);
|
|
5548
|
-
if (onError) {
|
|
5549
|
-
const err = new Error(`Code ${current.error.code}: ${current.error.message}`);
|
|
5550
|
-
onError(err);
|
|
5551
|
-
return;
|
|
5552
|
-
}
|
|
5553
|
-
throw new Error(`The browser threw an error while playing the video ${src}: Code ${current.error.code} - ${current?.error?.message}. See https://remotion.dev/docs/media-playback-error for help. Pass an onError() prop to handle the error.`);
|
|
5554
|
-
} else {
|
|
5555
|
-
if (onError) {
|
|
5556
|
-
const err = new Error(`The browser threw an error while playing the video ${src}`);
|
|
5557
|
-
onError(err);
|
|
5558
|
-
return;
|
|
5559
|
-
}
|
|
5560
|
-
throw new Error("The browser threw an error while playing the video");
|
|
5561
|
-
}
|
|
5562
|
-
};
|
|
5563
|
-
current.addEventListener("error", errorHandler, { once: true });
|
|
5564
|
-
return () => {
|
|
5565
|
-
current.removeEventListener("error", errorHandler);
|
|
5566
|
-
};
|
|
5567
|
-
}, [onError, src]);
|
|
5568
|
-
const currentOnDurationCallback = useRef16(onDuration);
|
|
5569
|
-
currentOnDurationCallback.current = onDuration;
|
|
5570
|
-
useEmitVideoFrame({ ref: videoRef, onVideoFrame });
|
|
5571
|
-
useEffect20(() => {
|
|
5572
|
-
const { current } = videoRef;
|
|
5573
|
-
if (!current) {
|
|
5574
|
-
return;
|
|
5575
|
-
}
|
|
5576
|
-
if (current.duration) {
|
|
5577
|
-
currentOnDurationCallback.current?.(src, current.duration);
|
|
5578
|
-
return;
|
|
5579
|
-
}
|
|
5580
|
-
const onLoadedMetadata = () => {
|
|
5581
|
-
currentOnDurationCallback.current?.(src, current.duration);
|
|
5582
|
-
};
|
|
5583
|
-
current.addEventListener("loadedmetadata", onLoadedMetadata);
|
|
5584
|
-
return () => {
|
|
5585
|
-
current.removeEventListener("loadedmetadata", onLoadedMetadata);
|
|
5586
|
-
};
|
|
5587
|
-
}, [src]);
|
|
5588
|
-
useEffect20(() => {
|
|
5589
|
-
const { current } = videoRef;
|
|
5590
|
-
if (!current) {
|
|
5591
|
-
return;
|
|
5592
|
-
}
|
|
5593
|
-
if (isIosSafari()) {
|
|
5594
|
-
current.preload = "metadata";
|
|
5595
|
-
} else {
|
|
5596
|
-
current.preload = "auto";
|
|
5597
|
-
}
|
|
5598
|
-
}, []);
|
|
5599
|
-
const actualStyle = useMemo29(() => {
|
|
5600
|
-
return {
|
|
5601
|
-
...style,
|
|
5602
|
-
opacity: isSequenceHidden ? 0 : style?.opacity ?? 1
|
|
5603
|
-
};
|
|
5604
|
-
}, [isSequenceHidden, style]);
|
|
5605
|
-
const crossOriginValue = getCrossOriginValue({
|
|
5606
|
-
crossOrigin,
|
|
5607
|
-
requestsVideoFrame: Boolean(onVideoFrame)
|
|
5608
|
-
});
|
|
5609
|
-
return /* @__PURE__ */ jsx31("video", {
|
|
5610
|
-
ref: videoRef,
|
|
5611
|
-
muted: muted || mediaMuted || isSequenceHidden || userPreferredVolume <= 0,
|
|
5612
|
-
playsInline: true,
|
|
5613
|
-
src: actualSrc,
|
|
5614
|
-
loop: _remotionInternalNativeLoopPassed,
|
|
5615
|
-
style: actualStyle,
|
|
5616
|
-
disableRemotePlayback: true,
|
|
5617
|
-
crossOrigin: crossOriginValue,
|
|
5618
|
-
...nativeProps
|
|
5619
|
-
});
|
|
5620
|
-
}, VideoForPreview, roundTo6Commas = (num) => {
|
|
5620
|
+
}, roundTo6Commas = (num) => {
|
|
5621
5621
|
return Math.round(num * 1e5) / 1e5;
|
|
5622
5622
|
}, seekToTime = ({
|
|
5623
5623
|
element,
|
|
@@ -6371,10 +6371,19 @@ var init_esm = __esm(() => {
|
|
|
6371
6371
|
},
|
|
6372
6372
|
size: { size: "auto", translation: { x: 0, y: 0 } }
|
|
6373
6373
|
});
|
|
6374
|
+
VideoForPreview = forwardRef9(VideoForDevelopmentRefForwardingFunction);
|
|
6374
6375
|
compositionSelectorRef = createRef3();
|
|
6375
6376
|
Internals = {
|
|
6376
6377
|
useUnsafeVideoConfig,
|
|
6378
|
+
useFrameForVolumeProp,
|
|
6379
|
+
useTimelinePosition,
|
|
6380
|
+
evaluateVolume,
|
|
6381
|
+
getAbsoluteSrc,
|
|
6377
6382
|
Timeline: exports_timeline_position_state,
|
|
6383
|
+
validateMediaTrimProps,
|
|
6384
|
+
validateMediaProps,
|
|
6385
|
+
resolveTrimProps,
|
|
6386
|
+
VideoForPreview,
|
|
6378
6387
|
CompositionManager,
|
|
6379
6388
|
CompositionSetters,
|
|
6380
6389
|
SequenceManager,
|
|
@@ -6443,7 +6452,7 @@ var init_esm = __esm(() => {
|
|
|
6443
6452
|
};
|
|
6444
6453
|
PERCENTAGE = NUMBER + "%";
|
|
6445
6454
|
IsInsideSeriesContext = createContext19(false);
|
|
6446
|
-
SeriesSequence =
|
|
6455
|
+
SeriesSequence = forwardRef10(SeriesSequenceRefForwardingFunction);
|
|
6447
6456
|
Series.Sequence = SeriesSequence;
|
|
6448
6457
|
addSequenceStackTraces(SeriesSequence);
|
|
6449
6458
|
defaultSpringConfig = {
|
|
@@ -6475,7 +6484,6 @@ var init_esm = __esm(() => {
|
|
|
6475
6484
|
"%3B": ";"
|
|
6476
6485
|
};
|
|
6477
6486
|
didWarn2 = {};
|
|
6478
|
-
VideoForPreview = forwardRef10(VideoForDevelopmentRefForwardingFunction);
|
|
6479
6487
|
VideoForRendering = forwardRef11(VideoForRenderingForwardFunction);
|
|
6480
6488
|
Video = forwardRef12(VideoForwardingFunction);
|
|
6481
6489
|
addSequenceStackTraces(Video);
|
|
@@ -12161,6 +12169,30 @@ var validateFrame2 = ({
|
|
|
12161
12169
|
throw new RangeError(`Cannot use frame ${frame}: Duration of composition is ${durationInFrames}, therefore the highest frame that can be rendered is ${durationInFrames - 1}`);
|
|
12162
12170
|
}
|
|
12163
12171
|
};
|
|
12172
|
+
var validCodecs2 = [
|
|
12173
|
+
"h264",
|
|
12174
|
+
"h265",
|
|
12175
|
+
"vp8",
|
|
12176
|
+
"vp9",
|
|
12177
|
+
"mp3",
|
|
12178
|
+
"aac",
|
|
12179
|
+
"wav",
|
|
12180
|
+
"prores",
|
|
12181
|
+
"h264-mkv",
|
|
12182
|
+
"h264-ts",
|
|
12183
|
+
"gif"
|
|
12184
|
+
];
|
|
12185
|
+
function validateCodec2(defaultCodec, location, name) {
|
|
12186
|
+
if (typeof defaultCodec === "undefined") {
|
|
12187
|
+
return;
|
|
12188
|
+
}
|
|
12189
|
+
if (typeof defaultCodec !== "string") {
|
|
12190
|
+
throw new TypeError(`The "${name}" prop ${location} must be a string, but you passed a value of type ${typeof defaultCodec}.`);
|
|
12191
|
+
}
|
|
12192
|
+
if (!validCodecs2.includes(defaultCodec)) {
|
|
12193
|
+
throw new Error(`The "${name}" prop ${location} must be one of ${validCodecs2.join(", ")}, but you passed ${defaultCodec}.`);
|
|
12194
|
+
}
|
|
12195
|
+
}
|
|
12164
12196
|
var validateDefaultAndInputProps2 = (defaultProps, name, compositionId) => {
|
|
12165
12197
|
if (!defaultProps) {
|
|
12166
12198
|
return;
|
|
@@ -12246,7 +12278,7 @@ var getOffthreadVideoSource = ({
|
|
|
12246
12278
|
currentTime,
|
|
12247
12279
|
toneMapped
|
|
12248
12280
|
}) => {
|
|
12249
|
-
return `http://localhost:${window.remotion_proxyPort}/proxy?src=${encodeURIComponent(getAbsoluteSrc2(src))}&time=${encodeURIComponent(currentTime)}&transparent=${String(transparent)}&toneMapped=${String(toneMapped)}`;
|
|
12281
|
+
return `http://localhost:${window.remotion_proxyPort}/proxy?src=${encodeURIComponent(getAbsoluteSrc2(src))}&time=${encodeURIComponent(Math.max(0, currentTime))}&transparent=${String(transparent)}&toneMapped=${String(toneMapped)}`;
|
|
12250
12282
|
};
|
|
12251
12283
|
var NoReactInternals = {
|
|
12252
12284
|
processColor,
|
|
@@ -12271,7 +12303,8 @@ var NoReactInternals = {
|
|
|
12271
12303
|
MIN_BUN_VERSION: ENABLE_V5_BREAKING_CHANGES2 ? "1.1.3" : "1.0.3",
|
|
12272
12304
|
colorNames,
|
|
12273
12305
|
DATE_TOKEN: DATE_TOKEN2,
|
|
12274
|
-
FILE_TOKEN: FILE_TOKEN2
|
|
12306
|
+
FILE_TOKEN: FILE_TOKEN2,
|
|
12307
|
+
validateCodec: validateCodec2
|
|
12275
12308
|
};
|
|
12276
12309
|
|
|
12277
12310
|
// ../player/dist/esm/index.mjs
|
|
@@ -17605,7 +17638,7 @@ var DoneCheckmark = () => {
|
|
|
17605
17638
|
};
|
|
17606
17639
|
|
|
17607
17640
|
// ../shapes/dist/esm/index.mjs
|
|
17608
|
-
import
|
|
17641
|
+
import React26, { useMemo as useMemo37 } from "react";
|
|
17609
17642
|
import { version } from "react-dom";
|
|
17610
17643
|
import { jsx as jsx60, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
17611
17644
|
import { jsx as jsx212 } from "react/jsx-runtime";
|
|
@@ -18849,7 +18882,6 @@ var EvaluateRemotionSection = () => {
|
|
|
18849
18882
|
"/img/freelancers/antoine.jpeg",
|
|
18850
18883
|
"/img/freelancers/ayush.png",
|
|
18851
18884
|
"/img/freelancers/benjamin.jpeg",
|
|
18852
|
-
"/img/freelancers/florent.jpeg",
|
|
18853
18885
|
"/img/freelancers/karel.jpeg",
|
|
18854
18886
|
"/img/freelancers/lorenzo.jpeg",
|
|
18855
18887
|
"/img/freelancers/mickael.jpeg",
|
|
@@ -20092,7 +20124,8 @@ var listOfRemotionPackages = [
|
|
|
20092
20124
|
"@remotion/openai-whisper",
|
|
20093
20125
|
"@remotion/compositor",
|
|
20094
20126
|
"@remotion/example-videos",
|
|
20095
|
-
"@remotion/whisper-web"
|
|
20127
|
+
"@remotion/whisper-web",
|
|
20128
|
+
"@remotion/video"
|
|
20096
20129
|
];
|
|
20097
20130
|
function truthy3(value) {
|
|
20098
20131
|
return Boolean(value);
|