@remotion/promo-pages 4.0.486 → 4.0.488
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Homepage.css +1 -1
- package/dist/Homepage.js +1147 -2270
- package/dist/components/Homepage.js +21 -5
- package/dist/components/homepage/CanvasSectionTitle.d.ts +4 -0
- package/dist/components/homepage/CanvasSectionTitle.js +14 -0
- package/dist/components/homepage/CommunityStatsItems.js +2 -2
- package/dist/components/homepage/Demo/DemoRender.d.ts +1 -1
- package/dist/components/homepage/Demo/DisplayedEmoji.js +3 -5
- package/dist/components/homepage/Demo/math.d.ts +1 -1
- package/dist/components/homepage/EditorStarterSection.d.ts +3 -0
- package/dist/components/homepage/EditorStarterSection.js +8 -0
- package/dist/components/homepage/GitHubButton.js +1 -1
- package/dist/components/homepage/MakeVideosAgentically.d.ts +10 -0
- package/dist/components/homepage/MakeVideosAgentically.js +37 -0
- package/dist/components/homepage/MakeVideosInteractively.d.ts +9 -0
- package/dist/components/homepage/MakeVideosInteractively.js +16 -0
- package/dist/components/homepage/MakeVideosLinks.d.ts +9 -0
- package/dist/components/homepage/MakeVideosLinks.js +17 -0
- package/dist/components/homepage/MakeVideosProgrammatically.d.ts +9 -0
- package/dist/components/homepage/MakeVideosProgrammatically.js +8 -0
- package/dist/components/homepage/Pricing.d.ts +1 -3
- package/dist/components/homepage/Pricing.js +2 -6
- package/dist/components/homepage/WriteInReact.js +1 -2
- package/dist/components/team/TrustSection.js +1 -1
- package/dist/design.js +241 -130
- package/dist/experts.js +230 -119
- package/dist/homepage/Pricing.js +255 -128
- package/dist/prompts/PromptsGallery.js +241 -130
- package/dist/prompts/PromptsShow.js +247 -136
- package/dist/prompts/PromptsSubmit.js +232 -121
- package/dist/tailwind.css +21 -3
- package/dist/team.js +232 -121
- package/dist/template-modal-content.css +1 -1
- package/dist/template-modal-content.js +238 -127
- package/dist/templates.js +232 -121
- package/package.json +17 -17
- package/public/img/editing-safari.mp4 +0 -0
- package/public/img/editing-vp9-chrome.webm +0 -0
- package/public/img/homepage-assets-master.mp4 +0 -0
- package/public/img/homepage-assets-master.webm +0 -0
- package/public/img/what-is-remotion.mp4 +0 -0
- package/public/img/what-is-remotion.webm +0 -0
package/dist/team.js
CHANGED
|
@@ -1559,7 +1559,7 @@ var getDefaultConfig = () => {
|
|
|
1559
1559
|
var twMerge = /* @__PURE__ */ createTailwindMerge(getDefaultConfig);
|
|
1560
1560
|
|
|
1561
1561
|
// ../design/dist/esm/index.mjs
|
|
1562
|
-
import React32, { useEffect as useEffect21, useMemo as useMemo42, useState as
|
|
1562
|
+
import React32, { useEffect as useEffect21, useMemo as useMemo42, useState as useState23 } from "react";
|
|
1563
1563
|
|
|
1564
1564
|
// ../paths/dist/esm/index.mjs
|
|
1565
1565
|
var cutLInstruction = ({
|
|
@@ -4511,7 +4511,13 @@ import {
|
|
|
4511
4511
|
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
4512
4512
|
import { forwardRef as forwardRef11, useCallback as useCallback18, useState as useState17 } from "react";
|
|
4513
4513
|
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
4514
|
-
import {
|
|
4514
|
+
import {
|
|
4515
|
+
useCallback as useCallback19,
|
|
4516
|
+
useContext as useContext33,
|
|
4517
|
+
useLayoutEffect as useLayoutEffect11,
|
|
4518
|
+
useRef as useRef24,
|
|
4519
|
+
useState as useState18
|
|
4520
|
+
} from "react";
|
|
4515
4521
|
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
4516
4522
|
import React29, { forwardRef as forwardRef12, useCallback as useCallback20, useRef as useRef25 } from "react";
|
|
4517
4523
|
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
@@ -4522,7 +4528,7 @@ import {
|
|
|
4522
4528
|
useImperativeHandle as useImperativeHandle8,
|
|
4523
4529
|
useMemo as useMemo32,
|
|
4524
4530
|
useRef as useRef26,
|
|
4525
|
-
useState as
|
|
4531
|
+
useState as useState19
|
|
4526
4532
|
} from "react";
|
|
4527
4533
|
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
4528
4534
|
import React31 from "react";
|
|
@@ -4540,7 +4546,7 @@ import {
|
|
|
4540
4546
|
useEffect as useEffect17,
|
|
4541
4547
|
useLayoutEffect as useLayoutEffect12,
|
|
4542
4548
|
useMemo as useMemo35,
|
|
4543
|
-
useState as
|
|
4549
|
+
useState as useState20
|
|
4544
4550
|
} from "react";
|
|
4545
4551
|
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
4546
4552
|
import React37, {
|
|
@@ -4551,7 +4557,7 @@ import React37, {
|
|
|
4551
4557
|
useImperativeHandle as useImperativeHandle9,
|
|
4552
4558
|
useMemo as useMemo36,
|
|
4553
4559
|
useRef as useRef27,
|
|
4554
|
-
useState as
|
|
4560
|
+
useState as useState21
|
|
4555
4561
|
} from "react";
|
|
4556
4562
|
import { useEffect as useEffect18 } from "react";
|
|
4557
4563
|
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
@@ -5746,7 +5752,7 @@ var getComponentsToAddStacksTo = () => componentsToAddStacksTo;
|
|
|
5746
5752
|
var addSequenceStackTraces = (component) => {
|
|
5747
5753
|
componentsToAddStacksTo.push(component);
|
|
5748
5754
|
};
|
|
5749
|
-
var VERSION = "4.0.
|
|
5755
|
+
var VERSION = "4.0.488";
|
|
5750
5756
|
var checkMultipleRemotionVersions = () => {
|
|
5751
5757
|
if (typeof globalThis === "undefined") {
|
|
5752
5758
|
return;
|
|
@@ -9430,7 +9436,7 @@ var useEffectChainState = () => {
|
|
|
9430
9436
|
}
|
|
9431
9437
|
}), []);
|
|
9432
9438
|
};
|
|
9433
|
-
var CanvasRefForwardingFunction = ({ width, height, fit, className, style, effects }, ref) => {
|
|
9439
|
+
var CanvasRefForwardingFunction = ({ width, height, fit, className, style, effects, ...props }, ref) => {
|
|
9434
9440
|
const canvasRef = useRef8(null);
|
|
9435
9441
|
const chainState = useEffectChainState();
|
|
9436
9442
|
const sourceCanvas = useMemo16(() => {
|
|
@@ -9494,7 +9500,8 @@ var CanvasRefForwardingFunction = ({ width, height, fit, className, style, effec
|
|
|
9494
9500
|
return /* @__PURE__ */ jsx13("canvas", {
|
|
9495
9501
|
ref: canvasRef,
|
|
9496
9502
|
className,
|
|
9497
|
-
style
|
|
9503
|
+
style,
|
|
9504
|
+
...props
|
|
9498
9505
|
});
|
|
9499
9506
|
};
|
|
9500
9507
|
var Canvas = React15.forwardRef(CanvasRefForwardingFunction);
|
|
@@ -9671,6 +9678,16 @@ var animatedImageSchema = {
|
|
|
9671
9678
|
},
|
|
9672
9679
|
...transformSchema
|
|
9673
9680
|
};
|
|
9681
|
+
var getCanvasPropsFromSequenceProps = (props) => {
|
|
9682
|
+
const canvasProps = {};
|
|
9683
|
+
const mutableCanvasProps = canvasProps;
|
|
9684
|
+
for (const key in props) {
|
|
9685
|
+
if (Object.prototype.hasOwnProperty.call(props, key) && (key.startsWith("data-") || key.startsWith("aria-"))) {
|
|
9686
|
+
mutableCanvasProps[key] = props[key];
|
|
9687
|
+
}
|
|
9688
|
+
}
|
|
9689
|
+
return canvasProps;
|
|
9690
|
+
};
|
|
9674
9691
|
var AnimatedImageContent = forwardRef4(({
|
|
9675
9692
|
src,
|
|
9676
9693
|
width,
|
|
@@ -9825,6 +9842,7 @@ var AnimatedImageInner = ({
|
|
|
9825
9842
|
useImperativeHandle2(ref, () => {
|
|
9826
9843
|
return actualRef.current;
|
|
9827
9844
|
}, []);
|
|
9845
|
+
const canvasProps = getCanvasPropsFromSequenceProps(sequenceProps);
|
|
9828
9846
|
const animatedImageProps = {
|
|
9829
9847
|
src,
|
|
9830
9848
|
width,
|
|
@@ -9836,7 +9854,8 @@ var AnimatedImageInner = ({
|
|
|
9836
9854
|
id,
|
|
9837
9855
|
className,
|
|
9838
9856
|
style,
|
|
9839
|
-
requestInit
|
|
9857
|
+
requestInit,
|
|
9858
|
+
...canvasProps
|
|
9840
9859
|
};
|
|
9841
9860
|
return /* @__PURE__ */ jsx14(Sequence, {
|
|
9842
9861
|
layout: "none",
|
|
@@ -10773,6 +10792,7 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled, pr
|
|
|
10773
10792
|
return ({
|
|
10774
10793
|
node,
|
|
10775
10794
|
mediaTimestamp,
|
|
10795
|
+
sourceOffset,
|
|
10776
10796
|
scheduledTime,
|
|
10777
10797
|
duration,
|
|
10778
10798
|
offset,
|
|
@@ -10801,7 +10821,7 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled, pr
|
|
|
10801
10821
|
}
|
|
10802
10822
|
}
|
|
10803
10823
|
const scheduledEndTime = scheduledTime + duration / node.playbackRate.value;
|
|
10804
|
-
const mediaTime = mediaTimestamp + offset;
|
|
10824
|
+
const mediaTime = mediaTimestamp + offset - sourceOffset;
|
|
10805
10825
|
const mediaEndTime = mediaTime + duration;
|
|
10806
10826
|
const latency = ctxAndGain.audioContext.baseLatency + ctxAndGain.audioContext.outputLatency;
|
|
10807
10827
|
const timeDiff = scheduledTime - ctxAndGain.audioContext.currentTime;
|
|
@@ -11616,7 +11636,8 @@ var useBufferManager = (logLevel, mountTime) => {
|
|
|
11616
11636
|
if (rendering) {
|
|
11617
11637
|
return;
|
|
11618
11638
|
}
|
|
11619
|
-
if (blocks.length > 0) {
|
|
11639
|
+
if (blocks.length > 0 && !buffering.current) {
|
|
11640
|
+
buffering.current = true;
|
|
11620
11641
|
onBufferingCallbacks.forEach((c2) => c2());
|
|
11621
11642
|
playbackLogging({
|
|
11622
11643
|
logLevel,
|
|
@@ -11631,7 +11652,8 @@ var useBufferManager = (logLevel, mountTime) => {
|
|
|
11631
11652
|
if (rendering) {
|
|
11632
11653
|
return;
|
|
11633
11654
|
}
|
|
11634
|
-
if (blocks.length === 0) {
|
|
11655
|
+
if (blocks.length === 0 && buffering.current) {
|
|
11656
|
+
buffering.current = false;
|
|
11635
11657
|
onResumeCallbacks.forEach((c2) => c2());
|
|
11636
11658
|
playbackLogging({
|
|
11637
11659
|
logLevel,
|
|
@@ -11664,15 +11686,11 @@ var useIsPlayerBuffering = (bufferManager) => {
|
|
|
11664
11686
|
const onResume = () => {
|
|
11665
11687
|
setIsBuffering(false);
|
|
11666
11688
|
};
|
|
11667
|
-
bufferManager.listenForBuffering(onBuffer);
|
|
11668
|
-
bufferManager.listenForResume(onResume);
|
|
11689
|
+
const buffer = bufferManager.listenForBuffering(onBuffer);
|
|
11690
|
+
const resume = bufferManager.listenForResume(onResume);
|
|
11669
11691
|
return () => {
|
|
11670
|
-
|
|
11671
|
-
|
|
11672
|
-
});
|
|
11673
|
-
bufferManager.listenForResume(() => {
|
|
11674
|
-
return;
|
|
11675
|
-
});
|
|
11692
|
+
buffer.remove();
|
|
11693
|
+
resume.remove();
|
|
11676
11694
|
};
|
|
11677
11695
|
}, [bufferManager]);
|
|
11678
11696
|
return isBuffering;
|
|
@@ -11796,6 +11814,72 @@ var useBufferUntilFirstFrame = ({
|
|
|
11796
11814
|
};
|
|
11797
11815
|
}, [bufferUntilFirstFrame]);
|
|
11798
11816
|
};
|
|
11817
|
+
var getMediaSyncAction = (input) => {
|
|
11818
|
+
const {
|
|
11819
|
+
duration,
|
|
11820
|
+
currentTime,
|
|
11821
|
+
paused,
|
|
11822
|
+
ended,
|
|
11823
|
+
desiredUnclampedTime,
|
|
11824
|
+
mediaTagTime,
|
|
11825
|
+
mediaTagLastUpdate,
|
|
11826
|
+
rvcTime,
|
|
11827
|
+
rvcLastUpdate,
|
|
11828
|
+
isVariableFpsVideo,
|
|
11829
|
+
acceptableTimeShift,
|
|
11830
|
+
lastSeekDueToShift,
|
|
11831
|
+
playing,
|
|
11832
|
+
playbackRate,
|
|
11833
|
+
mediaTagBufferingOrStalled,
|
|
11834
|
+
playerBuffering,
|
|
11835
|
+
absoluteFrame,
|
|
11836
|
+
onlyWarnForMediaSeekingError,
|
|
11837
|
+
isPremounting,
|
|
11838
|
+
isPostmounting,
|
|
11839
|
+
pauseWhenBuffering
|
|
11840
|
+
} = input;
|
|
11841
|
+
const shouldBeTime = !Number.isNaN(duration) && Number.isFinite(duration) ? Math.min(duration, desiredUnclampedTime) : desiredUnclampedTime;
|
|
11842
|
+
const timeShiftMediaTag = Math.abs(shouldBeTime - mediaTagTime);
|
|
11843
|
+
const timeShiftRvcTag = rvcTime ? Math.abs(shouldBeTime - rvcTime) : null;
|
|
11844
|
+
const mostRecentTimeshift = rvcLastUpdate && rvcTime > mediaTagLastUpdate ? timeShiftRvcTag : timeShiftMediaTag;
|
|
11845
|
+
const timeShift = timeShiftRvcTag && !isVariableFpsVideo ? mostRecentTimeshift : timeShiftMediaTag;
|
|
11846
|
+
if (timeShift > acceptableTimeShift && lastSeekDueToShift !== shouldBeTime) {
|
|
11847
|
+
return {
|
|
11848
|
+
type: "seek-due-to-shift",
|
|
11849
|
+
shouldBeTime,
|
|
11850
|
+
why: `because time shift is too big. shouldBeTime = ${shouldBeTime}, isTime = ${mediaTagTime}, requestVideoCallbackTime = ${rvcTime}, timeShift = ${timeShift}${isVariableFpsVideo ? ", isVariableFpsVideo = true" : ""}, isPremounting = ${isPremounting}, isPostmounting = ${isPostmounting}, pauseWhenBuffering = ${pauseWhenBuffering}`,
|
|
11851
|
+
bufferUntilFirstFrame: playing && playbackRate > 0,
|
|
11852
|
+
playReason: playing && paused ? "player is playing but media tag is paused, and just seeked" : null,
|
|
11853
|
+
warnAboutNonSeekable: !onlyWarnForMediaSeekingError
|
|
11854
|
+
};
|
|
11855
|
+
}
|
|
11856
|
+
const seekThreshold = playing ? 0.15 : 0.01;
|
|
11857
|
+
const makesSenseToSeek = Math.abs(currentTime - shouldBeTime) > seekThreshold;
|
|
11858
|
+
const isSomethingElseBuffering = playerBuffering && !mediaTagBufferingOrStalled;
|
|
11859
|
+
if (!playing || isSomethingElseBuffering) {
|
|
11860
|
+
return {
|
|
11861
|
+
type: "seek-if-not-playing",
|
|
11862
|
+
shouldBeTime,
|
|
11863
|
+
why: makesSenseToSeek ? `not playing or something else is buffering. time offset is over seek threshold (${seekThreshold})` : null
|
|
11864
|
+
};
|
|
11865
|
+
}
|
|
11866
|
+
if (!playing || playerBuffering) {
|
|
11867
|
+
return { type: "none" };
|
|
11868
|
+
}
|
|
11869
|
+
const pausedCondition = paused && !ended;
|
|
11870
|
+
const firstFrameCondition = absoluteFrame === 0;
|
|
11871
|
+
if (pausedCondition || firstFrameCondition) {
|
|
11872
|
+
const reason = pausedCondition ? "media tag is paused" : "absolute frame is 0";
|
|
11873
|
+
return {
|
|
11874
|
+
type: "play-and-seek",
|
|
11875
|
+
shouldBeTime,
|
|
11876
|
+
why: makesSenseToSeek ? `is over timeshift threshold (threshold = ${seekThreshold}) and ${reason}` : null,
|
|
11877
|
+
playReason: `player is playing and ${reason}`,
|
|
11878
|
+
bufferUntilFirstFrame: !isVariableFpsVideo && playbackRate > 0
|
|
11879
|
+
};
|
|
11880
|
+
}
|
|
11881
|
+
return { type: "none" };
|
|
11882
|
+
};
|
|
11799
11883
|
var useCurrentTimeOfMediaTagWithUpdateTimeStamp = (mediaRef) => {
|
|
11800
11884
|
const lastUpdate = React21.useRef({
|
|
11801
11885
|
time: mediaRef.current?.currentTime ?? 0,
|
|
@@ -12215,89 +12299,93 @@ var useMediaPlayback = ({
|
|
|
12215
12299
|
if (!src) {
|
|
12216
12300
|
throw new Error(`No 'src' attribute was passed to the ${tagName} element.`);
|
|
12217
12301
|
}
|
|
12218
|
-
const {
|
|
12219
|
-
const
|
|
12220
|
-
|
|
12221
|
-
|
|
12222
|
-
|
|
12223
|
-
|
|
12224
|
-
|
|
12225
|
-
|
|
12226
|
-
|
|
12227
|
-
|
|
12302
|
+
const { current } = mediaRef;
|
|
12303
|
+
const action = getMediaSyncAction({
|
|
12304
|
+
duration: current.duration,
|
|
12305
|
+
currentTime: current.currentTime,
|
|
12306
|
+
paused: current.paused,
|
|
12307
|
+
ended: current.ended,
|
|
12308
|
+
desiredUnclampedTime,
|
|
12309
|
+
mediaTagTime: mediaTagCurrentTime.current.time,
|
|
12310
|
+
mediaTagLastUpdate: mediaTagCurrentTime.current.lastUpdate,
|
|
12311
|
+
rvcTime: rvcCurrentTime.current?.time ?? null,
|
|
12312
|
+
rvcLastUpdate: rvcCurrentTime.current?.lastUpdate ?? null,
|
|
12313
|
+
isVariableFpsVideo: Boolean(isVariableFpsVideoMap.current[src]),
|
|
12314
|
+
acceptableTimeShift: acceptableTimeShiftButLessThanDuration,
|
|
12315
|
+
lastSeekDueToShift: lastSeekDueToShift.current,
|
|
12316
|
+
playing,
|
|
12317
|
+
playbackRate,
|
|
12318
|
+
mediaTagBufferingOrStalled: isMediaTagBuffering || isBuffering(),
|
|
12319
|
+
playerBuffering: buffering.buffering.current,
|
|
12320
|
+
absoluteFrame,
|
|
12321
|
+
onlyWarnForMediaSeekingError,
|
|
12322
|
+
isPremounting,
|
|
12323
|
+
isPostmounting,
|
|
12324
|
+
pauseWhenBuffering
|
|
12325
|
+
});
|
|
12326
|
+
if (action.type === "none") {
|
|
12327
|
+
return;
|
|
12328
|
+
}
|
|
12329
|
+
if (action.type === "seek-due-to-shift") {
|
|
12228
12330
|
lastSeek.current = seek({
|
|
12229
|
-
mediaRef:
|
|
12230
|
-
time: shouldBeTime,
|
|
12331
|
+
mediaRef: current,
|
|
12332
|
+
time: action.shouldBeTime,
|
|
12231
12333
|
logLevel,
|
|
12232
|
-
why:
|
|
12334
|
+
why: action.why,
|
|
12233
12335
|
mountTime
|
|
12234
12336
|
});
|
|
12235
12337
|
lastSeekDueToShift.current = lastSeek.current;
|
|
12236
|
-
if (
|
|
12237
|
-
|
|
12238
|
-
bufferUntilFirstFrame(shouldBeTime);
|
|
12239
|
-
}
|
|
12240
|
-
if (mediaRef.current.paused) {
|
|
12241
|
-
playAndHandleNotAllowedError({
|
|
12242
|
-
mediaRef,
|
|
12243
|
-
mediaType,
|
|
12244
|
-
onAutoPlayError,
|
|
12245
|
-
logLevel,
|
|
12246
|
-
mountTime,
|
|
12247
|
-
reason: "player is playing but media tag is paused, and just seeked",
|
|
12248
|
-
isPlayer: env.isPlayer
|
|
12249
|
-
});
|
|
12250
|
-
}
|
|
12338
|
+
if (action.bufferUntilFirstFrame) {
|
|
12339
|
+
bufferUntilFirstFrame(action.shouldBeTime);
|
|
12251
12340
|
}
|
|
12252
|
-
if (
|
|
12253
|
-
|
|
12254
|
-
|
|
12255
|
-
|
|
12256
|
-
|
|
12257
|
-
const seekThreshold = playing ? 0.15 : 0.01;
|
|
12258
|
-
const makesSenseToSeek = Math.abs(mediaRef.current.currentTime - shouldBeTime) > seekThreshold;
|
|
12259
|
-
const isMediaTagBufferingOrStalled = isMediaTagBuffering || isBuffering();
|
|
12260
|
-
const isSomethingElseBuffering = buffering.buffering.current && !isMediaTagBufferingOrStalled;
|
|
12261
|
-
if (!playing || isSomethingElseBuffering) {
|
|
12262
|
-
if (makesSenseToSeek) {
|
|
12263
|
-
lastSeek.current = seek({
|
|
12264
|
-
mediaRef: mediaRef.current,
|
|
12265
|
-
time: shouldBeTime,
|
|
12341
|
+
if (action.playReason !== null) {
|
|
12342
|
+
playAndHandleNotAllowedError({
|
|
12343
|
+
mediaRef,
|
|
12344
|
+
mediaType,
|
|
12345
|
+
onAutoPlayError,
|
|
12266
12346
|
logLevel,
|
|
12267
|
-
|
|
12268
|
-
|
|
12347
|
+
mountTime,
|
|
12348
|
+
reason: action.playReason,
|
|
12349
|
+
isPlayer: env.isPlayer
|
|
12269
12350
|
});
|
|
12270
12351
|
}
|
|
12352
|
+
if (action.warnAboutNonSeekable) {
|
|
12353
|
+
warnAboutNonSeekableMedia(current, "console-error");
|
|
12354
|
+
}
|
|
12271
12355
|
return;
|
|
12272
12356
|
}
|
|
12273
|
-
if (
|
|
12274
|
-
|
|
12275
|
-
}
|
|
12276
|
-
const pausedCondition = mediaRef.current.paused && !mediaRef.current.ended;
|
|
12277
|
-
const firstFrameCondition = absoluteFrame === 0;
|
|
12278
|
-
if (pausedCondition || firstFrameCondition) {
|
|
12279
|
-
const reason = pausedCondition ? "media tag is paused" : "absolute frame is 0";
|
|
12280
|
-
if (makesSenseToSeek) {
|
|
12357
|
+
if (action.type === "seek-if-not-playing") {
|
|
12358
|
+
if (action.why !== null) {
|
|
12281
12359
|
lastSeek.current = seek({
|
|
12282
|
-
mediaRef:
|
|
12283
|
-
time: shouldBeTime,
|
|
12360
|
+
mediaRef: current,
|
|
12361
|
+
time: action.shouldBeTime,
|
|
12284
12362
|
logLevel,
|
|
12285
|
-
why:
|
|
12363
|
+
why: action.why,
|
|
12286
12364
|
mountTime
|
|
12287
12365
|
});
|
|
12288
12366
|
}
|
|
12289
|
-
|
|
12290
|
-
|
|
12291
|
-
|
|
12292
|
-
|
|
12367
|
+
return;
|
|
12368
|
+
}
|
|
12369
|
+
if (action.why !== null) {
|
|
12370
|
+
lastSeek.current = seek({
|
|
12371
|
+
mediaRef: current,
|
|
12372
|
+
time: action.shouldBeTime,
|
|
12293
12373
|
logLevel,
|
|
12294
|
-
|
|
12295
|
-
|
|
12296
|
-
isPlayer: env.isPlayer
|
|
12374
|
+
why: action.why,
|
|
12375
|
+
mountTime
|
|
12297
12376
|
});
|
|
12298
|
-
|
|
12299
|
-
|
|
12300
|
-
|
|
12377
|
+
}
|
|
12378
|
+
playAndHandleNotAllowedError({
|
|
12379
|
+
mediaRef,
|
|
12380
|
+
mediaType,
|
|
12381
|
+
onAutoPlayError,
|
|
12382
|
+
logLevel,
|
|
12383
|
+
mountTime,
|
|
12384
|
+
reason: action.playReason,
|
|
12385
|
+
isPlayer: env.isPlayer
|
|
12386
|
+
});
|
|
12387
|
+
if (action.bufferUntilFirstFrame) {
|
|
12388
|
+
bufferUntilFirstFrame(action.shouldBeTime);
|
|
12301
12389
|
}
|
|
12302
12390
|
}, [
|
|
12303
12391
|
absoluteFrame,
|
|
@@ -13530,13 +13618,18 @@ var CanvasImageContent = forwardRef10(({
|
|
|
13530
13618
|
});
|
|
13531
13619
|
const sequenceContext = useContext32(SequenceContext);
|
|
13532
13620
|
const pendingLoadDelayRef = useRef23(null);
|
|
13533
|
-
const
|
|
13621
|
+
const [isLoadPending, setIsLoadPending] = useState16(false);
|
|
13622
|
+
const isPremounting = Boolean(sequenceContext?.premounting);
|
|
13623
|
+
const isPostmounting = Boolean(sequenceContext?.postmounting);
|
|
13624
|
+
const continuePendingLoadDelay = useCallback17(({ markAsReady }) => {
|
|
13534
13625
|
const pending = pendingLoadDelayRef.current;
|
|
13535
13626
|
if (!pending || pending.continued) {
|
|
13536
13627
|
return;
|
|
13537
13628
|
}
|
|
13538
13629
|
pending.continued = true;
|
|
13539
|
-
|
|
13630
|
+
if (markAsReady) {
|
|
13631
|
+
setIsLoadPending(false);
|
|
13632
|
+
}
|
|
13540
13633
|
continueRender2(pending.handle);
|
|
13541
13634
|
pendingLoadDelayRef.current = null;
|
|
13542
13635
|
}, [continueRender2]);
|
|
@@ -13558,23 +13651,30 @@ var CanvasImageContent = forwardRef10(({
|
|
|
13558
13651
|
}
|
|
13559
13652
|
}, [ref, refForOutline]);
|
|
13560
13653
|
useLayoutEffect10(() => {
|
|
13561
|
-
|
|
13562
|
-
|
|
13654
|
+
if (!pauseWhenLoading || !isLoadPending || isPremounting || isPostmounting) {
|
|
13655
|
+
return;
|
|
13656
|
+
}
|
|
13657
|
+
return delayPlayback().unblock;
|
|
13658
|
+
}, [
|
|
13659
|
+
delayPlayback,
|
|
13660
|
+
isLoadPending,
|
|
13661
|
+
isPostmounting,
|
|
13662
|
+
isPremounting,
|
|
13663
|
+
pauseWhenLoading
|
|
13664
|
+
]);
|
|
13665
|
+
useLayoutEffect10(() => {
|
|
13563
13666
|
const handle = delayRender2(`Rendering <CanvasImage> with src="${truncateSrcForLabel(actualSrc)}"`, {
|
|
13564
13667
|
retries: delayRenderRetries ?? undefined,
|
|
13565
13668
|
timeoutInMilliseconds: delayRenderTimeoutInMilliseconds ?? undefined
|
|
13566
13669
|
});
|
|
13567
|
-
const unblock = pauseWhenLoading && !isPremounting && !isPostmounting ? delayPlayback().unblock : () => {
|
|
13568
|
-
return;
|
|
13569
|
-
};
|
|
13570
13670
|
const controller = new AbortController;
|
|
13571
13671
|
let cancelled = false;
|
|
13572
13672
|
let errorCount = 0;
|
|
13573
13673
|
let timeoutId = null;
|
|
13574
13674
|
setLoadedImage(null);
|
|
13675
|
+
setIsLoadPending(true);
|
|
13575
13676
|
pendingLoadDelayRef.current = {
|
|
13576
13677
|
handle,
|
|
13577
|
-
unblock,
|
|
13578
13678
|
continued: false
|
|
13579
13679
|
};
|
|
13580
13680
|
const attemptLoad = () => {
|
|
@@ -13585,7 +13685,7 @@ var CanvasImageContent = forwardRef10(({
|
|
|
13585
13685
|
setLoadedImage(image);
|
|
13586
13686
|
}).catch((err) => {
|
|
13587
13687
|
if (err.name === "AbortError") {
|
|
13588
|
-
continuePendingLoadDelay();
|
|
13688
|
+
continuePendingLoadDelay({ markAsReady: false });
|
|
13589
13689
|
return;
|
|
13590
13690
|
}
|
|
13591
13691
|
errorCount++;
|
|
@@ -13599,7 +13699,7 @@ var CanvasImageContent = forwardRef10(({
|
|
|
13599
13699
|
}, backoff);
|
|
13600
13700
|
} else if (onError) {
|
|
13601
13701
|
onError(err);
|
|
13602
|
-
continuePendingLoadDelay();
|
|
13702
|
+
continuePendingLoadDelay({ markAsReady: true });
|
|
13603
13703
|
} else {
|
|
13604
13704
|
cancelRender2(err);
|
|
13605
13705
|
}
|
|
@@ -13612,21 +13712,17 @@ var CanvasImageContent = forwardRef10(({
|
|
|
13612
13712
|
clearTimeout(timeoutId);
|
|
13613
13713
|
}
|
|
13614
13714
|
controller.abort();
|
|
13615
|
-
continuePendingLoadDelay();
|
|
13715
|
+
continuePendingLoadDelay({ markAsReady: false });
|
|
13616
13716
|
};
|
|
13617
13717
|
}, [
|
|
13618
13718
|
actualSrc,
|
|
13619
13719
|
cancelRender2,
|
|
13620
13720
|
continuePendingLoadDelay,
|
|
13621
|
-
delayPlayback,
|
|
13622
13721
|
delayRender2,
|
|
13623
13722
|
delayRenderRetries,
|
|
13624
13723
|
delayRenderTimeoutInMilliseconds,
|
|
13625
13724
|
maxRetries,
|
|
13626
|
-
onError
|
|
13627
|
-
pauseWhenLoading,
|
|
13628
|
-
sequenceContext?.postmounting,
|
|
13629
|
-
sequenceContext?.premounting
|
|
13725
|
+
onError
|
|
13630
13726
|
]);
|
|
13631
13727
|
useLayoutEffect10(() => {
|
|
13632
13728
|
if (!loadedImage || !outputCanvas || !sourceCanvas) {
|
|
@@ -13678,7 +13774,7 @@ var CanvasImageContent = forwardRef10(({
|
|
|
13678
13774
|
return;
|
|
13679
13775
|
}
|
|
13680
13776
|
continueRenderOnce();
|
|
13681
|
-
continuePendingLoadDelay();
|
|
13777
|
+
continuePendingLoadDelay({ markAsReady: true });
|
|
13682
13778
|
}
|
|
13683
13779
|
});
|
|
13684
13780
|
}
|
|
@@ -13689,7 +13785,7 @@ var CanvasImageContent = forwardRef10(({
|
|
|
13689
13785
|
if (onError) {
|
|
13690
13786
|
onError(err);
|
|
13691
13787
|
continueRenderOnce();
|
|
13692
|
-
continuePendingLoadDelay();
|
|
13788
|
+
continuePendingLoadDelay({ markAsReady: true });
|
|
13693
13789
|
} else {
|
|
13694
13790
|
cancelRender2(err);
|
|
13695
13791
|
}
|
|
@@ -13860,6 +13956,7 @@ var ImgContent = ({
|
|
|
13860
13956
|
const errors = useRef24({});
|
|
13861
13957
|
const { delayPlayback } = useBufferState();
|
|
13862
13958
|
const sequenceContext = useContext33(SequenceContext);
|
|
13959
|
+
const [isLoading, setIsLoading] = useState18(false);
|
|
13863
13960
|
const _propsValid = true;
|
|
13864
13961
|
if (!_propsValid) {
|
|
13865
13962
|
throw new Error("typecheck error");
|
|
@@ -13892,6 +13989,8 @@ var ImgContent = ({
|
|
|
13892
13989
|
}, timeout);
|
|
13893
13990
|
}, []);
|
|
13894
13991
|
const { delayRender: delayRender2, continueRender: continueRender2, cancelRender: cancelRender2 } = useDelayRender();
|
|
13992
|
+
const isPremounting = Boolean(sequenceContext?.premounting);
|
|
13993
|
+
const isPostmounting = Boolean(sequenceContext?.postmounting);
|
|
13895
13994
|
const didGetError = useCallback19((e) => {
|
|
13896
13995
|
if (!errors.current) {
|
|
13897
13996
|
return;
|
|
@@ -13912,8 +14011,18 @@ var ImgContent = ({
|
|
|
13912
14011
|
} catch {}
|
|
13913
14012
|
}, [cancelRender2, maxRetries, onError, retryIn]);
|
|
13914
14013
|
if (typeof window !== "undefined") {
|
|
13915
|
-
|
|
13916
|
-
|
|
14014
|
+
useLayoutEffect11(() => {
|
|
14015
|
+
if (!pauseWhenLoading || !isLoading || isPremounting || isPostmounting) {
|
|
14016
|
+
return;
|
|
14017
|
+
}
|
|
14018
|
+
return delayPlayback().unblock;
|
|
14019
|
+
}, [
|
|
14020
|
+
delayPlayback,
|
|
14021
|
+
isLoading,
|
|
14022
|
+
isPostmounting,
|
|
14023
|
+
isPremounting,
|
|
14024
|
+
pauseWhenLoading
|
|
14025
|
+
]);
|
|
13917
14026
|
useLayoutEffect11(() => {
|
|
13918
14027
|
if (window.process?.env?.NODE_ENV === "test") {
|
|
13919
14028
|
if (imageRef.current) {
|
|
@@ -13925,13 +14034,11 @@ var ImgContent = ({
|
|
|
13925
14034
|
if (!current) {
|
|
13926
14035
|
return;
|
|
13927
14036
|
}
|
|
14037
|
+
setIsLoading(true);
|
|
13928
14038
|
const newHandle = delayRender2("Loading <Img> with src=" + truncateSrcForLabel(actualSrc), {
|
|
13929
14039
|
retries: delayRenderRetries ?? undefined,
|
|
13930
14040
|
timeoutInMilliseconds: delayRenderTimeoutInMilliseconds ?? undefined
|
|
13931
14041
|
});
|
|
13932
|
-
const unblock = pauseWhenLoading && !isPremounting && !isPostmounting ? delayPlayback().unblock : () => {
|
|
13933
|
-
return;
|
|
13934
|
-
};
|
|
13935
14042
|
let unmounted = false;
|
|
13936
14043
|
const onComplete = () => {
|
|
13937
14044
|
if (unmounted) {
|
|
@@ -13945,7 +14052,7 @@ var ImgContent = ({
|
|
|
13945
14052
|
if (current) {
|
|
13946
14053
|
onImageFrame?.(current);
|
|
13947
14054
|
}
|
|
13948
|
-
|
|
14055
|
+
setIsLoading(false);
|
|
13949
14056
|
continueRender2(newHandle);
|
|
13950
14057
|
};
|
|
13951
14058
|
if (!imageRef.current) {
|
|
@@ -13964,17 +14071,12 @@ var ImgContent = ({
|
|
|
13964
14071
|
return () => {
|
|
13965
14072
|
unmounted = true;
|
|
13966
14073
|
current.removeEventListener("load", onComplete);
|
|
13967
|
-
unblock();
|
|
13968
14074
|
continueRender2(newHandle);
|
|
13969
14075
|
};
|
|
13970
14076
|
}, [
|
|
13971
14077
|
actualSrc,
|
|
13972
|
-
delayPlayback,
|
|
13973
14078
|
delayRenderRetries,
|
|
13974
14079
|
delayRenderTimeoutInMilliseconds,
|
|
13975
|
-
pauseWhenLoading,
|
|
13976
|
-
isPremounting,
|
|
13977
|
-
isPostmounting,
|
|
13978
14080
|
onImageFrame,
|
|
13979
14081
|
continueRender2,
|
|
13980
14082
|
delayRender2
|
|
@@ -14292,9 +14394,9 @@ var CompositionManagerProvider = ({
|
|
|
14292
14394
|
initialCompositions,
|
|
14293
14395
|
initialCanvasContent
|
|
14294
14396
|
}) => {
|
|
14295
|
-
const [folders, setFolders] =
|
|
14296
|
-
const [canvasContent, setCanvasContent] =
|
|
14297
|
-
const [compositions, setCompositions] =
|
|
14397
|
+
const [folders, setFolders] = useState19([]);
|
|
14398
|
+
const [canvasContent, setCanvasContent] = useState19(initialCanvasContent);
|
|
14399
|
+
const [compositions, setCompositions] = useState19(initialCompositions);
|
|
14298
14400
|
const currentcompositionsRef = useRef26(compositions);
|
|
14299
14401
|
const updateCompositions = useCallback21((updateComps) => {
|
|
14300
14402
|
setCompositions((comps) => {
|
|
@@ -14865,7 +14967,7 @@ var OffthreadVideoForRendering = ({
|
|
|
14865
14967
|
toneMapped
|
|
14866
14968
|
});
|
|
14867
14969
|
}, [toneMapped, currentTime, src, transparent]);
|
|
14868
|
-
const [imageSrc, setImageSrc] =
|
|
14970
|
+
const [imageSrc, setImageSrc] = useState20(null);
|
|
14869
14971
|
const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
|
|
14870
14972
|
useLayoutEffect12(() => {
|
|
14871
14973
|
if (!window.remotion_videoEnabled) {
|
|
@@ -15069,7 +15171,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
15069
15171
|
const parentSequence = useContext37(SequenceContext);
|
|
15070
15172
|
const logLevel = useLogLevel();
|
|
15071
15173
|
const mountTime = useMountTime();
|
|
15072
|
-
const [timelineId] =
|
|
15174
|
+
const [timelineId] = useState21(() => String(Math.random()));
|
|
15073
15175
|
if (typeof acceptableTimeShift !== "undefined") {
|
|
15074
15176
|
throw new Error("acceptableTimeShift has been removed. Use acceptableTimeShiftInSeconds instead.");
|
|
15075
15177
|
}
|
|
@@ -15140,7 +15242,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
15140
15242
|
useImperativeHandle9(ref, () => {
|
|
15141
15243
|
return videoRef.current;
|
|
15142
15244
|
}, []);
|
|
15143
|
-
|
|
15245
|
+
useState21(() => playbackLogging({
|
|
15144
15246
|
logLevel,
|
|
15145
15247
|
message: `Mounting video with source = ${actualSrc}, v=${VERSION}, user agent=${typeof navigator === "undefined" ? "server" : navigator.userAgent}`,
|
|
15146
15248
|
tag: "video",
|
|
@@ -15821,6 +15923,15 @@ var staticFile = (path) => {
|
|
|
15821
15923
|
}
|
|
15822
15924
|
return preparsed;
|
|
15823
15925
|
};
|
|
15926
|
+
var Still = (props2) => {
|
|
15927
|
+
const newProps = {
|
|
15928
|
+
...props2,
|
|
15929
|
+
durationInFrames: 1,
|
|
15930
|
+
fps: 1
|
|
15931
|
+
};
|
|
15932
|
+
return React42.createElement(Composition, newProps);
|
|
15933
|
+
};
|
|
15934
|
+
addSequenceStackTraces(Still);
|
|
15824
15935
|
var roundTo6Commas = (num) => {
|
|
15825
15936
|
return Math.round(num * 1e5) / 1e5;
|
|
15826
15937
|
};
|
|
@@ -19626,7 +19737,7 @@ var getAngle = (ref, coordinates) => {
|
|
|
19626
19737
|
};
|
|
19627
19738
|
var lastCoordinates = null;
|
|
19628
19739
|
var useMousePosition = (ref) => {
|
|
19629
|
-
const [angle, setAngle] =
|
|
19740
|
+
const [angle, setAngle] = useState23(getAngle(ref.current, lastCoordinates));
|
|
19630
19741
|
useEffect21(() => {
|
|
19631
19742
|
const element = ref.current;
|
|
19632
19743
|
if (!element) {
|