@remotion/promo-pages 4.0.486 → 4.0.487
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 +903 -2076
- package/dist/design.js +153 -76
- package/dist/experts.js +153 -76
- package/dist/homepage/Pricing.js +176 -83
- package/dist/prompts/PromptsGallery.js +153 -76
- package/dist/prompts/PromptsShow.js +153 -76
- package/dist/prompts/PromptsSubmit.js +153 -76
- package/dist/tailwind.css +21 -3
- package/dist/team.js +153 -76
- package/dist/template-modal-content.css +1 -1
- package/dist/template-modal-content.js +153 -76
- package/dist/templates.js +153 -76
- 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/homepage/Pricing.js
CHANGED
|
@@ -5568,7 +5568,7 @@ var getComponentsToAddStacksTo = () => componentsToAddStacksTo;
|
|
|
5568
5568
|
var addSequenceStackTraces = (component) => {
|
|
5569
5569
|
componentsToAddStacksTo.push(component);
|
|
5570
5570
|
};
|
|
5571
|
-
var VERSION = "4.0.
|
|
5571
|
+
var VERSION = "4.0.487";
|
|
5572
5572
|
var checkMultipleRemotionVersions = () => {
|
|
5573
5573
|
if (typeof globalThis === "undefined") {
|
|
5574
5574
|
return;
|
|
@@ -11438,7 +11438,8 @@ var useBufferManager = (logLevel, mountTime) => {
|
|
|
11438
11438
|
if (rendering) {
|
|
11439
11439
|
return;
|
|
11440
11440
|
}
|
|
11441
|
-
if (blocks.length > 0) {
|
|
11441
|
+
if (blocks.length > 0 && !buffering.current) {
|
|
11442
|
+
buffering.current = true;
|
|
11442
11443
|
onBufferingCallbacks.forEach((c2) => c2());
|
|
11443
11444
|
playbackLogging({
|
|
11444
11445
|
logLevel,
|
|
@@ -11453,7 +11454,8 @@ var useBufferManager = (logLevel, mountTime) => {
|
|
|
11453
11454
|
if (rendering) {
|
|
11454
11455
|
return;
|
|
11455
11456
|
}
|
|
11456
|
-
if (blocks.length === 0) {
|
|
11457
|
+
if (blocks.length === 0 && buffering.current) {
|
|
11458
|
+
buffering.current = false;
|
|
11457
11459
|
onResumeCallbacks.forEach((c2) => c2());
|
|
11458
11460
|
playbackLogging({
|
|
11459
11461
|
logLevel,
|
|
@@ -11486,15 +11488,11 @@ var useIsPlayerBuffering = (bufferManager) => {
|
|
|
11486
11488
|
const onResume = () => {
|
|
11487
11489
|
setIsBuffering(false);
|
|
11488
11490
|
};
|
|
11489
|
-
bufferManager.listenForBuffering(onBuffer);
|
|
11490
|
-
bufferManager.listenForResume(onResume);
|
|
11491
|
+
const buffer = bufferManager.listenForBuffering(onBuffer);
|
|
11492
|
+
const resume = bufferManager.listenForResume(onResume);
|
|
11491
11493
|
return () => {
|
|
11492
|
-
|
|
11493
|
-
|
|
11494
|
-
});
|
|
11495
|
-
bufferManager.listenForResume(() => {
|
|
11496
|
-
return;
|
|
11497
|
-
});
|
|
11494
|
+
buffer.remove();
|
|
11495
|
+
resume.remove();
|
|
11498
11496
|
};
|
|
11499
11497
|
}, [bufferManager]);
|
|
11500
11498
|
return isBuffering;
|
|
@@ -11618,6 +11616,72 @@ var useBufferUntilFirstFrame = ({
|
|
|
11618
11616
|
};
|
|
11619
11617
|
}, [bufferUntilFirstFrame]);
|
|
11620
11618
|
};
|
|
11619
|
+
var getMediaSyncAction = (input) => {
|
|
11620
|
+
const {
|
|
11621
|
+
duration,
|
|
11622
|
+
currentTime,
|
|
11623
|
+
paused,
|
|
11624
|
+
ended,
|
|
11625
|
+
desiredUnclampedTime,
|
|
11626
|
+
mediaTagTime,
|
|
11627
|
+
mediaTagLastUpdate,
|
|
11628
|
+
rvcTime,
|
|
11629
|
+
rvcLastUpdate,
|
|
11630
|
+
isVariableFpsVideo,
|
|
11631
|
+
acceptableTimeShift,
|
|
11632
|
+
lastSeekDueToShift,
|
|
11633
|
+
playing,
|
|
11634
|
+
playbackRate,
|
|
11635
|
+
mediaTagBufferingOrStalled,
|
|
11636
|
+
playerBuffering,
|
|
11637
|
+
absoluteFrame,
|
|
11638
|
+
onlyWarnForMediaSeekingError,
|
|
11639
|
+
isPremounting,
|
|
11640
|
+
isPostmounting,
|
|
11641
|
+
pauseWhenBuffering
|
|
11642
|
+
} = input;
|
|
11643
|
+
const shouldBeTime = !Number.isNaN(duration) && Number.isFinite(duration) ? Math.min(duration, desiredUnclampedTime) : desiredUnclampedTime;
|
|
11644
|
+
const timeShiftMediaTag = Math.abs(shouldBeTime - mediaTagTime);
|
|
11645
|
+
const timeShiftRvcTag = rvcTime ? Math.abs(shouldBeTime - rvcTime) : null;
|
|
11646
|
+
const mostRecentTimeshift = rvcLastUpdate && rvcTime > mediaTagLastUpdate ? timeShiftRvcTag : timeShiftMediaTag;
|
|
11647
|
+
const timeShift = timeShiftRvcTag && !isVariableFpsVideo ? mostRecentTimeshift : timeShiftMediaTag;
|
|
11648
|
+
if (timeShift > acceptableTimeShift && lastSeekDueToShift !== shouldBeTime) {
|
|
11649
|
+
return {
|
|
11650
|
+
type: "seek-due-to-shift",
|
|
11651
|
+
shouldBeTime,
|
|
11652
|
+
why: `because time shift is too big. shouldBeTime = ${shouldBeTime}, isTime = ${mediaTagTime}, requestVideoCallbackTime = ${rvcTime}, timeShift = ${timeShift}${isVariableFpsVideo ? ", isVariableFpsVideo = true" : ""}, isPremounting = ${isPremounting}, isPostmounting = ${isPostmounting}, pauseWhenBuffering = ${pauseWhenBuffering}`,
|
|
11653
|
+
bufferUntilFirstFrame: playing && playbackRate > 0,
|
|
11654
|
+
playReason: playing && paused ? "player is playing but media tag is paused, and just seeked" : null,
|
|
11655
|
+
warnAboutNonSeekable: !onlyWarnForMediaSeekingError
|
|
11656
|
+
};
|
|
11657
|
+
}
|
|
11658
|
+
const seekThreshold = playing ? 0.15 : 0.01;
|
|
11659
|
+
const makesSenseToSeek = Math.abs(currentTime - shouldBeTime) > seekThreshold;
|
|
11660
|
+
const isSomethingElseBuffering = playerBuffering && !mediaTagBufferingOrStalled;
|
|
11661
|
+
if (!playing || isSomethingElseBuffering) {
|
|
11662
|
+
return {
|
|
11663
|
+
type: "seek-if-not-playing",
|
|
11664
|
+
shouldBeTime,
|
|
11665
|
+
why: makesSenseToSeek ? `not playing or something else is buffering. time offset is over seek threshold (${seekThreshold})` : null
|
|
11666
|
+
};
|
|
11667
|
+
}
|
|
11668
|
+
if (!playing || playerBuffering) {
|
|
11669
|
+
return { type: "none" };
|
|
11670
|
+
}
|
|
11671
|
+
const pausedCondition = paused && !ended;
|
|
11672
|
+
const firstFrameCondition = absoluteFrame === 0;
|
|
11673
|
+
if (pausedCondition || firstFrameCondition) {
|
|
11674
|
+
const reason = pausedCondition ? "media tag is paused" : "absolute frame is 0";
|
|
11675
|
+
return {
|
|
11676
|
+
type: "play-and-seek",
|
|
11677
|
+
shouldBeTime,
|
|
11678
|
+
why: makesSenseToSeek ? `is over timeshift threshold (threshold = ${seekThreshold}) and ${reason}` : null,
|
|
11679
|
+
playReason: `player is playing and ${reason}`,
|
|
11680
|
+
bufferUntilFirstFrame: !isVariableFpsVideo && playbackRate > 0
|
|
11681
|
+
};
|
|
11682
|
+
}
|
|
11683
|
+
return { type: "none" };
|
|
11684
|
+
};
|
|
11621
11685
|
var useCurrentTimeOfMediaTagWithUpdateTimeStamp = (mediaRef) => {
|
|
11622
11686
|
const lastUpdate = React21.useRef({
|
|
11623
11687
|
time: mediaRef.current?.currentTime ?? 0,
|
|
@@ -12037,89 +12101,93 @@ var useMediaPlayback = ({
|
|
|
12037
12101
|
if (!src) {
|
|
12038
12102
|
throw new Error(`No 'src' attribute was passed to the ${tagName} element.`);
|
|
12039
12103
|
}
|
|
12040
|
-
const {
|
|
12041
|
-
const
|
|
12042
|
-
|
|
12043
|
-
|
|
12044
|
-
|
|
12045
|
-
|
|
12046
|
-
|
|
12047
|
-
|
|
12048
|
-
|
|
12049
|
-
|
|
12104
|
+
const { current } = mediaRef;
|
|
12105
|
+
const action = getMediaSyncAction({
|
|
12106
|
+
duration: current.duration,
|
|
12107
|
+
currentTime: current.currentTime,
|
|
12108
|
+
paused: current.paused,
|
|
12109
|
+
ended: current.ended,
|
|
12110
|
+
desiredUnclampedTime,
|
|
12111
|
+
mediaTagTime: mediaTagCurrentTime.current.time,
|
|
12112
|
+
mediaTagLastUpdate: mediaTagCurrentTime.current.lastUpdate,
|
|
12113
|
+
rvcTime: rvcCurrentTime.current?.time ?? null,
|
|
12114
|
+
rvcLastUpdate: rvcCurrentTime.current?.lastUpdate ?? null,
|
|
12115
|
+
isVariableFpsVideo: Boolean(isVariableFpsVideoMap.current[src]),
|
|
12116
|
+
acceptableTimeShift: acceptableTimeShiftButLessThanDuration,
|
|
12117
|
+
lastSeekDueToShift: lastSeekDueToShift.current,
|
|
12118
|
+
playing,
|
|
12119
|
+
playbackRate,
|
|
12120
|
+
mediaTagBufferingOrStalled: isMediaTagBuffering || isBuffering(),
|
|
12121
|
+
playerBuffering: buffering.buffering.current,
|
|
12122
|
+
absoluteFrame,
|
|
12123
|
+
onlyWarnForMediaSeekingError,
|
|
12124
|
+
isPremounting,
|
|
12125
|
+
isPostmounting,
|
|
12126
|
+
pauseWhenBuffering
|
|
12127
|
+
});
|
|
12128
|
+
if (action.type === "none") {
|
|
12129
|
+
return;
|
|
12130
|
+
}
|
|
12131
|
+
if (action.type === "seek-due-to-shift") {
|
|
12050
12132
|
lastSeek.current = seek({
|
|
12051
|
-
mediaRef:
|
|
12052
|
-
time: shouldBeTime,
|
|
12133
|
+
mediaRef: current,
|
|
12134
|
+
time: action.shouldBeTime,
|
|
12053
12135
|
logLevel,
|
|
12054
|
-
why:
|
|
12136
|
+
why: action.why,
|
|
12055
12137
|
mountTime
|
|
12056
12138
|
});
|
|
12057
12139
|
lastSeekDueToShift.current = lastSeek.current;
|
|
12058
|
-
if (
|
|
12059
|
-
|
|
12060
|
-
bufferUntilFirstFrame(shouldBeTime);
|
|
12061
|
-
}
|
|
12062
|
-
if (mediaRef.current.paused) {
|
|
12063
|
-
playAndHandleNotAllowedError({
|
|
12064
|
-
mediaRef,
|
|
12065
|
-
mediaType,
|
|
12066
|
-
onAutoPlayError,
|
|
12067
|
-
logLevel,
|
|
12068
|
-
mountTime,
|
|
12069
|
-
reason: "player is playing but media tag is paused, and just seeked",
|
|
12070
|
-
isPlayer: env.isPlayer
|
|
12071
|
-
});
|
|
12072
|
-
}
|
|
12073
|
-
}
|
|
12074
|
-
if (!onlyWarnForMediaSeekingError) {
|
|
12075
|
-
warnAboutNonSeekableMedia(mediaRef.current, onlyWarnForMediaSeekingError ? "console-warning" : "console-error");
|
|
12140
|
+
if (action.bufferUntilFirstFrame) {
|
|
12141
|
+
bufferUntilFirstFrame(action.shouldBeTime);
|
|
12076
12142
|
}
|
|
12077
|
-
|
|
12078
|
-
|
|
12079
|
-
|
|
12080
|
-
|
|
12081
|
-
|
|
12082
|
-
const isSomethingElseBuffering = buffering.buffering.current && !isMediaTagBufferingOrStalled;
|
|
12083
|
-
if (!playing || isSomethingElseBuffering) {
|
|
12084
|
-
if (makesSenseToSeek) {
|
|
12085
|
-
lastSeek.current = seek({
|
|
12086
|
-
mediaRef: mediaRef.current,
|
|
12087
|
-
time: shouldBeTime,
|
|
12143
|
+
if (action.playReason !== null) {
|
|
12144
|
+
playAndHandleNotAllowedError({
|
|
12145
|
+
mediaRef,
|
|
12146
|
+
mediaType,
|
|
12147
|
+
onAutoPlayError,
|
|
12088
12148
|
logLevel,
|
|
12089
|
-
|
|
12090
|
-
|
|
12149
|
+
mountTime,
|
|
12150
|
+
reason: action.playReason,
|
|
12151
|
+
isPlayer: env.isPlayer
|
|
12091
12152
|
});
|
|
12092
12153
|
}
|
|
12154
|
+
if (action.warnAboutNonSeekable) {
|
|
12155
|
+
warnAboutNonSeekableMedia(current, "console-error");
|
|
12156
|
+
}
|
|
12093
12157
|
return;
|
|
12094
12158
|
}
|
|
12095
|
-
if (
|
|
12096
|
-
|
|
12097
|
-
}
|
|
12098
|
-
const pausedCondition = mediaRef.current.paused && !mediaRef.current.ended;
|
|
12099
|
-
const firstFrameCondition = absoluteFrame === 0;
|
|
12100
|
-
if (pausedCondition || firstFrameCondition) {
|
|
12101
|
-
const reason = pausedCondition ? "media tag is paused" : "absolute frame is 0";
|
|
12102
|
-
if (makesSenseToSeek) {
|
|
12159
|
+
if (action.type === "seek-if-not-playing") {
|
|
12160
|
+
if (action.why !== null) {
|
|
12103
12161
|
lastSeek.current = seek({
|
|
12104
|
-
mediaRef:
|
|
12105
|
-
time: shouldBeTime,
|
|
12162
|
+
mediaRef: current,
|
|
12163
|
+
time: action.shouldBeTime,
|
|
12106
12164
|
logLevel,
|
|
12107
|
-
why:
|
|
12165
|
+
why: action.why,
|
|
12108
12166
|
mountTime
|
|
12109
12167
|
});
|
|
12110
12168
|
}
|
|
12111
|
-
|
|
12112
|
-
|
|
12113
|
-
|
|
12114
|
-
|
|
12169
|
+
return;
|
|
12170
|
+
}
|
|
12171
|
+
if (action.why !== null) {
|
|
12172
|
+
lastSeek.current = seek({
|
|
12173
|
+
mediaRef: current,
|
|
12174
|
+
time: action.shouldBeTime,
|
|
12115
12175
|
logLevel,
|
|
12116
|
-
|
|
12117
|
-
|
|
12118
|
-
isPlayer: env.isPlayer
|
|
12176
|
+
why: action.why,
|
|
12177
|
+
mountTime
|
|
12119
12178
|
});
|
|
12120
|
-
|
|
12121
|
-
|
|
12122
|
-
|
|
12179
|
+
}
|
|
12180
|
+
playAndHandleNotAllowedError({
|
|
12181
|
+
mediaRef,
|
|
12182
|
+
mediaType,
|
|
12183
|
+
onAutoPlayError,
|
|
12184
|
+
logLevel,
|
|
12185
|
+
mountTime,
|
|
12186
|
+
reason: action.playReason,
|
|
12187
|
+
isPlayer: env.isPlayer
|
|
12188
|
+
});
|
|
12189
|
+
if (action.bufferUntilFirstFrame) {
|
|
12190
|
+
bufferUntilFirstFrame(action.shouldBeTime);
|
|
12123
12191
|
}
|
|
12124
12192
|
}, [
|
|
12125
12193
|
absoluteFrame,
|
|
@@ -15643,6 +15711,15 @@ var staticFile = (path) => {
|
|
|
15643
15711
|
}
|
|
15644
15712
|
return preparsed;
|
|
15645
15713
|
};
|
|
15714
|
+
var Still = (props2) => {
|
|
15715
|
+
const newProps = {
|
|
15716
|
+
...props2,
|
|
15717
|
+
durationInFrames: 1,
|
|
15718
|
+
fps: 1
|
|
15719
|
+
};
|
|
15720
|
+
return React42.createElement(Composition, newProps);
|
|
15721
|
+
};
|
|
15722
|
+
addSequenceStackTraces(Still);
|
|
15646
15723
|
var roundTo6Commas = (num) => {
|
|
15647
15724
|
return Math.round(num * 1e5) / 1e5;
|
|
15648
15725
|
};
|
|
@@ -27636,10 +27713,21 @@ var CompanyPricing = () => {
|
|
|
27636
27713
|
|
|
27637
27714
|
// src/components/homepage/Pricing.tsx
|
|
27638
27715
|
import { jsx as jsx47, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
27639
|
-
var Pricing = ({
|
|
27716
|
+
var Pricing = ({
|
|
27717
|
+
faqHref = "/docs/license/faq",
|
|
27718
|
+
faqLabel = "License FAQ",
|
|
27719
|
+
licenseHref = "https://github.com/remotion-dev/remotion/blob/main/LICENSE.md",
|
|
27720
|
+
termsHref = "https://www.remotion.pro/terms"
|
|
27721
|
+
}) => {
|
|
27640
27722
|
const faqLinkTarget = useMemo52(() => {
|
|
27641
27723
|
return faqHref.startsWith("http") ? "_blank" : undefined;
|
|
27642
27724
|
}, [faqHref]);
|
|
27725
|
+
const licenseLinkTarget = useMemo52(() => {
|
|
27726
|
+
return licenseHref.startsWith("http") ? "_blank" : undefined;
|
|
27727
|
+
}, [licenseHref]);
|
|
27728
|
+
const termsLinkTarget = useMemo52(() => {
|
|
27729
|
+
return termsHref.startsWith("http") ? "_blank" : undefined;
|
|
27730
|
+
}, [termsHref]);
|
|
27643
27731
|
return /* @__PURE__ */ jsxs8("div", {
|
|
27644
27732
|
style: {
|
|
27645
27733
|
display: "flex",
|
|
@@ -27663,19 +27751,24 @@ var Pricing = ({ faqHref = "/docs/pricing#faq" }) => {
|
|
|
27663
27751
|
children: [
|
|
27664
27752
|
"See our",
|
|
27665
27753
|
" ",
|
|
27754
|
+
/* @__PURE__ */ jsx47("a", {
|
|
27755
|
+
target: licenseLinkTarget,
|
|
27756
|
+
className: "bluelink",
|
|
27757
|
+
href: licenseHref,
|
|
27758
|
+
children: "LICENSE.md"
|
|
27759
|
+
}),
|
|
27760
|
+
", ",
|
|
27666
27761
|
/* @__PURE__ */ jsx47("a", {
|
|
27667
27762
|
target: faqLinkTarget,
|
|
27668
27763
|
className: "bluelink",
|
|
27669
27764
|
href: faqHref,
|
|
27670
|
-
children:
|
|
27765
|
+
children: faqLabel
|
|
27671
27766
|
}),
|
|
27672
|
-
" ",
|
|
27673
|
-
"and",
|
|
27674
|
-
" ",
|
|
27767
|
+
", and ",
|
|
27675
27768
|
/* @__PURE__ */ jsx47("a", {
|
|
27676
|
-
target:
|
|
27769
|
+
target: termsLinkTarget,
|
|
27677
27770
|
className: "bluelink",
|
|
27678
|
-
href:
|
|
27771
|
+
href: termsHref,
|
|
27679
27772
|
children: "Terms and Conditions"
|
|
27680
27773
|
}),
|
|
27681
27774
|
" ",
|
|
@@ -5565,7 +5565,7 @@ var getComponentsToAddStacksTo = () => componentsToAddStacksTo;
|
|
|
5565
5565
|
var addSequenceStackTraces = (component) => {
|
|
5566
5566
|
componentsToAddStacksTo.push(component);
|
|
5567
5567
|
};
|
|
5568
|
-
var VERSION = "4.0.
|
|
5568
|
+
var VERSION = "4.0.487";
|
|
5569
5569
|
var checkMultipleRemotionVersions = () => {
|
|
5570
5570
|
if (typeof globalThis === "undefined") {
|
|
5571
5571
|
return;
|
|
@@ -11435,7 +11435,8 @@ var useBufferManager = (logLevel, mountTime) => {
|
|
|
11435
11435
|
if (rendering) {
|
|
11436
11436
|
return;
|
|
11437
11437
|
}
|
|
11438
|
-
if (blocks.length > 0) {
|
|
11438
|
+
if (blocks.length > 0 && !buffering.current) {
|
|
11439
|
+
buffering.current = true;
|
|
11439
11440
|
onBufferingCallbacks.forEach((c2) => c2());
|
|
11440
11441
|
playbackLogging({
|
|
11441
11442
|
logLevel,
|
|
@@ -11450,7 +11451,8 @@ var useBufferManager = (logLevel, mountTime) => {
|
|
|
11450
11451
|
if (rendering) {
|
|
11451
11452
|
return;
|
|
11452
11453
|
}
|
|
11453
|
-
if (blocks.length === 0) {
|
|
11454
|
+
if (blocks.length === 0 && buffering.current) {
|
|
11455
|
+
buffering.current = false;
|
|
11454
11456
|
onResumeCallbacks.forEach((c2) => c2());
|
|
11455
11457
|
playbackLogging({
|
|
11456
11458
|
logLevel,
|
|
@@ -11483,15 +11485,11 @@ var useIsPlayerBuffering = (bufferManager) => {
|
|
|
11483
11485
|
const onResume = () => {
|
|
11484
11486
|
setIsBuffering(false);
|
|
11485
11487
|
};
|
|
11486
|
-
bufferManager.listenForBuffering(onBuffer);
|
|
11487
|
-
bufferManager.listenForResume(onResume);
|
|
11488
|
+
const buffer = bufferManager.listenForBuffering(onBuffer);
|
|
11489
|
+
const resume = bufferManager.listenForResume(onResume);
|
|
11488
11490
|
return () => {
|
|
11489
|
-
|
|
11490
|
-
|
|
11491
|
-
});
|
|
11492
|
-
bufferManager.listenForResume(() => {
|
|
11493
|
-
return;
|
|
11494
|
-
});
|
|
11491
|
+
buffer.remove();
|
|
11492
|
+
resume.remove();
|
|
11495
11493
|
};
|
|
11496
11494
|
}, [bufferManager]);
|
|
11497
11495
|
return isBuffering;
|
|
@@ -11615,6 +11613,72 @@ var useBufferUntilFirstFrame = ({
|
|
|
11615
11613
|
};
|
|
11616
11614
|
}, [bufferUntilFirstFrame]);
|
|
11617
11615
|
};
|
|
11616
|
+
var getMediaSyncAction = (input) => {
|
|
11617
|
+
const {
|
|
11618
|
+
duration,
|
|
11619
|
+
currentTime,
|
|
11620
|
+
paused,
|
|
11621
|
+
ended,
|
|
11622
|
+
desiredUnclampedTime,
|
|
11623
|
+
mediaTagTime,
|
|
11624
|
+
mediaTagLastUpdate,
|
|
11625
|
+
rvcTime,
|
|
11626
|
+
rvcLastUpdate,
|
|
11627
|
+
isVariableFpsVideo,
|
|
11628
|
+
acceptableTimeShift,
|
|
11629
|
+
lastSeekDueToShift,
|
|
11630
|
+
playing,
|
|
11631
|
+
playbackRate,
|
|
11632
|
+
mediaTagBufferingOrStalled,
|
|
11633
|
+
playerBuffering,
|
|
11634
|
+
absoluteFrame,
|
|
11635
|
+
onlyWarnForMediaSeekingError,
|
|
11636
|
+
isPremounting,
|
|
11637
|
+
isPostmounting,
|
|
11638
|
+
pauseWhenBuffering
|
|
11639
|
+
} = input;
|
|
11640
|
+
const shouldBeTime = !Number.isNaN(duration) && Number.isFinite(duration) ? Math.min(duration, desiredUnclampedTime) : desiredUnclampedTime;
|
|
11641
|
+
const timeShiftMediaTag = Math.abs(shouldBeTime - mediaTagTime);
|
|
11642
|
+
const timeShiftRvcTag = rvcTime ? Math.abs(shouldBeTime - rvcTime) : null;
|
|
11643
|
+
const mostRecentTimeshift = rvcLastUpdate && rvcTime > mediaTagLastUpdate ? timeShiftRvcTag : timeShiftMediaTag;
|
|
11644
|
+
const timeShift = timeShiftRvcTag && !isVariableFpsVideo ? mostRecentTimeshift : timeShiftMediaTag;
|
|
11645
|
+
if (timeShift > acceptableTimeShift && lastSeekDueToShift !== shouldBeTime) {
|
|
11646
|
+
return {
|
|
11647
|
+
type: "seek-due-to-shift",
|
|
11648
|
+
shouldBeTime,
|
|
11649
|
+
why: `because time shift is too big. shouldBeTime = ${shouldBeTime}, isTime = ${mediaTagTime}, requestVideoCallbackTime = ${rvcTime}, timeShift = ${timeShift}${isVariableFpsVideo ? ", isVariableFpsVideo = true" : ""}, isPremounting = ${isPremounting}, isPostmounting = ${isPostmounting}, pauseWhenBuffering = ${pauseWhenBuffering}`,
|
|
11650
|
+
bufferUntilFirstFrame: playing && playbackRate > 0,
|
|
11651
|
+
playReason: playing && paused ? "player is playing but media tag is paused, and just seeked" : null,
|
|
11652
|
+
warnAboutNonSeekable: !onlyWarnForMediaSeekingError
|
|
11653
|
+
};
|
|
11654
|
+
}
|
|
11655
|
+
const seekThreshold = playing ? 0.15 : 0.01;
|
|
11656
|
+
const makesSenseToSeek = Math.abs(currentTime - shouldBeTime) > seekThreshold;
|
|
11657
|
+
const isSomethingElseBuffering = playerBuffering && !mediaTagBufferingOrStalled;
|
|
11658
|
+
if (!playing || isSomethingElseBuffering) {
|
|
11659
|
+
return {
|
|
11660
|
+
type: "seek-if-not-playing",
|
|
11661
|
+
shouldBeTime,
|
|
11662
|
+
why: makesSenseToSeek ? `not playing or something else is buffering. time offset is over seek threshold (${seekThreshold})` : null
|
|
11663
|
+
};
|
|
11664
|
+
}
|
|
11665
|
+
if (!playing || playerBuffering) {
|
|
11666
|
+
return { type: "none" };
|
|
11667
|
+
}
|
|
11668
|
+
const pausedCondition = paused && !ended;
|
|
11669
|
+
const firstFrameCondition = absoluteFrame === 0;
|
|
11670
|
+
if (pausedCondition || firstFrameCondition) {
|
|
11671
|
+
const reason = pausedCondition ? "media tag is paused" : "absolute frame is 0";
|
|
11672
|
+
return {
|
|
11673
|
+
type: "play-and-seek",
|
|
11674
|
+
shouldBeTime,
|
|
11675
|
+
why: makesSenseToSeek ? `is over timeshift threshold (threshold = ${seekThreshold}) and ${reason}` : null,
|
|
11676
|
+
playReason: `player is playing and ${reason}`,
|
|
11677
|
+
bufferUntilFirstFrame: !isVariableFpsVideo && playbackRate > 0
|
|
11678
|
+
};
|
|
11679
|
+
}
|
|
11680
|
+
return { type: "none" };
|
|
11681
|
+
};
|
|
11618
11682
|
var useCurrentTimeOfMediaTagWithUpdateTimeStamp = (mediaRef) => {
|
|
11619
11683
|
const lastUpdate = React21.useRef({
|
|
11620
11684
|
time: mediaRef.current?.currentTime ?? 0,
|
|
@@ -12034,89 +12098,93 @@ var useMediaPlayback = ({
|
|
|
12034
12098
|
if (!src) {
|
|
12035
12099
|
throw new Error(`No 'src' attribute was passed to the ${tagName} element.`);
|
|
12036
12100
|
}
|
|
12037
|
-
const {
|
|
12038
|
-
const
|
|
12039
|
-
|
|
12040
|
-
|
|
12041
|
-
|
|
12042
|
-
|
|
12043
|
-
|
|
12044
|
-
|
|
12045
|
-
|
|
12046
|
-
|
|
12101
|
+
const { current } = mediaRef;
|
|
12102
|
+
const action = getMediaSyncAction({
|
|
12103
|
+
duration: current.duration,
|
|
12104
|
+
currentTime: current.currentTime,
|
|
12105
|
+
paused: current.paused,
|
|
12106
|
+
ended: current.ended,
|
|
12107
|
+
desiredUnclampedTime,
|
|
12108
|
+
mediaTagTime: mediaTagCurrentTime.current.time,
|
|
12109
|
+
mediaTagLastUpdate: mediaTagCurrentTime.current.lastUpdate,
|
|
12110
|
+
rvcTime: rvcCurrentTime.current?.time ?? null,
|
|
12111
|
+
rvcLastUpdate: rvcCurrentTime.current?.lastUpdate ?? null,
|
|
12112
|
+
isVariableFpsVideo: Boolean(isVariableFpsVideoMap.current[src]),
|
|
12113
|
+
acceptableTimeShift: acceptableTimeShiftButLessThanDuration,
|
|
12114
|
+
lastSeekDueToShift: lastSeekDueToShift.current,
|
|
12115
|
+
playing,
|
|
12116
|
+
playbackRate,
|
|
12117
|
+
mediaTagBufferingOrStalled: isMediaTagBuffering || isBuffering(),
|
|
12118
|
+
playerBuffering: buffering.buffering.current,
|
|
12119
|
+
absoluteFrame,
|
|
12120
|
+
onlyWarnForMediaSeekingError,
|
|
12121
|
+
isPremounting,
|
|
12122
|
+
isPostmounting,
|
|
12123
|
+
pauseWhenBuffering
|
|
12124
|
+
});
|
|
12125
|
+
if (action.type === "none") {
|
|
12126
|
+
return;
|
|
12127
|
+
}
|
|
12128
|
+
if (action.type === "seek-due-to-shift") {
|
|
12047
12129
|
lastSeek.current = seek({
|
|
12048
|
-
mediaRef:
|
|
12049
|
-
time: shouldBeTime,
|
|
12130
|
+
mediaRef: current,
|
|
12131
|
+
time: action.shouldBeTime,
|
|
12050
12132
|
logLevel,
|
|
12051
|
-
why:
|
|
12133
|
+
why: action.why,
|
|
12052
12134
|
mountTime
|
|
12053
12135
|
});
|
|
12054
12136
|
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
|
-
}
|
|
12137
|
+
if (action.bufferUntilFirstFrame) {
|
|
12138
|
+
bufferUntilFirstFrame(action.shouldBeTime);
|
|
12070
12139
|
}
|
|
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,
|
|
12140
|
+
if (action.playReason !== null) {
|
|
12141
|
+
playAndHandleNotAllowedError({
|
|
12142
|
+
mediaRef,
|
|
12143
|
+
mediaType,
|
|
12144
|
+
onAutoPlayError,
|
|
12085
12145
|
logLevel,
|
|
12086
|
-
|
|
12087
|
-
|
|
12146
|
+
mountTime,
|
|
12147
|
+
reason: action.playReason,
|
|
12148
|
+
isPlayer: env.isPlayer
|
|
12088
12149
|
});
|
|
12089
12150
|
}
|
|
12151
|
+
if (action.warnAboutNonSeekable) {
|
|
12152
|
+
warnAboutNonSeekableMedia(current, "console-error");
|
|
12153
|
+
}
|
|
12090
12154
|
return;
|
|
12091
12155
|
}
|
|
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) {
|
|
12156
|
+
if (action.type === "seek-if-not-playing") {
|
|
12157
|
+
if (action.why !== null) {
|
|
12100
12158
|
lastSeek.current = seek({
|
|
12101
|
-
mediaRef:
|
|
12102
|
-
time: shouldBeTime,
|
|
12159
|
+
mediaRef: current,
|
|
12160
|
+
time: action.shouldBeTime,
|
|
12103
12161
|
logLevel,
|
|
12104
|
-
why:
|
|
12162
|
+
why: action.why,
|
|
12105
12163
|
mountTime
|
|
12106
12164
|
});
|
|
12107
12165
|
}
|
|
12108
|
-
|
|
12109
|
-
|
|
12110
|
-
|
|
12111
|
-
|
|
12166
|
+
return;
|
|
12167
|
+
}
|
|
12168
|
+
if (action.why !== null) {
|
|
12169
|
+
lastSeek.current = seek({
|
|
12170
|
+
mediaRef: current,
|
|
12171
|
+
time: action.shouldBeTime,
|
|
12112
12172
|
logLevel,
|
|
12113
|
-
|
|
12114
|
-
|
|
12115
|
-
isPlayer: env.isPlayer
|
|
12173
|
+
why: action.why,
|
|
12174
|
+
mountTime
|
|
12116
12175
|
});
|
|
12117
|
-
|
|
12118
|
-
|
|
12119
|
-
|
|
12176
|
+
}
|
|
12177
|
+
playAndHandleNotAllowedError({
|
|
12178
|
+
mediaRef,
|
|
12179
|
+
mediaType,
|
|
12180
|
+
onAutoPlayError,
|
|
12181
|
+
logLevel,
|
|
12182
|
+
mountTime,
|
|
12183
|
+
reason: action.playReason,
|
|
12184
|
+
isPlayer: env.isPlayer
|
|
12185
|
+
});
|
|
12186
|
+
if (action.bufferUntilFirstFrame) {
|
|
12187
|
+
bufferUntilFirstFrame(action.shouldBeTime);
|
|
12120
12188
|
}
|
|
12121
12189
|
}, [
|
|
12122
12190
|
absoluteFrame,
|
|
@@ -15640,6 +15708,15 @@ var staticFile = (path) => {
|
|
|
15640
15708
|
}
|
|
15641
15709
|
return preparsed;
|
|
15642
15710
|
};
|
|
15711
|
+
var Still = (props2) => {
|
|
15712
|
+
const newProps = {
|
|
15713
|
+
...props2,
|
|
15714
|
+
durationInFrames: 1,
|
|
15715
|
+
fps: 1
|
|
15716
|
+
};
|
|
15717
|
+
return React42.createElement(Composition, newProps);
|
|
15718
|
+
};
|
|
15719
|
+
addSequenceStackTraces(Still);
|
|
15643
15720
|
var roundTo6Commas = (num) => {
|
|
15644
15721
|
return Math.round(num * 1e5) / 1e5;
|
|
15645
15722
|
};
|