@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/templates.js
CHANGED
|
@@ -1378,7 +1378,7 @@ var getDefaultConfig = () => {
|
|
|
1378
1378
|
var twMerge = /* @__PURE__ */ createTailwindMerge(getDefaultConfig);
|
|
1379
1379
|
|
|
1380
1380
|
// ../design/dist/esm/index.mjs
|
|
1381
|
-
import React32, { useEffect as useEffect21, useMemo as useMemo42, useState as
|
|
1381
|
+
import React32, { useEffect as useEffect21, useMemo as useMemo42, useState as useState23 } from "react";
|
|
1382
1382
|
|
|
1383
1383
|
// ../paths/dist/esm/index.mjs
|
|
1384
1384
|
var cutLInstruction = ({
|
|
@@ -4330,7 +4330,13 @@ import {
|
|
|
4330
4330
|
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
4331
4331
|
import { forwardRef as forwardRef11, useCallback as useCallback18, useState as useState17 } from "react";
|
|
4332
4332
|
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
4333
|
-
import {
|
|
4333
|
+
import {
|
|
4334
|
+
useCallback as useCallback19,
|
|
4335
|
+
useContext as useContext33,
|
|
4336
|
+
useLayoutEffect as useLayoutEffect11,
|
|
4337
|
+
useRef as useRef24,
|
|
4338
|
+
useState as useState18
|
|
4339
|
+
} from "react";
|
|
4334
4340
|
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
4335
4341
|
import React29, { forwardRef as forwardRef12, useCallback as useCallback20, useRef as useRef25 } from "react";
|
|
4336
4342
|
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
@@ -4341,7 +4347,7 @@ import {
|
|
|
4341
4347
|
useImperativeHandle as useImperativeHandle8,
|
|
4342
4348
|
useMemo as useMemo32,
|
|
4343
4349
|
useRef as useRef26,
|
|
4344
|
-
useState as
|
|
4350
|
+
useState as useState19
|
|
4345
4351
|
} from "react";
|
|
4346
4352
|
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
4347
4353
|
import React31 from "react";
|
|
@@ -4359,7 +4365,7 @@ import {
|
|
|
4359
4365
|
useEffect as useEffect17,
|
|
4360
4366
|
useLayoutEffect as useLayoutEffect12,
|
|
4361
4367
|
useMemo as useMemo35,
|
|
4362
|
-
useState as
|
|
4368
|
+
useState as useState20
|
|
4363
4369
|
} from "react";
|
|
4364
4370
|
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
4365
4371
|
import React37, {
|
|
@@ -4370,7 +4376,7 @@ import React37, {
|
|
|
4370
4376
|
useImperativeHandle as useImperativeHandle9,
|
|
4371
4377
|
useMemo as useMemo36,
|
|
4372
4378
|
useRef as useRef27,
|
|
4373
|
-
useState as
|
|
4379
|
+
useState as useState21
|
|
4374
4380
|
} from "react";
|
|
4375
4381
|
import { useEffect as useEffect18 } from "react";
|
|
4376
4382
|
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
@@ -5565,7 +5571,7 @@ var getComponentsToAddStacksTo = () => componentsToAddStacksTo;
|
|
|
5565
5571
|
var addSequenceStackTraces = (component) => {
|
|
5566
5572
|
componentsToAddStacksTo.push(component);
|
|
5567
5573
|
};
|
|
5568
|
-
var VERSION = "4.0.
|
|
5574
|
+
var VERSION = "4.0.488";
|
|
5569
5575
|
var checkMultipleRemotionVersions = () => {
|
|
5570
5576
|
if (typeof globalThis === "undefined") {
|
|
5571
5577
|
return;
|
|
@@ -9249,7 +9255,7 @@ var useEffectChainState = () => {
|
|
|
9249
9255
|
}
|
|
9250
9256
|
}), []);
|
|
9251
9257
|
};
|
|
9252
|
-
var CanvasRefForwardingFunction = ({ width, height, fit, className, style, effects }, ref) => {
|
|
9258
|
+
var CanvasRefForwardingFunction = ({ width, height, fit, className, style, effects, ...props }, ref) => {
|
|
9253
9259
|
const canvasRef = useRef8(null);
|
|
9254
9260
|
const chainState = useEffectChainState();
|
|
9255
9261
|
const sourceCanvas = useMemo16(() => {
|
|
@@ -9313,7 +9319,8 @@ var CanvasRefForwardingFunction = ({ width, height, fit, className, style, effec
|
|
|
9313
9319
|
return /* @__PURE__ */ jsx13("canvas", {
|
|
9314
9320
|
ref: canvasRef,
|
|
9315
9321
|
className,
|
|
9316
|
-
style
|
|
9322
|
+
style,
|
|
9323
|
+
...props
|
|
9317
9324
|
});
|
|
9318
9325
|
};
|
|
9319
9326
|
var Canvas = React15.forwardRef(CanvasRefForwardingFunction);
|
|
@@ -9490,6 +9497,16 @@ var animatedImageSchema = {
|
|
|
9490
9497
|
},
|
|
9491
9498
|
...transformSchema
|
|
9492
9499
|
};
|
|
9500
|
+
var getCanvasPropsFromSequenceProps = (props) => {
|
|
9501
|
+
const canvasProps = {};
|
|
9502
|
+
const mutableCanvasProps = canvasProps;
|
|
9503
|
+
for (const key in props) {
|
|
9504
|
+
if (Object.prototype.hasOwnProperty.call(props, key) && (key.startsWith("data-") || key.startsWith("aria-"))) {
|
|
9505
|
+
mutableCanvasProps[key] = props[key];
|
|
9506
|
+
}
|
|
9507
|
+
}
|
|
9508
|
+
return canvasProps;
|
|
9509
|
+
};
|
|
9493
9510
|
var AnimatedImageContent = forwardRef4(({
|
|
9494
9511
|
src,
|
|
9495
9512
|
width,
|
|
@@ -9644,6 +9661,7 @@ var AnimatedImageInner = ({
|
|
|
9644
9661
|
useImperativeHandle2(ref, () => {
|
|
9645
9662
|
return actualRef.current;
|
|
9646
9663
|
}, []);
|
|
9664
|
+
const canvasProps = getCanvasPropsFromSequenceProps(sequenceProps);
|
|
9647
9665
|
const animatedImageProps = {
|
|
9648
9666
|
src,
|
|
9649
9667
|
width,
|
|
@@ -9655,7 +9673,8 @@ var AnimatedImageInner = ({
|
|
|
9655
9673
|
id,
|
|
9656
9674
|
className,
|
|
9657
9675
|
style,
|
|
9658
|
-
requestInit
|
|
9676
|
+
requestInit,
|
|
9677
|
+
...canvasProps
|
|
9659
9678
|
};
|
|
9660
9679
|
return /* @__PURE__ */ jsx14(Sequence, {
|
|
9661
9680
|
layout: "none",
|
|
@@ -10592,6 +10611,7 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled, pr
|
|
|
10592
10611
|
return ({
|
|
10593
10612
|
node,
|
|
10594
10613
|
mediaTimestamp,
|
|
10614
|
+
sourceOffset,
|
|
10595
10615
|
scheduledTime,
|
|
10596
10616
|
duration,
|
|
10597
10617
|
offset,
|
|
@@ -10620,7 +10640,7 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled, pr
|
|
|
10620
10640
|
}
|
|
10621
10641
|
}
|
|
10622
10642
|
const scheduledEndTime = scheduledTime + duration / node.playbackRate.value;
|
|
10623
|
-
const mediaTime = mediaTimestamp + offset;
|
|
10643
|
+
const mediaTime = mediaTimestamp + offset - sourceOffset;
|
|
10624
10644
|
const mediaEndTime = mediaTime + duration;
|
|
10625
10645
|
const latency = ctxAndGain.audioContext.baseLatency + ctxAndGain.audioContext.outputLatency;
|
|
10626
10646
|
const timeDiff = scheduledTime - ctxAndGain.audioContext.currentTime;
|
|
@@ -11435,7 +11455,8 @@ var useBufferManager = (logLevel, mountTime) => {
|
|
|
11435
11455
|
if (rendering) {
|
|
11436
11456
|
return;
|
|
11437
11457
|
}
|
|
11438
|
-
if (blocks.length > 0) {
|
|
11458
|
+
if (blocks.length > 0 && !buffering.current) {
|
|
11459
|
+
buffering.current = true;
|
|
11439
11460
|
onBufferingCallbacks.forEach((c2) => c2());
|
|
11440
11461
|
playbackLogging({
|
|
11441
11462
|
logLevel,
|
|
@@ -11450,7 +11471,8 @@ var useBufferManager = (logLevel, mountTime) => {
|
|
|
11450
11471
|
if (rendering) {
|
|
11451
11472
|
return;
|
|
11452
11473
|
}
|
|
11453
|
-
if (blocks.length === 0) {
|
|
11474
|
+
if (blocks.length === 0 && buffering.current) {
|
|
11475
|
+
buffering.current = false;
|
|
11454
11476
|
onResumeCallbacks.forEach((c2) => c2());
|
|
11455
11477
|
playbackLogging({
|
|
11456
11478
|
logLevel,
|
|
@@ -11483,15 +11505,11 @@ var useIsPlayerBuffering = (bufferManager) => {
|
|
|
11483
11505
|
const onResume = () => {
|
|
11484
11506
|
setIsBuffering(false);
|
|
11485
11507
|
};
|
|
11486
|
-
bufferManager.listenForBuffering(onBuffer);
|
|
11487
|
-
bufferManager.listenForResume(onResume);
|
|
11508
|
+
const buffer = bufferManager.listenForBuffering(onBuffer);
|
|
11509
|
+
const resume = bufferManager.listenForResume(onResume);
|
|
11488
11510
|
return () => {
|
|
11489
|
-
|
|
11490
|
-
|
|
11491
|
-
});
|
|
11492
|
-
bufferManager.listenForResume(() => {
|
|
11493
|
-
return;
|
|
11494
|
-
});
|
|
11511
|
+
buffer.remove();
|
|
11512
|
+
resume.remove();
|
|
11495
11513
|
};
|
|
11496
11514
|
}, [bufferManager]);
|
|
11497
11515
|
return isBuffering;
|
|
@@ -11615,6 +11633,72 @@ var useBufferUntilFirstFrame = ({
|
|
|
11615
11633
|
};
|
|
11616
11634
|
}, [bufferUntilFirstFrame]);
|
|
11617
11635
|
};
|
|
11636
|
+
var getMediaSyncAction = (input) => {
|
|
11637
|
+
const {
|
|
11638
|
+
duration,
|
|
11639
|
+
currentTime,
|
|
11640
|
+
paused,
|
|
11641
|
+
ended,
|
|
11642
|
+
desiredUnclampedTime,
|
|
11643
|
+
mediaTagTime,
|
|
11644
|
+
mediaTagLastUpdate,
|
|
11645
|
+
rvcTime,
|
|
11646
|
+
rvcLastUpdate,
|
|
11647
|
+
isVariableFpsVideo,
|
|
11648
|
+
acceptableTimeShift,
|
|
11649
|
+
lastSeekDueToShift,
|
|
11650
|
+
playing,
|
|
11651
|
+
playbackRate,
|
|
11652
|
+
mediaTagBufferingOrStalled,
|
|
11653
|
+
playerBuffering,
|
|
11654
|
+
absoluteFrame,
|
|
11655
|
+
onlyWarnForMediaSeekingError,
|
|
11656
|
+
isPremounting,
|
|
11657
|
+
isPostmounting,
|
|
11658
|
+
pauseWhenBuffering
|
|
11659
|
+
} = input;
|
|
11660
|
+
const shouldBeTime = !Number.isNaN(duration) && Number.isFinite(duration) ? Math.min(duration, desiredUnclampedTime) : desiredUnclampedTime;
|
|
11661
|
+
const timeShiftMediaTag = Math.abs(shouldBeTime - mediaTagTime);
|
|
11662
|
+
const timeShiftRvcTag = rvcTime ? Math.abs(shouldBeTime - rvcTime) : null;
|
|
11663
|
+
const mostRecentTimeshift = rvcLastUpdate && rvcTime > mediaTagLastUpdate ? timeShiftRvcTag : timeShiftMediaTag;
|
|
11664
|
+
const timeShift = timeShiftRvcTag && !isVariableFpsVideo ? mostRecentTimeshift : timeShiftMediaTag;
|
|
11665
|
+
if (timeShift > acceptableTimeShift && lastSeekDueToShift !== shouldBeTime) {
|
|
11666
|
+
return {
|
|
11667
|
+
type: "seek-due-to-shift",
|
|
11668
|
+
shouldBeTime,
|
|
11669
|
+
why: `because time shift is too big. shouldBeTime = ${shouldBeTime}, isTime = ${mediaTagTime}, requestVideoCallbackTime = ${rvcTime}, timeShift = ${timeShift}${isVariableFpsVideo ? ", isVariableFpsVideo = true" : ""}, isPremounting = ${isPremounting}, isPostmounting = ${isPostmounting}, pauseWhenBuffering = ${pauseWhenBuffering}`,
|
|
11670
|
+
bufferUntilFirstFrame: playing && playbackRate > 0,
|
|
11671
|
+
playReason: playing && paused ? "player is playing but media tag is paused, and just seeked" : null,
|
|
11672
|
+
warnAboutNonSeekable: !onlyWarnForMediaSeekingError
|
|
11673
|
+
};
|
|
11674
|
+
}
|
|
11675
|
+
const seekThreshold = playing ? 0.15 : 0.01;
|
|
11676
|
+
const makesSenseToSeek = Math.abs(currentTime - shouldBeTime) > seekThreshold;
|
|
11677
|
+
const isSomethingElseBuffering = playerBuffering && !mediaTagBufferingOrStalled;
|
|
11678
|
+
if (!playing || isSomethingElseBuffering) {
|
|
11679
|
+
return {
|
|
11680
|
+
type: "seek-if-not-playing",
|
|
11681
|
+
shouldBeTime,
|
|
11682
|
+
why: makesSenseToSeek ? `not playing or something else is buffering. time offset is over seek threshold (${seekThreshold})` : null
|
|
11683
|
+
};
|
|
11684
|
+
}
|
|
11685
|
+
if (!playing || playerBuffering) {
|
|
11686
|
+
return { type: "none" };
|
|
11687
|
+
}
|
|
11688
|
+
const pausedCondition = paused && !ended;
|
|
11689
|
+
const firstFrameCondition = absoluteFrame === 0;
|
|
11690
|
+
if (pausedCondition || firstFrameCondition) {
|
|
11691
|
+
const reason = pausedCondition ? "media tag is paused" : "absolute frame is 0";
|
|
11692
|
+
return {
|
|
11693
|
+
type: "play-and-seek",
|
|
11694
|
+
shouldBeTime,
|
|
11695
|
+
why: makesSenseToSeek ? `is over timeshift threshold (threshold = ${seekThreshold}) and ${reason}` : null,
|
|
11696
|
+
playReason: `player is playing and ${reason}`,
|
|
11697
|
+
bufferUntilFirstFrame: !isVariableFpsVideo && playbackRate > 0
|
|
11698
|
+
};
|
|
11699
|
+
}
|
|
11700
|
+
return { type: "none" };
|
|
11701
|
+
};
|
|
11618
11702
|
var useCurrentTimeOfMediaTagWithUpdateTimeStamp = (mediaRef) => {
|
|
11619
11703
|
const lastUpdate = React21.useRef({
|
|
11620
11704
|
time: mediaRef.current?.currentTime ?? 0,
|
|
@@ -12034,89 +12118,93 @@ var useMediaPlayback = ({
|
|
|
12034
12118
|
if (!src) {
|
|
12035
12119
|
throw new Error(`No 'src' attribute was passed to the ${tagName} element.`);
|
|
12036
12120
|
}
|
|
12037
|
-
const {
|
|
12038
|
-
const
|
|
12039
|
-
|
|
12040
|
-
|
|
12041
|
-
|
|
12042
|
-
|
|
12043
|
-
|
|
12044
|
-
|
|
12045
|
-
|
|
12046
|
-
|
|
12121
|
+
const { current } = mediaRef;
|
|
12122
|
+
const action = getMediaSyncAction({
|
|
12123
|
+
duration: current.duration,
|
|
12124
|
+
currentTime: current.currentTime,
|
|
12125
|
+
paused: current.paused,
|
|
12126
|
+
ended: current.ended,
|
|
12127
|
+
desiredUnclampedTime,
|
|
12128
|
+
mediaTagTime: mediaTagCurrentTime.current.time,
|
|
12129
|
+
mediaTagLastUpdate: mediaTagCurrentTime.current.lastUpdate,
|
|
12130
|
+
rvcTime: rvcCurrentTime.current?.time ?? null,
|
|
12131
|
+
rvcLastUpdate: rvcCurrentTime.current?.lastUpdate ?? null,
|
|
12132
|
+
isVariableFpsVideo: Boolean(isVariableFpsVideoMap.current[src]),
|
|
12133
|
+
acceptableTimeShift: acceptableTimeShiftButLessThanDuration,
|
|
12134
|
+
lastSeekDueToShift: lastSeekDueToShift.current,
|
|
12135
|
+
playing,
|
|
12136
|
+
playbackRate,
|
|
12137
|
+
mediaTagBufferingOrStalled: isMediaTagBuffering || isBuffering(),
|
|
12138
|
+
playerBuffering: buffering.buffering.current,
|
|
12139
|
+
absoluteFrame,
|
|
12140
|
+
onlyWarnForMediaSeekingError,
|
|
12141
|
+
isPremounting,
|
|
12142
|
+
isPostmounting,
|
|
12143
|
+
pauseWhenBuffering
|
|
12144
|
+
});
|
|
12145
|
+
if (action.type === "none") {
|
|
12146
|
+
return;
|
|
12147
|
+
}
|
|
12148
|
+
if (action.type === "seek-due-to-shift") {
|
|
12047
12149
|
lastSeek.current = seek({
|
|
12048
|
-
mediaRef:
|
|
12049
|
-
time: shouldBeTime,
|
|
12150
|
+
mediaRef: current,
|
|
12151
|
+
time: action.shouldBeTime,
|
|
12050
12152
|
logLevel,
|
|
12051
|
-
why:
|
|
12153
|
+
why: action.why,
|
|
12052
12154
|
mountTime
|
|
12053
12155
|
});
|
|
12054
12156
|
lastSeekDueToShift.current = lastSeek.current;
|
|
12055
|
-
if (
|
|
12056
|
-
|
|
12057
|
-
bufferUntilFirstFrame(shouldBeTime);
|
|
12058
|
-
}
|
|
12059
|
-
if (mediaRef.current.paused) {
|
|
12060
|
-
playAndHandleNotAllowedError({
|
|
12061
|
-
mediaRef,
|
|
12062
|
-
mediaType,
|
|
12063
|
-
onAutoPlayError,
|
|
12064
|
-
logLevel,
|
|
12065
|
-
mountTime,
|
|
12066
|
-
reason: "player is playing but media tag is paused, and just seeked",
|
|
12067
|
-
isPlayer: env.isPlayer
|
|
12068
|
-
});
|
|
12069
|
-
}
|
|
12157
|
+
if (action.bufferUntilFirstFrame) {
|
|
12158
|
+
bufferUntilFirstFrame(action.shouldBeTime);
|
|
12070
12159
|
}
|
|
12071
|
-
if (
|
|
12072
|
-
|
|
12073
|
-
|
|
12074
|
-
|
|
12075
|
-
|
|
12076
|
-
const seekThreshold = playing ? 0.15 : 0.01;
|
|
12077
|
-
const makesSenseToSeek = Math.abs(mediaRef.current.currentTime - shouldBeTime) > seekThreshold;
|
|
12078
|
-
const isMediaTagBufferingOrStalled = isMediaTagBuffering || isBuffering();
|
|
12079
|
-
const isSomethingElseBuffering = buffering.buffering.current && !isMediaTagBufferingOrStalled;
|
|
12080
|
-
if (!playing || isSomethingElseBuffering) {
|
|
12081
|
-
if (makesSenseToSeek) {
|
|
12082
|
-
lastSeek.current = seek({
|
|
12083
|
-
mediaRef: mediaRef.current,
|
|
12084
|
-
time: shouldBeTime,
|
|
12160
|
+
if (action.playReason !== null) {
|
|
12161
|
+
playAndHandleNotAllowedError({
|
|
12162
|
+
mediaRef,
|
|
12163
|
+
mediaType,
|
|
12164
|
+
onAutoPlayError,
|
|
12085
12165
|
logLevel,
|
|
12086
|
-
|
|
12087
|
-
|
|
12166
|
+
mountTime,
|
|
12167
|
+
reason: action.playReason,
|
|
12168
|
+
isPlayer: env.isPlayer
|
|
12088
12169
|
});
|
|
12089
12170
|
}
|
|
12171
|
+
if (action.warnAboutNonSeekable) {
|
|
12172
|
+
warnAboutNonSeekableMedia(current, "console-error");
|
|
12173
|
+
}
|
|
12090
12174
|
return;
|
|
12091
12175
|
}
|
|
12092
|
-
if (
|
|
12093
|
-
|
|
12094
|
-
}
|
|
12095
|
-
const pausedCondition = mediaRef.current.paused && !mediaRef.current.ended;
|
|
12096
|
-
const firstFrameCondition = absoluteFrame === 0;
|
|
12097
|
-
if (pausedCondition || firstFrameCondition) {
|
|
12098
|
-
const reason = pausedCondition ? "media tag is paused" : "absolute frame is 0";
|
|
12099
|
-
if (makesSenseToSeek) {
|
|
12176
|
+
if (action.type === "seek-if-not-playing") {
|
|
12177
|
+
if (action.why !== null) {
|
|
12100
12178
|
lastSeek.current = seek({
|
|
12101
|
-
mediaRef:
|
|
12102
|
-
time: shouldBeTime,
|
|
12179
|
+
mediaRef: current,
|
|
12180
|
+
time: action.shouldBeTime,
|
|
12103
12181
|
logLevel,
|
|
12104
|
-
why:
|
|
12182
|
+
why: action.why,
|
|
12105
12183
|
mountTime
|
|
12106
12184
|
});
|
|
12107
12185
|
}
|
|
12108
|
-
|
|
12109
|
-
|
|
12110
|
-
|
|
12111
|
-
|
|
12186
|
+
return;
|
|
12187
|
+
}
|
|
12188
|
+
if (action.why !== null) {
|
|
12189
|
+
lastSeek.current = seek({
|
|
12190
|
+
mediaRef: current,
|
|
12191
|
+
time: action.shouldBeTime,
|
|
12112
12192
|
logLevel,
|
|
12113
|
-
|
|
12114
|
-
|
|
12115
|
-
isPlayer: env.isPlayer
|
|
12193
|
+
why: action.why,
|
|
12194
|
+
mountTime
|
|
12116
12195
|
});
|
|
12117
|
-
|
|
12118
|
-
|
|
12119
|
-
|
|
12196
|
+
}
|
|
12197
|
+
playAndHandleNotAllowedError({
|
|
12198
|
+
mediaRef,
|
|
12199
|
+
mediaType,
|
|
12200
|
+
onAutoPlayError,
|
|
12201
|
+
logLevel,
|
|
12202
|
+
mountTime,
|
|
12203
|
+
reason: action.playReason,
|
|
12204
|
+
isPlayer: env.isPlayer
|
|
12205
|
+
});
|
|
12206
|
+
if (action.bufferUntilFirstFrame) {
|
|
12207
|
+
bufferUntilFirstFrame(action.shouldBeTime);
|
|
12120
12208
|
}
|
|
12121
12209
|
}, [
|
|
12122
12210
|
absoluteFrame,
|
|
@@ -13349,13 +13437,18 @@ var CanvasImageContent = forwardRef10(({
|
|
|
13349
13437
|
});
|
|
13350
13438
|
const sequenceContext = useContext32(SequenceContext);
|
|
13351
13439
|
const pendingLoadDelayRef = useRef23(null);
|
|
13352
|
-
const
|
|
13440
|
+
const [isLoadPending, setIsLoadPending] = useState16(false);
|
|
13441
|
+
const isPremounting = Boolean(sequenceContext?.premounting);
|
|
13442
|
+
const isPostmounting = Boolean(sequenceContext?.postmounting);
|
|
13443
|
+
const continuePendingLoadDelay = useCallback17(({ markAsReady }) => {
|
|
13353
13444
|
const pending = pendingLoadDelayRef.current;
|
|
13354
13445
|
if (!pending || pending.continued) {
|
|
13355
13446
|
return;
|
|
13356
13447
|
}
|
|
13357
13448
|
pending.continued = true;
|
|
13358
|
-
|
|
13449
|
+
if (markAsReady) {
|
|
13450
|
+
setIsLoadPending(false);
|
|
13451
|
+
}
|
|
13359
13452
|
continueRender2(pending.handle);
|
|
13360
13453
|
pendingLoadDelayRef.current = null;
|
|
13361
13454
|
}, [continueRender2]);
|
|
@@ -13377,23 +13470,30 @@ var CanvasImageContent = forwardRef10(({
|
|
|
13377
13470
|
}
|
|
13378
13471
|
}, [ref, refForOutline]);
|
|
13379
13472
|
useLayoutEffect10(() => {
|
|
13380
|
-
|
|
13381
|
-
|
|
13473
|
+
if (!pauseWhenLoading || !isLoadPending || isPremounting || isPostmounting) {
|
|
13474
|
+
return;
|
|
13475
|
+
}
|
|
13476
|
+
return delayPlayback().unblock;
|
|
13477
|
+
}, [
|
|
13478
|
+
delayPlayback,
|
|
13479
|
+
isLoadPending,
|
|
13480
|
+
isPostmounting,
|
|
13481
|
+
isPremounting,
|
|
13482
|
+
pauseWhenLoading
|
|
13483
|
+
]);
|
|
13484
|
+
useLayoutEffect10(() => {
|
|
13382
13485
|
const handle = delayRender2(`Rendering <CanvasImage> with src="${truncateSrcForLabel(actualSrc)}"`, {
|
|
13383
13486
|
retries: delayRenderRetries ?? undefined,
|
|
13384
13487
|
timeoutInMilliseconds: delayRenderTimeoutInMilliseconds ?? undefined
|
|
13385
13488
|
});
|
|
13386
|
-
const unblock = pauseWhenLoading && !isPremounting && !isPostmounting ? delayPlayback().unblock : () => {
|
|
13387
|
-
return;
|
|
13388
|
-
};
|
|
13389
13489
|
const controller = new AbortController;
|
|
13390
13490
|
let cancelled = false;
|
|
13391
13491
|
let errorCount = 0;
|
|
13392
13492
|
let timeoutId = null;
|
|
13393
13493
|
setLoadedImage(null);
|
|
13494
|
+
setIsLoadPending(true);
|
|
13394
13495
|
pendingLoadDelayRef.current = {
|
|
13395
13496
|
handle,
|
|
13396
|
-
unblock,
|
|
13397
13497
|
continued: false
|
|
13398
13498
|
};
|
|
13399
13499
|
const attemptLoad = () => {
|
|
@@ -13404,7 +13504,7 @@ var CanvasImageContent = forwardRef10(({
|
|
|
13404
13504
|
setLoadedImage(image);
|
|
13405
13505
|
}).catch((err) => {
|
|
13406
13506
|
if (err.name === "AbortError") {
|
|
13407
|
-
continuePendingLoadDelay();
|
|
13507
|
+
continuePendingLoadDelay({ markAsReady: false });
|
|
13408
13508
|
return;
|
|
13409
13509
|
}
|
|
13410
13510
|
errorCount++;
|
|
@@ -13418,7 +13518,7 @@ var CanvasImageContent = forwardRef10(({
|
|
|
13418
13518
|
}, backoff);
|
|
13419
13519
|
} else if (onError) {
|
|
13420
13520
|
onError(err);
|
|
13421
|
-
continuePendingLoadDelay();
|
|
13521
|
+
continuePendingLoadDelay({ markAsReady: true });
|
|
13422
13522
|
} else {
|
|
13423
13523
|
cancelRender2(err);
|
|
13424
13524
|
}
|
|
@@ -13431,21 +13531,17 @@ var CanvasImageContent = forwardRef10(({
|
|
|
13431
13531
|
clearTimeout(timeoutId);
|
|
13432
13532
|
}
|
|
13433
13533
|
controller.abort();
|
|
13434
|
-
continuePendingLoadDelay();
|
|
13534
|
+
continuePendingLoadDelay({ markAsReady: false });
|
|
13435
13535
|
};
|
|
13436
13536
|
}, [
|
|
13437
13537
|
actualSrc,
|
|
13438
13538
|
cancelRender2,
|
|
13439
13539
|
continuePendingLoadDelay,
|
|
13440
|
-
delayPlayback,
|
|
13441
13540
|
delayRender2,
|
|
13442
13541
|
delayRenderRetries,
|
|
13443
13542
|
delayRenderTimeoutInMilliseconds,
|
|
13444
13543
|
maxRetries,
|
|
13445
|
-
onError
|
|
13446
|
-
pauseWhenLoading,
|
|
13447
|
-
sequenceContext?.postmounting,
|
|
13448
|
-
sequenceContext?.premounting
|
|
13544
|
+
onError
|
|
13449
13545
|
]);
|
|
13450
13546
|
useLayoutEffect10(() => {
|
|
13451
13547
|
if (!loadedImage || !outputCanvas || !sourceCanvas) {
|
|
@@ -13497,7 +13593,7 @@ var CanvasImageContent = forwardRef10(({
|
|
|
13497
13593
|
return;
|
|
13498
13594
|
}
|
|
13499
13595
|
continueRenderOnce();
|
|
13500
|
-
continuePendingLoadDelay();
|
|
13596
|
+
continuePendingLoadDelay({ markAsReady: true });
|
|
13501
13597
|
}
|
|
13502
13598
|
});
|
|
13503
13599
|
}
|
|
@@ -13508,7 +13604,7 @@ var CanvasImageContent = forwardRef10(({
|
|
|
13508
13604
|
if (onError) {
|
|
13509
13605
|
onError(err);
|
|
13510
13606
|
continueRenderOnce();
|
|
13511
|
-
continuePendingLoadDelay();
|
|
13607
|
+
continuePendingLoadDelay({ markAsReady: true });
|
|
13512
13608
|
} else {
|
|
13513
13609
|
cancelRender2(err);
|
|
13514
13610
|
}
|
|
@@ -13679,6 +13775,7 @@ var ImgContent = ({
|
|
|
13679
13775
|
const errors = useRef24({});
|
|
13680
13776
|
const { delayPlayback } = useBufferState();
|
|
13681
13777
|
const sequenceContext = useContext33(SequenceContext);
|
|
13778
|
+
const [isLoading, setIsLoading] = useState18(false);
|
|
13682
13779
|
const _propsValid = true;
|
|
13683
13780
|
if (!_propsValid) {
|
|
13684
13781
|
throw new Error("typecheck error");
|
|
@@ -13711,6 +13808,8 @@ var ImgContent = ({
|
|
|
13711
13808
|
}, timeout);
|
|
13712
13809
|
}, []);
|
|
13713
13810
|
const { delayRender: delayRender2, continueRender: continueRender2, cancelRender: cancelRender2 } = useDelayRender();
|
|
13811
|
+
const isPremounting = Boolean(sequenceContext?.premounting);
|
|
13812
|
+
const isPostmounting = Boolean(sequenceContext?.postmounting);
|
|
13714
13813
|
const didGetError = useCallback19((e) => {
|
|
13715
13814
|
if (!errors.current) {
|
|
13716
13815
|
return;
|
|
@@ -13731,8 +13830,18 @@ var ImgContent = ({
|
|
|
13731
13830
|
} catch {}
|
|
13732
13831
|
}, [cancelRender2, maxRetries, onError, retryIn]);
|
|
13733
13832
|
if (typeof window !== "undefined") {
|
|
13734
|
-
|
|
13735
|
-
|
|
13833
|
+
useLayoutEffect11(() => {
|
|
13834
|
+
if (!pauseWhenLoading || !isLoading || isPremounting || isPostmounting) {
|
|
13835
|
+
return;
|
|
13836
|
+
}
|
|
13837
|
+
return delayPlayback().unblock;
|
|
13838
|
+
}, [
|
|
13839
|
+
delayPlayback,
|
|
13840
|
+
isLoading,
|
|
13841
|
+
isPostmounting,
|
|
13842
|
+
isPremounting,
|
|
13843
|
+
pauseWhenLoading
|
|
13844
|
+
]);
|
|
13736
13845
|
useLayoutEffect11(() => {
|
|
13737
13846
|
if (window.process?.env?.NODE_ENV === "test") {
|
|
13738
13847
|
if (imageRef.current) {
|
|
@@ -13744,13 +13853,11 @@ var ImgContent = ({
|
|
|
13744
13853
|
if (!current) {
|
|
13745
13854
|
return;
|
|
13746
13855
|
}
|
|
13856
|
+
setIsLoading(true);
|
|
13747
13857
|
const newHandle = delayRender2("Loading <Img> with src=" + truncateSrcForLabel(actualSrc), {
|
|
13748
13858
|
retries: delayRenderRetries ?? undefined,
|
|
13749
13859
|
timeoutInMilliseconds: delayRenderTimeoutInMilliseconds ?? undefined
|
|
13750
13860
|
});
|
|
13751
|
-
const unblock = pauseWhenLoading && !isPremounting && !isPostmounting ? delayPlayback().unblock : () => {
|
|
13752
|
-
return;
|
|
13753
|
-
};
|
|
13754
13861
|
let unmounted = false;
|
|
13755
13862
|
const onComplete = () => {
|
|
13756
13863
|
if (unmounted) {
|
|
@@ -13764,7 +13871,7 @@ var ImgContent = ({
|
|
|
13764
13871
|
if (current) {
|
|
13765
13872
|
onImageFrame?.(current);
|
|
13766
13873
|
}
|
|
13767
|
-
|
|
13874
|
+
setIsLoading(false);
|
|
13768
13875
|
continueRender2(newHandle);
|
|
13769
13876
|
};
|
|
13770
13877
|
if (!imageRef.current) {
|
|
@@ -13783,17 +13890,12 @@ var ImgContent = ({
|
|
|
13783
13890
|
return () => {
|
|
13784
13891
|
unmounted = true;
|
|
13785
13892
|
current.removeEventListener("load", onComplete);
|
|
13786
|
-
unblock();
|
|
13787
13893
|
continueRender2(newHandle);
|
|
13788
13894
|
};
|
|
13789
13895
|
}, [
|
|
13790
13896
|
actualSrc,
|
|
13791
|
-
delayPlayback,
|
|
13792
13897
|
delayRenderRetries,
|
|
13793
13898
|
delayRenderTimeoutInMilliseconds,
|
|
13794
|
-
pauseWhenLoading,
|
|
13795
|
-
isPremounting,
|
|
13796
|
-
isPostmounting,
|
|
13797
13899
|
onImageFrame,
|
|
13798
13900
|
continueRender2,
|
|
13799
13901
|
delayRender2
|
|
@@ -14111,9 +14213,9 @@ var CompositionManagerProvider = ({
|
|
|
14111
14213
|
initialCompositions,
|
|
14112
14214
|
initialCanvasContent
|
|
14113
14215
|
}) => {
|
|
14114
|
-
const [folders, setFolders] =
|
|
14115
|
-
const [canvasContent, setCanvasContent] =
|
|
14116
|
-
const [compositions, setCompositions] =
|
|
14216
|
+
const [folders, setFolders] = useState19([]);
|
|
14217
|
+
const [canvasContent, setCanvasContent] = useState19(initialCanvasContent);
|
|
14218
|
+
const [compositions, setCompositions] = useState19(initialCompositions);
|
|
14117
14219
|
const currentcompositionsRef = useRef26(compositions);
|
|
14118
14220
|
const updateCompositions = useCallback21((updateComps) => {
|
|
14119
14221
|
setCompositions((comps) => {
|
|
@@ -14684,7 +14786,7 @@ var OffthreadVideoForRendering = ({
|
|
|
14684
14786
|
toneMapped
|
|
14685
14787
|
});
|
|
14686
14788
|
}, [toneMapped, currentTime, src, transparent]);
|
|
14687
|
-
const [imageSrc, setImageSrc] =
|
|
14789
|
+
const [imageSrc, setImageSrc] = useState20(null);
|
|
14688
14790
|
const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
|
|
14689
14791
|
useLayoutEffect12(() => {
|
|
14690
14792
|
if (!window.remotion_videoEnabled) {
|
|
@@ -14888,7 +14990,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
14888
14990
|
const parentSequence = useContext37(SequenceContext);
|
|
14889
14991
|
const logLevel = useLogLevel();
|
|
14890
14992
|
const mountTime = useMountTime();
|
|
14891
|
-
const [timelineId] =
|
|
14993
|
+
const [timelineId] = useState21(() => String(Math.random()));
|
|
14892
14994
|
if (typeof acceptableTimeShift !== "undefined") {
|
|
14893
14995
|
throw new Error("acceptableTimeShift has been removed. Use acceptableTimeShiftInSeconds instead.");
|
|
14894
14996
|
}
|
|
@@ -14959,7 +15061,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
14959
15061
|
useImperativeHandle9(ref, () => {
|
|
14960
15062
|
return videoRef.current;
|
|
14961
15063
|
}, []);
|
|
14962
|
-
|
|
15064
|
+
useState21(() => playbackLogging({
|
|
14963
15065
|
logLevel,
|
|
14964
15066
|
message: `Mounting video with source = ${actualSrc}, v=${VERSION}, user agent=${typeof navigator === "undefined" ? "server" : navigator.userAgent}`,
|
|
14965
15067
|
tag: "video",
|
|
@@ -15640,6 +15742,15 @@ var staticFile = (path) => {
|
|
|
15640
15742
|
}
|
|
15641
15743
|
return preparsed;
|
|
15642
15744
|
};
|
|
15745
|
+
var Still = (props2) => {
|
|
15746
|
+
const newProps = {
|
|
15747
|
+
...props2,
|
|
15748
|
+
durationInFrames: 1,
|
|
15749
|
+
fps: 1
|
|
15750
|
+
};
|
|
15751
|
+
return React42.createElement(Composition, newProps);
|
|
15752
|
+
};
|
|
15753
|
+
addSequenceStackTraces(Still);
|
|
15643
15754
|
var roundTo6Commas = (num) => {
|
|
15644
15755
|
return Math.round(num * 1e5) / 1e5;
|
|
15645
15756
|
};
|
|
@@ -19445,7 +19556,7 @@ var getAngle = (ref, coordinates) => {
|
|
|
19445
19556
|
};
|
|
19446
19557
|
var lastCoordinates = null;
|
|
19447
19558
|
var useMousePosition = (ref) => {
|
|
19448
|
-
const [angle, setAngle] =
|
|
19559
|
+
const [angle, setAngle] = useState23(getAngle(ref.current, lastCoordinates));
|
|
19449
19560
|
useEffect21(() => {
|
|
19450
19561
|
const element = ref.current;
|
|
19451
19562
|
if (!element) {
|