@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/design.js
CHANGED
|
@@ -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
|
};
|
package/dist/experts.js
CHANGED
|
@@ -2335,7 +2335,7 @@ var getComponentsToAddStacksTo = () => componentsToAddStacksTo;
|
|
|
2335
2335
|
var addSequenceStackTraces = (component) => {
|
|
2336
2336
|
componentsToAddStacksTo.push(component);
|
|
2337
2337
|
};
|
|
2338
|
-
var VERSION = "4.0.
|
|
2338
|
+
var VERSION = "4.0.487";
|
|
2339
2339
|
var checkMultipleRemotionVersions = () => {
|
|
2340
2340
|
if (typeof globalThis === "undefined") {
|
|
2341
2341
|
return;
|
|
@@ -8205,7 +8205,8 @@ var useBufferManager = (logLevel, mountTime) => {
|
|
|
8205
8205
|
if (rendering) {
|
|
8206
8206
|
return;
|
|
8207
8207
|
}
|
|
8208
|
-
if (blocks.length > 0) {
|
|
8208
|
+
if (blocks.length > 0 && !buffering.current) {
|
|
8209
|
+
buffering.current = true;
|
|
8209
8210
|
onBufferingCallbacks.forEach((c2) => c2());
|
|
8210
8211
|
playbackLogging({
|
|
8211
8212
|
logLevel,
|
|
@@ -8220,7 +8221,8 @@ var useBufferManager = (logLevel, mountTime) => {
|
|
|
8220
8221
|
if (rendering) {
|
|
8221
8222
|
return;
|
|
8222
8223
|
}
|
|
8223
|
-
if (blocks.length === 0) {
|
|
8224
|
+
if (blocks.length === 0 && buffering.current) {
|
|
8225
|
+
buffering.current = false;
|
|
8224
8226
|
onResumeCallbacks.forEach((c2) => c2());
|
|
8225
8227
|
playbackLogging({
|
|
8226
8228
|
logLevel,
|
|
@@ -8253,15 +8255,11 @@ var useIsPlayerBuffering = (bufferManager) => {
|
|
|
8253
8255
|
const onResume = () => {
|
|
8254
8256
|
setIsBuffering(false);
|
|
8255
8257
|
};
|
|
8256
|
-
bufferManager.listenForBuffering(onBuffer);
|
|
8257
|
-
bufferManager.listenForResume(onResume);
|
|
8258
|
+
const buffer = bufferManager.listenForBuffering(onBuffer);
|
|
8259
|
+
const resume = bufferManager.listenForResume(onResume);
|
|
8258
8260
|
return () => {
|
|
8259
|
-
|
|
8260
|
-
|
|
8261
|
-
});
|
|
8262
|
-
bufferManager.listenForResume(() => {
|
|
8263
|
-
return;
|
|
8264
|
-
});
|
|
8261
|
+
buffer.remove();
|
|
8262
|
+
resume.remove();
|
|
8265
8263
|
};
|
|
8266
8264
|
}, [bufferManager]);
|
|
8267
8265
|
return isBuffering;
|
|
@@ -8385,6 +8383,72 @@ var useBufferUntilFirstFrame = ({
|
|
|
8385
8383
|
};
|
|
8386
8384
|
}, [bufferUntilFirstFrame]);
|
|
8387
8385
|
};
|
|
8386
|
+
var getMediaSyncAction = (input) => {
|
|
8387
|
+
const {
|
|
8388
|
+
duration,
|
|
8389
|
+
currentTime,
|
|
8390
|
+
paused,
|
|
8391
|
+
ended,
|
|
8392
|
+
desiredUnclampedTime,
|
|
8393
|
+
mediaTagTime,
|
|
8394
|
+
mediaTagLastUpdate,
|
|
8395
|
+
rvcTime,
|
|
8396
|
+
rvcLastUpdate,
|
|
8397
|
+
isVariableFpsVideo,
|
|
8398
|
+
acceptableTimeShift,
|
|
8399
|
+
lastSeekDueToShift,
|
|
8400
|
+
playing,
|
|
8401
|
+
playbackRate,
|
|
8402
|
+
mediaTagBufferingOrStalled,
|
|
8403
|
+
playerBuffering,
|
|
8404
|
+
absoluteFrame,
|
|
8405
|
+
onlyWarnForMediaSeekingError,
|
|
8406
|
+
isPremounting,
|
|
8407
|
+
isPostmounting,
|
|
8408
|
+
pauseWhenBuffering
|
|
8409
|
+
} = input;
|
|
8410
|
+
const shouldBeTime = !Number.isNaN(duration) && Number.isFinite(duration) ? Math.min(duration, desiredUnclampedTime) : desiredUnclampedTime;
|
|
8411
|
+
const timeShiftMediaTag = Math.abs(shouldBeTime - mediaTagTime);
|
|
8412
|
+
const timeShiftRvcTag = rvcTime ? Math.abs(shouldBeTime - rvcTime) : null;
|
|
8413
|
+
const mostRecentTimeshift = rvcLastUpdate && rvcTime > mediaTagLastUpdate ? timeShiftRvcTag : timeShiftMediaTag;
|
|
8414
|
+
const timeShift = timeShiftRvcTag && !isVariableFpsVideo ? mostRecentTimeshift : timeShiftMediaTag;
|
|
8415
|
+
if (timeShift > acceptableTimeShift && lastSeekDueToShift !== shouldBeTime) {
|
|
8416
|
+
return {
|
|
8417
|
+
type: "seek-due-to-shift",
|
|
8418
|
+
shouldBeTime,
|
|
8419
|
+
why: `because time shift is too big. shouldBeTime = ${shouldBeTime}, isTime = ${mediaTagTime}, requestVideoCallbackTime = ${rvcTime}, timeShift = ${timeShift}${isVariableFpsVideo ? ", isVariableFpsVideo = true" : ""}, isPremounting = ${isPremounting}, isPostmounting = ${isPostmounting}, pauseWhenBuffering = ${pauseWhenBuffering}`,
|
|
8420
|
+
bufferUntilFirstFrame: playing && playbackRate > 0,
|
|
8421
|
+
playReason: playing && paused ? "player is playing but media tag is paused, and just seeked" : null,
|
|
8422
|
+
warnAboutNonSeekable: !onlyWarnForMediaSeekingError
|
|
8423
|
+
};
|
|
8424
|
+
}
|
|
8425
|
+
const seekThreshold = playing ? 0.15 : 0.01;
|
|
8426
|
+
const makesSenseToSeek = Math.abs(currentTime - shouldBeTime) > seekThreshold;
|
|
8427
|
+
const isSomethingElseBuffering = playerBuffering && !mediaTagBufferingOrStalled;
|
|
8428
|
+
if (!playing || isSomethingElseBuffering) {
|
|
8429
|
+
return {
|
|
8430
|
+
type: "seek-if-not-playing",
|
|
8431
|
+
shouldBeTime,
|
|
8432
|
+
why: makesSenseToSeek ? `not playing or something else is buffering. time offset is over seek threshold (${seekThreshold})` : null
|
|
8433
|
+
};
|
|
8434
|
+
}
|
|
8435
|
+
if (!playing || playerBuffering) {
|
|
8436
|
+
return { type: "none" };
|
|
8437
|
+
}
|
|
8438
|
+
const pausedCondition = paused && !ended;
|
|
8439
|
+
const firstFrameCondition = absoluteFrame === 0;
|
|
8440
|
+
if (pausedCondition || firstFrameCondition) {
|
|
8441
|
+
const reason = pausedCondition ? "media tag is paused" : "absolute frame is 0";
|
|
8442
|
+
return {
|
|
8443
|
+
type: "play-and-seek",
|
|
8444
|
+
shouldBeTime,
|
|
8445
|
+
why: makesSenseToSeek ? `is over timeshift threshold (threshold = ${seekThreshold}) and ${reason}` : null,
|
|
8446
|
+
playReason: `player is playing and ${reason}`,
|
|
8447
|
+
bufferUntilFirstFrame: !isVariableFpsVideo && playbackRate > 0
|
|
8448
|
+
};
|
|
8449
|
+
}
|
|
8450
|
+
return { type: "none" };
|
|
8451
|
+
};
|
|
8388
8452
|
var useCurrentTimeOfMediaTagWithUpdateTimeStamp = (mediaRef) => {
|
|
8389
8453
|
const lastUpdate = React21.useRef({
|
|
8390
8454
|
time: mediaRef.current?.currentTime ?? 0,
|
|
@@ -8804,89 +8868,93 @@ var useMediaPlayback = ({
|
|
|
8804
8868
|
if (!src) {
|
|
8805
8869
|
throw new Error(`No 'src' attribute was passed to the ${tagName} element.`);
|
|
8806
8870
|
}
|
|
8807
|
-
const {
|
|
8808
|
-
const
|
|
8809
|
-
|
|
8810
|
-
|
|
8811
|
-
|
|
8812
|
-
|
|
8813
|
-
|
|
8814
|
-
|
|
8815
|
-
|
|
8816
|
-
|
|
8871
|
+
const { current } = mediaRef;
|
|
8872
|
+
const action = getMediaSyncAction({
|
|
8873
|
+
duration: current.duration,
|
|
8874
|
+
currentTime: current.currentTime,
|
|
8875
|
+
paused: current.paused,
|
|
8876
|
+
ended: current.ended,
|
|
8877
|
+
desiredUnclampedTime,
|
|
8878
|
+
mediaTagTime: mediaTagCurrentTime.current.time,
|
|
8879
|
+
mediaTagLastUpdate: mediaTagCurrentTime.current.lastUpdate,
|
|
8880
|
+
rvcTime: rvcCurrentTime.current?.time ?? null,
|
|
8881
|
+
rvcLastUpdate: rvcCurrentTime.current?.lastUpdate ?? null,
|
|
8882
|
+
isVariableFpsVideo: Boolean(isVariableFpsVideoMap.current[src]),
|
|
8883
|
+
acceptableTimeShift: acceptableTimeShiftButLessThanDuration,
|
|
8884
|
+
lastSeekDueToShift: lastSeekDueToShift.current,
|
|
8885
|
+
playing,
|
|
8886
|
+
playbackRate,
|
|
8887
|
+
mediaTagBufferingOrStalled: isMediaTagBuffering || isBuffering(),
|
|
8888
|
+
playerBuffering: buffering.buffering.current,
|
|
8889
|
+
absoluteFrame,
|
|
8890
|
+
onlyWarnForMediaSeekingError,
|
|
8891
|
+
isPremounting,
|
|
8892
|
+
isPostmounting,
|
|
8893
|
+
pauseWhenBuffering
|
|
8894
|
+
});
|
|
8895
|
+
if (action.type === "none") {
|
|
8896
|
+
return;
|
|
8897
|
+
}
|
|
8898
|
+
if (action.type === "seek-due-to-shift") {
|
|
8817
8899
|
lastSeek.current = seek({
|
|
8818
|
-
mediaRef:
|
|
8819
|
-
time: shouldBeTime,
|
|
8900
|
+
mediaRef: current,
|
|
8901
|
+
time: action.shouldBeTime,
|
|
8820
8902
|
logLevel,
|
|
8821
|
-
why:
|
|
8903
|
+
why: action.why,
|
|
8822
8904
|
mountTime
|
|
8823
8905
|
});
|
|
8824
8906
|
lastSeekDueToShift.current = lastSeek.current;
|
|
8825
|
-
if (
|
|
8826
|
-
|
|
8827
|
-
bufferUntilFirstFrame(shouldBeTime);
|
|
8828
|
-
}
|
|
8829
|
-
if (mediaRef.current.paused) {
|
|
8830
|
-
playAndHandleNotAllowedError({
|
|
8831
|
-
mediaRef,
|
|
8832
|
-
mediaType,
|
|
8833
|
-
onAutoPlayError,
|
|
8834
|
-
logLevel,
|
|
8835
|
-
mountTime,
|
|
8836
|
-
reason: "player is playing but media tag is paused, and just seeked",
|
|
8837
|
-
isPlayer: env.isPlayer
|
|
8838
|
-
});
|
|
8839
|
-
}
|
|
8907
|
+
if (action.bufferUntilFirstFrame) {
|
|
8908
|
+
bufferUntilFirstFrame(action.shouldBeTime);
|
|
8840
8909
|
}
|
|
8841
|
-
if (
|
|
8842
|
-
|
|
8843
|
-
|
|
8844
|
-
|
|
8845
|
-
|
|
8846
|
-
const seekThreshold = playing ? 0.15 : 0.01;
|
|
8847
|
-
const makesSenseToSeek = Math.abs(mediaRef.current.currentTime - shouldBeTime) > seekThreshold;
|
|
8848
|
-
const isMediaTagBufferingOrStalled = isMediaTagBuffering || isBuffering();
|
|
8849
|
-
const isSomethingElseBuffering = buffering.buffering.current && !isMediaTagBufferingOrStalled;
|
|
8850
|
-
if (!playing || isSomethingElseBuffering) {
|
|
8851
|
-
if (makesSenseToSeek) {
|
|
8852
|
-
lastSeek.current = seek({
|
|
8853
|
-
mediaRef: mediaRef.current,
|
|
8854
|
-
time: shouldBeTime,
|
|
8910
|
+
if (action.playReason !== null) {
|
|
8911
|
+
playAndHandleNotAllowedError({
|
|
8912
|
+
mediaRef,
|
|
8913
|
+
mediaType,
|
|
8914
|
+
onAutoPlayError,
|
|
8855
8915
|
logLevel,
|
|
8856
|
-
|
|
8857
|
-
|
|
8916
|
+
mountTime,
|
|
8917
|
+
reason: action.playReason,
|
|
8918
|
+
isPlayer: env.isPlayer
|
|
8858
8919
|
});
|
|
8859
8920
|
}
|
|
8921
|
+
if (action.warnAboutNonSeekable) {
|
|
8922
|
+
warnAboutNonSeekableMedia(current, "console-error");
|
|
8923
|
+
}
|
|
8860
8924
|
return;
|
|
8861
8925
|
}
|
|
8862
|
-
if (
|
|
8863
|
-
|
|
8864
|
-
}
|
|
8865
|
-
const pausedCondition = mediaRef.current.paused && !mediaRef.current.ended;
|
|
8866
|
-
const firstFrameCondition = absoluteFrame === 0;
|
|
8867
|
-
if (pausedCondition || firstFrameCondition) {
|
|
8868
|
-
const reason = pausedCondition ? "media tag is paused" : "absolute frame is 0";
|
|
8869
|
-
if (makesSenseToSeek) {
|
|
8926
|
+
if (action.type === "seek-if-not-playing") {
|
|
8927
|
+
if (action.why !== null) {
|
|
8870
8928
|
lastSeek.current = seek({
|
|
8871
|
-
mediaRef:
|
|
8872
|
-
time: shouldBeTime,
|
|
8929
|
+
mediaRef: current,
|
|
8930
|
+
time: action.shouldBeTime,
|
|
8873
8931
|
logLevel,
|
|
8874
|
-
why:
|
|
8932
|
+
why: action.why,
|
|
8875
8933
|
mountTime
|
|
8876
8934
|
});
|
|
8877
8935
|
}
|
|
8878
|
-
|
|
8879
|
-
|
|
8880
|
-
|
|
8881
|
-
|
|
8936
|
+
return;
|
|
8937
|
+
}
|
|
8938
|
+
if (action.why !== null) {
|
|
8939
|
+
lastSeek.current = seek({
|
|
8940
|
+
mediaRef: current,
|
|
8941
|
+
time: action.shouldBeTime,
|
|
8882
8942
|
logLevel,
|
|
8883
|
-
|
|
8884
|
-
|
|
8885
|
-
isPlayer: env.isPlayer
|
|
8943
|
+
why: action.why,
|
|
8944
|
+
mountTime
|
|
8886
8945
|
});
|
|
8887
|
-
|
|
8888
|
-
|
|
8889
|
-
|
|
8946
|
+
}
|
|
8947
|
+
playAndHandleNotAllowedError({
|
|
8948
|
+
mediaRef,
|
|
8949
|
+
mediaType,
|
|
8950
|
+
onAutoPlayError,
|
|
8951
|
+
logLevel,
|
|
8952
|
+
mountTime,
|
|
8953
|
+
reason: action.playReason,
|
|
8954
|
+
isPlayer: env.isPlayer
|
|
8955
|
+
});
|
|
8956
|
+
if (action.bufferUntilFirstFrame) {
|
|
8957
|
+
bufferUntilFirstFrame(action.shouldBeTime);
|
|
8890
8958
|
}
|
|
8891
8959
|
}, [
|
|
8892
8960
|
absoluteFrame,
|
|
@@ -12410,6 +12478,15 @@ var staticFile = (path) => {
|
|
|
12410
12478
|
}
|
|
12411
12479
|
return preparsed;
|
|
12412
12480
|
};
|
|
12481
|
+
var Still = (props2) => {
|
|
12482
|
+
const newProps = {
|
|
12483
|
+
...props2,
|
|
12484
|
+
durationInFrames: 1,
|
|
12485
|
+
fps: 1
|
|
12486
|
+
};
|
|
12487
|
+
return React42.createElement(Composition, newProps);
|
|
12488
|
+
};
|
|
12489
|
+
addSequenceStackTraces(Still);
|
|
12413
12490
|
var roundTo6Commas = (num) => {
|
|
12414
12491
|
return Math.round(num * 1e5) / 1e5;
|
|
12415
12492
|
};
|