@remotion/promo-pages 4.0.479 → 4.0.482
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.js +240 -66
- package/dist/design.js +197 -35
- package/dist/experts.js +184 -35
- package/dist/homepage/Pricing.js +197 -35
- package/dist/prompts/PromptsGallery.js +197 -35
- package/dist/prompts/PromptsShow.js +197 -35
- package/dist/prompts/PromptsSubmit.js +197 -35
- package/dist/team.js +197 -35
- package/dist/template-modal-content.js +197 -35
- package/dist/templates.js +197 -35
- package/package.json +13 -13
package/dist/Homepage.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.482";
|
|
2339
2339
|
var checkMultipleRemotionVersions = () => {
|
|
2340
2340
|
if (typeof globalThis === "undefined") {
|
|
2341
2341
|
return;
|
|
@@ -2735,6 +2735,77 @@ var transformSchema = {
|
|
|
2735
2735
|
}
|
|
2736
2736
|
};
|
|
2737
2737
|
var sequenceVisualStyleSchema = transformSchema;
|
|
2738
|
+
var textSchema = {
|
|
2739
|
+
"style.color": {
|
|
2740
|
+
type: "color",
|
|
2741
|
+
default: undefined,
|
|
2742
|
+
description: "Color"
|
|
2743
|
+
},
|
|
2744
|
+
"style.fontSize": {
|
|
2745
|
+
type: "number",
|
|
2746
|
+
default: undefined,
|
|
2747
|
+
min: 0,
|
|
2748
|
+
step: 1,
|
|
2749
|
+
description: "Font size",
|
|
2750
|
+
hiddenFromList: false
|
|
2751
|
+
},
|
|
2752
|
+
"style.lineHeight": {
|
|
2753
|
+
type: "number",
|
|
2754
|
+
default: undefined,
|
|
2755
|
+
min: 0,
|
|
2756
|
+
step: 0.05,
|
|
2757
|
+
description: "Line height",
|
|
2758
|
+
hiddenFromList: false
|
|
2759
|
+
},
|
|
2760
|
+
"style.fontWeight": {
|
|
2761
|
+
type: "enum",
|
|
2762
|
+
default: "400",
|
|
2763
|
+
description: "Font weight",
|
|
2764
|
+
variants: {
|
|
2765
|
+
"100": {},
|
|
2766
|
+
"200": {},
|
|
2767
|
+
"300": {},
|
|
2768
|
+
"400": {},
|
|
2769
|
+
"500": {},
|
|
2770
|
+
"600": {},
|
|
2771
|
+
"700": {},
|
|
2772
|
+
"800": {},
|
|
2773
|
+
"900": {},
|
|
2774
|
+
normal: {},
|
|
2775
|
+
bold: {}
|
|
2776
|
+
}
|
|
2777
|
+
},
|
|
2778
|
+
"style.fontStyle": {
|
|
2779
|
+
type: "enum",
|
|
2780
|
+
default: "normal",
|
|
2781
|
+
description: "Font style",
|
|
2782
|
+
variants: {
|
|
2783
|
+
normal: {},
|
|
2784
|
+
italic: {},
|
|
2785
|
+
oblique: {}
|
|
2786
|
+
}
|
|
2787
|
+
},
|
|
2788
|
+
"style.textAlign": {
|
|
2789
|
+
type: "enum",
|
|
2790
|
+
default: "left",
|
|
2791
|
+
description: "Text align",
|
|
2792
|
+
variants: {
|
|
2793
|
+
left: {},
|
|
2794
|
+
center: {},
|
|
2795
|
+
right: {},
|
|
2796
|
+
justify: {},
|
|
2797
|
+
start: {},
|
|
2798
|
+
end: {}
|
|
2799
|
+
}
|
|
2800
|
+
},
|
|
2801
|
+
"style.letterSpacing": {
|
|
2802
|
+
type: "number",
|
|
2803
|
+
default: undefined,
|
|
2804
|
+
step: 0.1,
|
|
2805
|
+
description: "Letter spacing",
|
|
2806
|
+
hiddenFromList: false
|
|
2807
|
+
}
|
|
2808
|
+
};
|
|
2738
2809
|
var premountSchema = {
|
|
2739
2810
|
premountFor: {
|
|
2740
2811
|
type: "number",
|
|
@@ -2793,6 +2864,13 @@ var fromField = {
|
|
|
2793
2864
|
step: 1,
|
|
2794
2865
|
hiddenFromList: true
|
|
2795
2866
|
};
|
|
2867
|
+
var trimBeforeField = {
|
|
2868
|
+
type: "number",
|
|
2869
|
+
default: 0,
|
|
2870
|
+
min: 0,
|
|
2871
|
+
step: 1,
|
|
2872
|
+
hiddenFromList: true
|
|
2873
|
+
};
|
|
2796
2874
|
var freezeField = {
|
|
2797
2875
|
type: "number",
|
|
2798
2876
|
default: null,
|
|
@@ -2802,6 +2880,7 @@ var freezeField = {
|
|
|
2802
2880
|
var baseSchema = {
|
|
2803
2881
|
durationInFrames: durationInFramesField,
|
|
2804
2882
|
from: fromField,
|
|
2883
|
+
trimBefore: trimBeforeField,
|
|
2805
2884
|
freeze: freezeField,
|
|
2806
2885
|
hidden: hiddenField,
|
|
2807
2886
|
name: sequenceNameField,
|
|
@@ -2821,6 +2900,7 @@ var sequenceSchema = {
|
|
|
2821
2900
|
};
|
|
2822
2901
|
var baseSchemaWithoutFrom = {
|
|
2823
2902
|
durationInFrames: durationInFramesField,
|
|
2903
|
+
trimBefore: trimBeforeField,
|
|
2824
2904
|
freeze: freezeField,
|
|
2825
2905
|
hidden: hiddenField,
|
|
2826
2906
|
name: sequenceNameField,
|
|
@@ -5035,6 +5115,7 @@ var mergeValues = ({
|
|
|
5035
5115
|
var stackToOverrideMap = {};
|
|
5036
5116
|
var withInteractivitySchema = ({
|
|
5037
5117
|
Component,
|
|
5118
|
+
componentName,
|
|
5038
5119
|
componentIdentity,
|
|
5039
5120
|
schema,
|
|
5040
5121
|
supportsEffects
|
|
@@ -5083,7 +5164,8 @@ var withInteractivitySchema = ({
|
|
|
5083
5164
|
currentRuntimeValueDotNotation,
|
|
5084
5165
|
overrideId,
|
|
5085
5166
|
supportsEffects,
|
|
5086
|
-
componentIdentity
|
|
5167
|
+
componentIdentity,
|
|
5168
|
+
componentName
|
|
5087
5169
|
};
|
|
5088
5170
|
}, [currentRuntimeValueDotNotation, overrideId]);
|
|
5089
5171
|
const { merged: valuesDotNotation, propsToDelete } = useMemo13(() => {
|
|
@@ -5120,6 +5202,7 @@ var withInteractivitySchema = ({
|
|
|
5120
5202
|
var EMPTY_EFFECTS = [];
|
|
5121
5203
|
var RegularSequenceRefForwardingFunction = ({
|
|
5122
5204
|
from = 0,
|
|
5205
|
+
trimBefore = 0,
|
|
5123
5206
|
freeze,
|
|
5124
5207
|
durationInFrames = Infinity,
|
|
5125
5208
|
children,
|
|
@@ -5144,7 +5227,6 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
5144
5227
|
const parentSequence = useContext17(SequenceContext);
|
|
5145
5228
|
const { rootId } = useTimelineContext();
|
|
5146
5229
|
const cumulatedFrom = parentSequence ? parentSequence.cumulatedFrom + parentSequence.relativeFrom : 0;
|
|
5147
|
-
const absoluteFrom = (parentSequence?.absoluteFrom ?? 0) + from;
|
|
5148
5230
|
const nonce = useNonce();
|
|
5149
5231
|
if (layout !== "absolute-fill" && layout !== "none") {
|
|
5150
5232
|
throw new TypeError(`The layout prop of <Sequence /> expects either "absolute-fill" or "none", but you passed: ${layout}`);
|
|
@@ -5164,6 +5246,18 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
5164
5246
|
if (!Number.isFinite(from)) {
|
|
5165
5247
|
throw new TypeError(`The "from" prop of a sequence must be finite, but got ${from}.`);
|
|
5166
5248
|
}
|
|
5249
|
+
if (typeof trimBefore !== "number") {
|
|
5250
|
+
throw new TypeError(`You passed to the "trimBefore" prop of your <Sequence> an argument of type ${typeof trimBefore}, but it must be a number.`);
|
|
5251
|
+
}
|
|
5252
|
+
if (trimBefore < 0) {
|
|
5253
|
+
throw new TypeError(`The "trimBefore" prop of <Sequence /> must be greater than or equal to 0, but got ${trimBefore}.`);
|
|
5254
|
+
}
|
|
5255
|
+
if (Number.isNaN(trimBefore)) {
|
|
5256
|
+
throw new TypeError('The "trimBefore" prop of <Sequence /> must be a real number, but it is NaN.');
|
|
5257
|
+
}
|
|
5258
|
+
if (!Number.isFinite(trimBefore)) {
|
|
5259
|
+
throw new TypeError(`The "trimBefore" prop of <Sequence /> must be finite, but it is ${trimBefore}.`);
|
|
5260
|
+
}
|
|
5167
5261
|
if (typeof freeze !== "undefined" && freeze !== null) {
|
|
5168
5262
|
if (typeof freeze !== "number") {
|
|
5169
5263
|
throw new TypeError(`The "freeze" prop of <Sequence /> must be a number, but is of type ${typeof freeze}.`);
|
|
@@ -5177,7 +5271,9 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
5177
5271
|
}
|
|
5178
5272
|
const absoluteFrame = useTimelinePosition();
|
|
5179
5273
|
const videoConfig = useVideoConfig();
|
|
5180
|
-
const
|
|
5274
|
+
const effectiveRelativeFrom = from - trimBefore;
|
|
5275
|
+
const absoluteFrom = (parentSequence?.absoluteFrom ?? 0) + effectiveRelativeFrom;
|
|
5276
|
+
const parentSequenceDuration = parentSequence ? Math.min(parentSequence.durationInFrames - effectiveRelativeFrom, durationInFrames) : durationInFrames;
|
|
5181
5277
|
const actualDurationInFrames = Math.max(0, Math.min(videoConfig.durationInFrames - from, parentSequenceDuration));
|
|
5182
5278
|
const { registerSequence, unregisterSequence } = useContext17(SequenceManager);
|
|
5183
5279
|
const wrapperRefForOutline = useRef6(null);
|
|
@@ -5188,7 +5284,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
5188
5284
|
const postmounting = useMemo14(() => {
|
|
5189
5285
|
return parentSequence?.postmounting || Boolean(other._remotionInternalIsPostmounting);
|
|
5190
5286
|
}, [other._remotionInternalIsPostmounting, parentSequence?.postmounting]);
|
|
5191
|
-
const currentSequenceStart = cumulatedFrom +
|
|
5287
|
+
const currentSequenceStart = cumulatedFrom + effectiveRelativeFrom;
|
|
5192
5288
|
const parentSequenceStart = parentSequence ? parentSequence.cumulatedFrom + parentSequence.relativeFrom : 0;
|
|
5193
5289
|
const parentFirstFrame = parentSequence ? parentSequenceStart - parentSequence.cumulatedNegativeFrom : 0;
|
|
5194
5290
|
const firstFrame = Math.max(0, parentFirstFrame, currentSequenceStart);
|
|
@@ -5197,7 +5293,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
5197
5293
|
return {
|
|
5198
5294
|
absoluteFrom,
|
|
5199
5295
|
cumulatedFrom,
|
|
5200
|
-
relativeFrom:
|
|
5296
|
+
relativeFrom: effectiveRelativeFrom,
|
|
5201
5297
|
cumulatedNegativeFrom,
|
|
5202
5298
|
durationInFrames: actualDurationInFrames,
|
|
5203
5299
|
parentFrom: parentSequence?.relativeFrom ?? 0,
|
|
@@ -5212,7 +5308,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
5212
5308
|
}, [
|
|
5213
5309
|
cumulatedFrom,
|
|
5214
5310
|
absoluteFrom,
|
|
5215
|
-
|
|
5311
|
+
effectiveRelativeFrom,
|
|
5216
5312
|
actualDurationInFrames,
|
|
5217
5313
|
parentSequence,
|
|
5218
5314
|
id,
|
|
@@ -5234,6 +5330,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
5234
5330
|
const stackRef = useRef6(null);
|
|
5235
5331
|
stackRef.current = stack ?? inheritedStack;
|
|
5236
5332
|
const registeredFrozenFrame = typeof freeze === "number" ? freeze : null;
|
|
5333
|
+
const registeredTrimBefore = trimBefore === 0 ? null : trimBefore;
|
|
5237
5334
|
const parentCumulatedNegativeFrom = parentSequence?.cumulatedNegativeFrom ?? 0;
|
|
5238
5335
|
const startMediaFrom = isMedia && isMedia.type !== "image" ? isMedia.data.startMediaFrom + parentCumulatedNegativeFrom - cumulatedNegativeFrom : null;
|
|
5239
5336
|
const mediaFrameAtSequenceZero = isMedia && isMedia.type !== "image" ? isMedia.data.startMediaFrom + parentCumulatedNegativeFrom : null;
|
|
@@ -5252,6 +5349,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
5252
5349
|
documentationLink: resolvedDocumentationLink,
|
|
5253
5350
|
duration: actualDurationInFrames,
|
|
5254
5351
|
from,
|
|
5352
|
+
trimBefore: registeredTrimBefore,
|
|
5255
5353
|
id,
|
|
5256
5354
|
loopDisplay,
|
|
5257
5355
|
nonce: nonce.get(),
|
|
@@ -5276,6 +5374,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
5276
5374
|
doesVolumeChange: isMedia.data.doesVolumeChange,
|
|
5277
5375
|
duration: actualDurationInFrames,
|
|
5278
5376
|
from,
|
|
5377
|
+
trimBefore: registeredTrimBefore,
|
|
5279
5378
|
id,
|
|
5280
5379
|
loopDisplay,
|
|
5281
5380
|
nonce: nonce.get(),
|
|
@@ -5301,6 +5400,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
5301
5400
|
}
|
|
5302
5401
|
registerSequence({
|
|
5303
5402
|
from,
|
|
5403
|
+
trimBefore: registeredTrimBefore,
|
|
5304
5404
|
duration: actualDurationInFrames,
|
|
5305
5405
|
id,
|
|
5306
5406
|
displayName: timelineClipName,
|
|
@@ -5334,6 +5434,8 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
5334
5434
|
actualDurationInFrames,
|
|
5335
5435
|
rootId,
|
|
5336
5436
|
from,
|
|
5437
|
+
trimBefore,
|
|
5438
|
+
registeredTrimBefore,
|
|
5337
5439
|
showInTimeline,
|
|
5338
5440
|
nonce,
|
|
5339
5441
|
loopDisplay,
|
|
@@ -5465,12 +5567,14 @@ var SequenceInner = forwardRef3(SequenceRefForwardingFunction);
|
|
|
5465
5567
|
var SequenceWithoutSchema = SequenceInner;
|
|
5466
5568
|
var Sequence = withInteractivitySchema({
|
|
5467
5569
|
Component: SequenceInner,
|
|
5570
|
+
componentName: "<Sequence>",
|
|
5468
5571
|
componentIdentity: "dev.remotion.remotion.Sequence",
|
|
5469
5572
|
schema: sequenceSchema,
|
|
5470
5573
|
supportsEffects: false
|
|
5471
5574
|
});
|
|
5472
5575
|
var SequenceWithoutFrom = withInteractivitySchema({
|
|
5473
5576
|
Component: SequenceInner,
|
|
5577
|
+
componentName: "<Sequence>",
|
|
5474
5578
|
componentIdentity: null,
|
|
5475
5579
|
schema: sequenceSchemaWithoutFrom,
|
|
5476
5580
|
supportsEffects: false
|
|
@@ -6207,6 +6311,7 @@ var AnimatedImageInner = ({
|
|
|
6207
6311
|
};
|
|
6208
6312
|
var AnimatedImage = withInteractivitySchema({
|
|
6209
6313
|
Component: AnimatedImageInner,
|
|
6314
|
+
componentName: "<AnimatedImage>",
|
|
6210
6315
|
componentIdentity: "dev.remotion.remotion.AnimatedImage",
|
|
6211
6316
|
schema: animatedImageSchema,
|
|
6212
6317
|
supportsEffects: true
|
|
@@ -6598,13 +6703,15 @@ var prefetch = (src, options) => {
|
|
|
6598
6703
|
resolve = res;
|
|
6599
6704
|
reject = rej;
|
|
6600
6705
|
});
|
|
6706
|
+
waitUntilDone.catch(() => {
|
|
6707
|
+
return;
|
|
6708
|
+
});
|
|
6601
6709
|
const controller = new AbortController;
|
|
6602
|
-
let
|
|
6710
|
+
let reader = null;
|
|
6603
6711
|
fetch(srcWithoutHash, {
|
|
6604
6712
|
signal: controller.signal,
|
|
6605
6713
|
credentials: options?.credentials ?? undefined
|
|
6606
6714
|
}).then((res) => {
|
|
6607
|
-
canBeAborted = false;
|
|
6608
6715
|
if (canceled) {
|
|
6609
6716
|
return null;
|
|
6610
6717
|
}
|
|
@@ -6620,15 +6727,16 @@ var prefetch = (src, options) => {
|
|
|
6620
6727
|
if (!res.body) {
|
|
6621
6728
|
throw new Error(`HTTP response of ${srcWithoutHash} has no body`);
|
|
6622
6729
|
}
|
|
6623
|
-
const
|
|
6730
|
+
const responseReader = res.body.getReader();
|
|
6731
|
+
reader = responseReader;
|
|
6624
6732
|
return getBlobFromReader({
|
|
6625
|
-
reader,
|
|
6733
|
+
reader: responseReader,
|
|
6626
6734
|
contentType: options?.contentType ?? headerContentType ?? null,
|
|
6627
6735
|
contentLength: res.headers.get("Content-Length") ? parseInt(res.headers.get("Content-Length"), 10) : null,
|
|
6628
6736
|
onProgress: options?.onProgress
|
|
6629
6737
|
});
|
|
6630
6738
|
}).then((buf) => {
|
|
6631
|
-
if (!buf) {
|
|
6739
|
+
if (!buf || canceled) {
|
|
6632
6740
|
return;
|
|
6633
6741
|
}
|
|
6634
6742
|
const actualBlob = options?.contentType ? new Blob([buf], { type: options.contentType }) : buf;
|
|
@@ -6676,12 +6784,18 @@ var prefetch = (src, options) => {
|
|
|
6676
6784
|
return copy;
|
|
6677
6785
|
});
|
|
6678
6786
|
} else {
|
|
6679
|
-
canceled
|
|
6680
|
-
|
|
6681
|
-
try {
|
|
6682
|
-
controller.abort(new Error("free() called"));
|
|
6683
|
-
} catch {}
|
|
6787
|
+
if (canceled) {
|
|
6788
|
+
return;
|
|
6684
6789
|
}
|
|
6790
|
+
canceled = true;
|
|
6791
|
+
const cancellationError = new Error("free() called");
|
|
6792
|
+
reject(cancellationError);
|
|
6793
|
+
try {
|
|
6794
|
+
controller.abort(cancellationError);
|
|
6795
|
+
} catch {}
|
|
6796
|
+
reader?.cancel(cancellationError).catch(() => {
|
|
6797
|
+
return;
|
|
6798
|
+
});
|
|
6685
6799
|
}
|
|
6686
6800
|
},
|
|
6687
6801
|
waitUntilDone: () => {
|
|
@@ -7853,6 +7967,7 @@ var useMediaInTimeline = ({
|
|
|
7853
7967
|
id,
|
|
7854
7968
|
duration,
|
|
7855
7969
|
from: 0,
|
|
7970
|
+
trimBefore: null,
|
|
7856
7971
|
parent: parentSequence?.id ?? null,
|
|
7857
7972
|
displayName: finalDisplayName,
|
|
7858
7973
|
documentationLink,
|
|
@@ -8715,11 +8830,11 @@ var useMediaTag = ({
|
|
|
8715
8830
|
]);
|
|
8716
8831
|
};
|
|
8717
8832
|
var MediaVolumeContext = createContext22({
|
|
8718
|
-
|
|
8833
|
+
playerMuted: false,
|
|
8719
8834
|
mediaVolume: 1
|
|
8720
8835
|
});
|
|
8721
8836
|
var SetMediaVolumeContext = createContext22({
|
|
8722
|
-
|
|
8837
|
+
setPlayerMuted: () => {
|
|
8723
8838
|
throw new Error("default");
|
|
8724
8839
|
},
|
|
8725
8840
|
setMediaVolume: () => {
|
|
@@ -8733,12 +8848,12 @@ var useMediaVolumeState = () => {
|
|
|
8733
8848
|
return [mediaVolume, setMediaVolume];
|
|
8734
8849
|
}, [mediaVolume, setMediaVolume]);
|
|
8735
8850
|
};
|
|
8736
|
-
var
|
|
8737
|
-
const {
|
|
8738
|
-
const {
|
|
8851
|
+
var usePlayerMutedState = () => {
|
|
8852
|
+
const { playerMuted } = useContext27(MediaVolumeContext);
|
|
8853
|
+
const { setPlayerMuted } = useContext27(SetMediaVolumeContext);
|
|
8739
8854
|
return useMemo26(() => {
|
|
8740
|
-
return [
|
|
8741
|
-
}, [
|
|
8855
|
+
return [playerMuted, setPlayerMuted];
|
|
8856
|
+
}, [playerMuted, setPlayerMuted]);
|
|
8742
8857
|
};
|
|
8743
8858
|
var warnAboutTooHighVolume = (volume) => {
|
|
8744
8859
|
if (volume >= 100) {
|
|
@@ -8784,7 +8899,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
|
|
|
8784
8899
|
throw new Error("typecheck error");
|
|
8785
8900
|
}
|
|
8786
8901
|
const [mediaVolume] = useMediaVolumeState();
|
|
8787
|
-
const [
|
|
8902
|
+
const [playerMuted] = usePlayerMutedState();
|
|
8788
8903
|
const volumePropFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
|
|
8789
8904
|
if (!src) {
|
|
8790
8905
|
throw new TypeError("No 'src' was passed to <Html5Audio>.");
|
|
@@ -8805,7 +8920,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
|
|
|
8805
8920
|
});
|
|
8806
8921
|
const propsToPass = useMemo27(() => {
|
|
8807
8922
|
return {
|
|
8808
|
-
muted: muted ||
|
|
8923
|
+
muted: muted || playerMuted || userPreferredVolume <= 0,
|
|
8809
8924
|
src: preloadedSrc,
|
|
8810
8925
|
loop: _remotionInternalNativeLoopPassed,
|
|
8811
8926
|
crossOrigin: crossOriginValue,
|
|
@@ -8813,7 +8928,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
|
|
|
8813
8928
|
};
|
|
8814
8929
|
}, [
|
|
8815
8930
|
_remotionInternalNativeLoopPassed,
|
|
8816
|
-
|
|
8931
|
+
playerMuted,
|
|
8817
8932
|
muted,
|
|
8818
8933
|
nativeProps,
|
|
8819
8934
|
preloadedSrc,
|
|
@@ -9210,6 +9325,15 @@ var solidSchema = {
|
|
|
9210
9325
|
description: "Height",
|
|
9211
9326
|
hiddenFromList: false
|
|
9212
9327
|
},
|
|
9328
|
+
pixelDensity: {
|
|
9329
|
+
type: "number",
|
|
9330
|
+
min: 1,
|
|
9331
|
+
max: 3,
|
|
9332
|
+
step: 0.1,
|
|
9333
|
+
default: 1,
|
|
9334
|
+
description: "Pixel density",
|
|
9335
|
+
hiddenFromList: false
|
|
9336
|
+
},
|
|
9213
9337
|
...transformSchema
|
|
9214
9338
|
};
|
|
9215
9339
|
var SolidInner = ({
|
|
@@ -9326,6 +9450,7 @@ var SolidOuter = forwardRef8(({
|
|
|
9326
9450
|
style,
|
|
9327
9451
|
name,
|
|
9328
9452
|
from,
|
|
9453
|
+
trimBefore,
|
|
9329
9454
|
freeze,
|
|
9330
9455
|
hidden,
|
|
9331
9456
|
showInTimeline,
|
|
@@ -9340,6 +9465,7 @@ var SolidOuter = forwardRef8(({
|
|
|
9340
9465
|
return /* @__PURE__ */ jsx24(Sequence, {
|
|
9341
9466
|
layout: "none",
|
|
9342
9467
|
from,
|
|
9468
|
+
trimBefore,
|
|
9343
9469
|
freeze,
|
|
9344
9470
|
hidden,
|
|
9345
9471
|
showInTimeline,
|
|
@@ -9365,6 +9491,7 @@ var SolidOuter = forwardRef8(({
|
|
|
9365
9491
|
});
|
|
9366
9492
|
var Solid = withInteractivitySchema({
|
|
9367
9493
|
Component: SolidOuter,
|
|
9494
|
+
componentName: "<Solid>",
|
|
9368
9495
|
componentIdentity: "dev.remotion.remotion.Solid",
|
|
9369
9496
|
schema: solidSchema,
|
|
9370
9497
|
supportsEffects: true
|
|
@@ -9496,10 +9623,6 @@ var HtmlInCanvasContent = forwardRef9(({
|
|
|
9496
9623
|
if (!placeholderCanvas) {
|
|
9497
9624
|
throw new Error("Canvas not found");
|
|
9498
9625
|
}
|
|
9499
|
-
const offscreen2d = offscreen.getContext("2d");
|
|
9500
|
-
if (!offscreen2d) {
|
|
9501
|
-
throw new Error("Failed to acquire 2D context for <HtmlInCanvas> offscreen canvas");
|
|
9502
|
-
}
|
|
9503
9626
|
const handle = delayRender("onPaint");
|
|
9504
9627
|
if (!initializedRef.current) {
|
|
9505
9628
|
initializedRef.current = true;
|
|
@@ -9684,10 +9807,20 @@ var HtmlInCanvasInner = forwardRef9(({
|
|
|
9684
9807
|
HtmlInCanvasInner.displayName = "HtmlInCanvas";
|
|
9685
9808
|
var htmlInCanvasSchema = {
|
|
9686
9809
|
...baseSchema,
|
|
9810
|
+
pixelDensity: {
|
|
9811
|
+
type: "number",
|
|
9812
|
+
min: 1,
|
|
9813
|
+
max: 3,
|
|
9814
|
+
step: 0.1,
|
|
9815
|
+
default: 1,
|
|
9816
|
+
description: "Pixel density",
|
|
9817
|
+
hiddenFromList: false
|
|
9818
|
+
},
|
|
9687
9819
|
...transformSchema
|
|
9688
9820
|
};
|
|
9689
9821
|
var HtmlInCanvasWrapped = withInteractivitySchema({
|
|
9690
9822
|
Component: HtmlInCanvasInner,
|
|
9823
|
+
componentName: "<HtmlInCanvas>",
|
|
9691
9824
|
componentIdentity: "dev.remotion.remotion.HtmlInCanvas",
|
|
9692
9825
|
schema: htmlInCanvasSchema,
|
|
9693
9826
|
supportsEffects: true
|
|
@@ -10000,6 +10133,7 @@ var CanvasImageInner = forwardRef10(({
|
|
|
10000
10133
|
delayRenderTimeoutInMilliseconds,
|
|
10001
10134
|
durationInFrames,
|
|
10002
10135
|
from,
|
|
10136
|
+
trimBefore,
|
|
10003
10137
|
freeze,
|
|
10004
10138
|
hidden,
|
|
10005
10139
|
name,
|
|
@@ -10021,6 +10155,7 @@ var CanvasImageInner = forwardRef10(({
|
|
|
10021
10155
|
return /* @__PURE__ */ jsx26(Sequence, {
|
|
10022
10156
|
layout: "none",
|
|
10023
10157
|
from: from ?? 0,
|
|
10158
|
+
trimBefore,
|
|
10024
10159
|
durationInFrames: durationInFrames ?? Infinity,
|
|
10025
10160
|
freeze,
|
|
10026
10161
|
hidden,
|
|
@@ -10055,6 +10190,7 @@ var CanvasImageInner = forwardRef10(({
|
|
|
10055
10190
|
});
|
|
10056
10191
|
var CanvasImage = withInteractivitySchema({
|
|
10057
10192
|
Component: CanvasImageInner,
|
|
10193
|
+
componentName: "<CanvasImage>",
|
|
10058
10194
|
componentIdentity: "dev.remotion.remotion.CanvasImage",
|
|
10059
10195
|
schema: canvasImageSchema,
|
|
10060
10196
|
supportsEffects: true
|
|
@@ -10256,6 +10392,7 @@ var NativeImgInner = ({
|
|
|
10256
10392
|
showInTimeline,
|
|
10257
10393
|
src,
|
|
10258
10394
|
from,
|
|
10395
|
+
trimBefore,
|
|
10259
10396
|
durationInFrames,
|
|
10260
10397
|
freeze,
|
|
10261
10398
|
controls,
|
|
@@ -10268,6 +10405,7 @@ var NativeImgInner = ({
|
|
|
10268
10405
|
return /* @__PURE__ */ jsx28(Sequence, {
|
|
10269
10406
|
layout: "none",
|
|
10270
10407
|
from: from ?? 0,
|
|
10408
|
+
trimBefore,
|
|
10271
10409
|
durationInFrames: durationInFrames ?? Infinity,
|
|
10272
10410
|
freeze,
|
|
10273
10411
|
_remotionInternalStack: stack,
|
|
@@ -10341,6 +10479,7 @@ var ImgInner = ({
|
|
|
10341
10479
|
showInTimeline,
|
|
10342
10480
|
src,
|
|
10343
10481
|
from,
|
|
10482
|
+
trimBefore,
|
|
10344
10483
|
durationInFrames,
|
|
10345
10484
|
freeze,
|
|
10346
10485
|
controls,
|
|
@@ -10366,6 +10505,7 @@ var ImgInner = ({
|
|
|
10366
10505
|
showInTimeline,
|
|
10367
10506
|
src,
|
|
10368
10507
|
from,
|
|
10508
|
+
trimBefore,
|
|
10369
10509
|
durationInFrames,
|
|
10370
10510
|
freeze,
|
|
10371
10511
|
controls,
|
|
@@ -10408,6 +10548,7 @@ var ImgInner = ({
|
|
|
10408
10548
|
delayRenderRetries,
|
|
10409
10549
|
delayRenderTimeoutInMilliseconds,
|
|
10410
10550
|
from,
|
|
10551
|
+
trimBefore,
|
|
10411
10552
|
durationInFrames,
|
|
10412
10553
|
freeze,
|
|
10413
10554
|
hidden,
|
|
@@ -10422,6 +10563,7 @@ var ImgInner = ({
|
|
|
10422
10563
|
};
|
|
10423
10564
|
var Img = withInteractivitySchema({
|
|
10424
10565
|
Component: ImgInner,
|
|
10566
|
+
componentName: "<Img>",
|
|
10425
10567
|
componentIdentity: "dev.remotion.remotion.Img",
|
|
10426
10568
|
schema: imgSchema,
|
|
10427
10569
|
supportsEffects: true
|
|
@@ -10429,7 +10571,8 @@ var Img = withInteractivitySchema({
|
|
|
10429
10571
|
addSequenceStackTraces(Img);
|
|
10430
10572
|
var interactiveElementSchema = {
|
|
10431
10573
|
...baseSchema,
|
|
10432
|
-
...transformSchema
|
|
10574
|
+
...transformSchema,
|
|
10575
|
+
...textSchema
|
|
10433
10576
|
};
|
|
10434
10577
|
var setRef = (ref, value) => {
|
|
10435
10578
|
if (typeof ref === "function") {
|
|
@@ -10443,6 +10586,7 @@ var makeInteractiveElement = (tag, displayName) => {
|
|
|
10443
10586
|
const {
|
|
10444
10587
|
durationInFrames,
|
|
10445
10588
|
from,
|
|
10589
|
+
trimBefore,
|
|
10446
10590
|
freeze,
|
|
10447
10591
|
hidden,
|
|
10448
10592
|
name,
|
|
@@ -10459,6 +10603,7 @@ var makeInteractiveElement = (tag, displayName) => {
|
|
|
10459
10603
|
return /* @__PURE__ */ jsx29(Sequence, {
|
|
10460
10604
|
layout: "none",
|
|
10461
10605
|
from: from ?? 0,
|
|
10606
|
+
trimBefore,
|
|
10462
10607
|
durationInFrames: durationInFrames ?? Infinity,
|
|
10463
10608
|
freeze,
|
|
10464
10609
|
hidden,
|
|
@@ -10477,6 +10622,7 @@ var makeInteractiveElement = (tag, displayName) => {
|
|
|
10477
10622
|
Inner.displayName = displayName;
|
|
10478
10623
|
const Wrapped = withInteractivitySchema({
|
|
10479
10624
|
Component: Inner,
|
|
10625
|
+
componentName: displayName,
|
|
10480
10626
|
componentIdentity: `dev.remotion.remotion.${displayName.slice(1, -1)}`,
|
|
10481
10627
|
schema: interactiveElementSchema,
|
|
10482
10628
|
supportsEffects: false
|
|
@@ -10488,6 +10634,7 @@ var makeInteractiveElement = (tag, displayName) => {
|
|
|
10488
10634
|
var Interactive = {
|
|
10489
10635
|
baseSchema,
|
|
10490
10636
|
transformSchema,
|
|
10637
|
+
textSchema,
|
|
10491
10638
|
premountSchema,
|
|
10492
10639
|
sequenceSchema,
|
|
10493
10640
|
withSchema: withInteractivitySchema,
|
|
@@ -11317,7 +11464,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
11317
11464
|
throw new Error("acceptableTimeShift has been removed. Use acceptableTimeShiftInSeconds instead.");
|
|
11318
11465
|
}
|
|
11319
11466
|
const [mediaVolume] = useMediaVolumeState();
|
|
11320
|
-
const [
|
|
11467
|
+
const [playerMuted] = usePlayerMutedState();
|
|
11321
11468
|
const userPreferredVolume = evaluateVolume({
|
|
11322
11469
|
frame: volumePropFrame,
|
|
11323
11470
|
volume,
|
|
@@ -11473,7 +11620,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
11473
11620
|
return /* @__PURE__ */ jsx34("video", {
|
|
11474
11621
|
...nativeProps,
|
|
11475
11622
|
ref: videoRef,
|
|
11476
|
-
muted: muted ||
|
|
11623
|
+
muted: muted || playerMuted || userPreferredVolume <= 0,
|
|
11477
11624
|
playsInline: true,
|
|
11478
11625
|
src: actualSrc,
|
|
11479
11626
|
loop: _remotionInternalNativeLoopPassed,
|
|
@@ -11764,6 +11911,7 @@ var Internals = {
|
|
|
11764
11911
|
sequenceStyleSchema,
|
|
11765
11912
|
sequenceVisualStyleSchema,
|
|
11766
11913
|
sequencePremountSchema,
|
|
11914
|
+
textSchema,
|
|
11767
11915
|
transformSchema,
|
|
11768
11916
|
premountSchema,
|
|
11769
11917
|
flattenActiveSchema,
|
|
@@ -11773,7 +11921,7 @@ var Internals = {
|
|
|
11773
11921
|
useVideo,
|
|
11774
11922
|
getRoot,
|
|
11775
11923
|
useMediaVolumeState,
|
|
11776
|
-
|
|
11924
|
+
usePlayerMutedState,
|
|
11777
11925
|
useMediaInTimeline,
|
|
11778
11926
|
useLazyComponent,
|
|
11779
11927
|
truthy,
|
|
@@ -11967,6 +12115,7 @@ var SeriesInner = (props2) => {
|
|
|
11967
12115
|
};
|
|
11968
12116
|
var Series = Object.assign(withInteractivitySchema({
|
|
11969
12117
|
Component: SeriesInner,
|
|
12118
|
+
componentName: "<Series>",
|
|
11970
12119
|
componentIdentity: "dev.remotion.remotion.Series",
|
|
11971
12120
|
schema: sequenceSchemaDefaultLayoutNone,
|
|
11972
12121
|
supportsEffects: false
|
|
@@ -17261,6 +17410,7 @@ var RenderSvg = ({
|
|
|
17261
17410
|
pixelDensity,
|
|
17262
17411
|
durationInFrames,
|
|
17263
17412
|
from,
|
|
17413
|
+
trimBefore,
|
|
17264
17414
|
freeze,
|
|
17265
17415
|
hidden,
|
|
17266
17416
|
name,
|
|
@@ -17370,6 +17520,7 @@ var RenderSvg = ({
|
|
|
17370
17520
|
return /* @__PURE__ */ jsx44(Sequence, {
|
|
17371
17521
|
layout: "none",
|
|
17372
17522
|
from,
|
|
17523
|
+
trimBefore,
|
|
17373
17524
|
freeze,
|
|
17374
17525
|
hidden,
|
|
17375
17526
|
showInTimeline,
|
|
@@ -17501,6 +17652,7 @@ var ArrowInner = ({
|
|
|
17501
17652
|
};
|
|
17502
17653
|
var Arrow = Interactive.withSchema({
|
|
17503
17654
|
Component: ArrowInner,
|
|
17655
|
+
componentName: "<Arrow>",
|
|
17504
17656
|
componentIdentity: "dev.remotion.shapes.Arrow",
|
|
17505
17657
|
schema: arrowSchema,
|
|
17506
17658
|
supportsEffects: true
|
|
@@ -17925,6 +18077,7 @@ var CalloutInner = ({
|
|
|
17925
18077
|
};
|
|
17926
18078
|
var Callout = Interactive.withSchema({
|
|
17927
18079
|
Component: CalloutInner,
|
|
18080
|
+
componentName: "<Callout>",
|
|
17928
18081
|
componentIdentity: "dev.remotion.shapes.Callout",
|
|
17929
18082
|
schema: calloutSchema,
|
|
17930
18083
|
supportsEffects: true
|
|
@@ -17987,6 +18140,7 @@ var CircleInner = ({ radius, ...props }) => {
|
|
|
17987
18140
|
};
|
|
17988
18141
|
var Circle = Interactive.withSchema({
|
|
17989
18142
|
Component: CircleInner,
|
|
18143
|
+
componentName: "<Circle>",
|
|
17990
18144
|
componentIdentity: "dev.remotion.shapes.Circle",
|
|
17991
18145
|
schema: circleSchema,
|
|
17992
18146
|
supportsEffects: true
|
|
@@ -18044,6 +18198,7 @@ var EllipseInner = ({ rx, ry, ...props }) => {
|
|
|
18044
18198
|
};
|
|
18045
18199
|
var Ellipse = Interactive.withSchema({
|
|
18046
18200
|
Component: EllipseInner,
|
|
18201
|
+
componentName: "<Ellipse>",
|
|
18047
18202
|
componentIdentity: "dev.remotion.shapes.Ellipse",
|
|
18048
18203
|
schema: ellipseSchema,
|
|
18049
18204
|
supportsEffects: true
|
|
@@ -18182,6 +18337,7 @@ var HeartInner = ({
|
|
|
18182
18337
|
};
|
|
18183
18338
|
var Heart = Interactive.withSchema({
|
|
18184
18339
|
Component: HeartInner,
|
|
18340
|
+
componentName: "<Heart>",
|
|
18185
18341
|
componentIdentity: "dev.remotion.shapes.Heart",
|
|
18186
18342
|
schema: heartSchema,
|
|
18187
18343
|
supportsEffects: true
|
|
@@ -18336,6 +18492,7 @@ var PieInner = ({
|
|
|
18336
18492
|
};
|
|
18337
18493
|
var Pie = Interactive.withSchema({
|
|
18338
18494
|
Component: PieInner,
|
|
18495
|
+
componentName: "<Pie>",
|
|
18339
18496
|
componentIdentity: "dev.remotion.shapes.Pie",
|
|
18340
18497
|
schema: pieSchema,
|
|
18341
18498
|
supportsEffects: true
|
|
@@ -18435,6 +18592,7 @@ var PolygonInner = ({
|
|
|
18435
18592
|
};
|
|
18436
18593
|
var Polygon = Interactive.withSchema({
|
|
18437
18594
|
Component: PolygonInner,
|
|
18595
|
+
componentName: "<Polygon>",
|
|
18438
18596
|
componentIdentity: "dev.remotion.shapes.Polygon",
|
|
18439
18597
|
schema: polygonSchema,
|
|
18440
18598
|
supportsEffects: true
|
|
@@ -18501,6 +18659,7 @@ var RectInner = ({
|
|
|
18501
18659
|
};
|
|
18502
18660
|
var Rect = Interactive.withSchema({
|
|
18503
18661
|
Component: RectInner,
|
|
18662
|
+
componentName: "<Rect>",
|
|
18504
18663
|
componentIdentity: "dev.remotion.shapes.Rect",
|
|
18505
18664
|
schema: rectSchema,
|
|
18506
18665
|
supportsEffects: true
|
|
@@ -18712,6 +18871,7 @@ var SparkInner = ({
|
|
|
18712
18871
|
};
|
|
18713
18872
|
var Spark = Interactive.withSchema({
|
|
18714
18873
|
Component: SparkInner,
|
|
18874
|
+
componentName: "<Spark>",
|
|
18715
18875
|
componentIdentity: "dev.remotion.shapes.Spark",
|
|
18716
18876
|
schema: sparkSchema,
|
|
18717
18877
|
supportsEffects: true
|
|
@@ -18822,6 +18982,7 @@ var StarInner = ({
|
|
|
18822
18982
|
};
|
|
18823
18983
|
var Star = Interactive.withSchema({
|
|
18824
18984
|
Component: StarInner,
|
|
18985
|
+
componentName: "<Star>",
|
|
18825
18986
|
componentIdentity: "dev.remotion.shapes.Star",
|
|
18826
18987
|
schema: starSchema,
|
|
18827
18988
|
supportsEffects: true
|
|
@@ -18928,6 +19089,7 @@ var TriangleInner = ({
|
|
|
18928
19089
|
};
|
|
18929
19090
|
var Triangle = Interactive.withSchema({
|
|
18930
19091
|
Component: TriangleInner,
|
|
19092
|
+
componentName: "<Triangle>",
|
|
18931
19093
|
componentIdentity: "dev.remotion.shapes.Triangle",
|
|
18932
19094
|
schema: triangleSchema,
|
|
18933
19095
|
supportsEffects: true
|
|
@@ -30142,6 +30304,13 @@ var fromField2 = {
|
|
|
30142
30304
|
step: 1,
|
|
30143
30305
|
hiddenFromList: true
|
|
30144
30306
|
};
|
|
30307
|
+
var trimBeforeField2 = {
|
|
30308
|
+
type: "number",
|
|
30309
|
+
default: 0,
|
|
30310
|
+
min: 0,
|
|
30311
|
+
step: 1,
|
|
30312
|
+
hiddenFromList: true
|
|
30313
|
+
};
|
|
30145
30314
|
var freezeField2 = {
|
|
30146
30315
|
type: "number",
|
|
30147
30316
|
default: null,
|
|
@@ -30151,6 +30320,7 @@ var freezeField2 = {
|
|
|
30151
30320
|
var baseSchema2 = {
|
|
30152
30321
|
durationInFrames: durationInFramesField2,
|
|
30153
30322
|
from: fromField2,
|
|
30323
|
+
trimBefore: trimBeforeField2,
|
|
30154
30324
|
freeze: freezeField2,
|
|
30155
30325
|
hidden: hiddenField2,
|
|
30156
30326
|
name: sequenceNameField2,
|
|
@@ -30170,6 +30340,7 @@ var sequenceSchema2 = {
|
|
|
30170
30340
|
};
|
|
30171
30341
|
var baseSchemaWithoutFrom2 = {
|
|
30172
30342
|
durationInFrames: durationInFramesField2,
|
|
30343
|
+
trimBefore: trimBeforeField2,
|
|
30173
30344
|
freeze: freezeField2,
|
|
30174
30345
|
hidden: hiddenField2,
|
|
30175
30346
|
name: sequenceNameField2,
|
|
@@ -32358,7 +32529,7 @@ var renderDefaultVolumeSlider = (props) => {
|
|
|
32358
32529
|
};
|
|
32359
32530
|
var VOLUME_SLIDER_WIDTH = 100;
|
|
32360
32531
|
var MediaVolumeSlider = ({ displayVerticalVolumeSlider, renderMuteButton, renderVolumeSlider }) => {
|
|
32361
|
-
const [
|
|
32532
|
+
const [playerMuted, setPlayerMuted] = Internals.usePlayerMutedState();
|
|
32362
32533
|
const [mediaVolume, setMediaVolume] = Internals.useMediaVolumeState();
|
|
32363
32534
|
const [focused, setFocused] = useState62(false);
|
|
32364
32535
|
const parentDivRef = useRef52(null);
|
|
@@ -32375,11 +32546,11 @@ var MediaVolumeSlider = ({ displayVerticalVolumeSlider, renderMuteButton, render
|
|
|
32375
32546
|
const onClick = useCallback42(() => {
|
|
32376
32547
|
if (isVolume0) {
|
|
32377
32548
|
setMediaVolume(1);
|
|
32378
|
-
|
|
32549
|
+
setPlayerMuted(false);
|
|
32379
32550
|
return;
|
|
32380
32551
|
}
|
|
32381
|
-
|
|
32382
|
-
}, [isVolume0,
|
|
32552
|
+
setPlayerMuted((mute) => !mute);
|
|
32553
|
+
}, [isVolume0, setPlayerMuted, setMediaVolume]);
|
|
32383
32554
|
const parentDivStyle = useMemo410(() => {
|
|
32384
32555
|
return {
|
|
32385
32556
|
display: "inline-flex",
|
|
@@ -32417,10 +32588,10 @@ var MediaVolumeSlider = ({ displayVerticalVolumeSlider, renderMuteButton, render
|
|
|
32417
32588
|
});
|
|
32418
32589
|
}, [onBlur, onClick, volumeContainer]);
|
|
32419
32590
|
const muteButton = useMemo410(() => {
|
|
32420
|
-
return renderMuteButton ? renderMuteButton({ muted:
|
|
32421
|
-
}, [
|
|
32591
|
+
return renderMuteButton ? renderMuteButton({ muted: playerMuted, volume: mediaVolume }) : renderDefaultMuteButton({ muted: playerMuted, volume: mediaVolume });
|
|
32592
|
+
}, [playerMuted, mediaVolume, renderDefaultMuteButton, renderMuteButton]);
|
|
32422
32593
|
const volumeSlider = useMemo410(() => {
|
|
32423
|
-
return (focused || hover) && !
|
|
32594
|
+
return (focused || hover) && !playerMuted && !Internals.isIosSafari() ? (renderVolumeSlider ?? renderDefaultVolumeSlider)({
|
|
32424
32595
|
isVertical: displayVerticalVolumeSlider,
|
|
32425
32596
|
volume: mediaVolume,
|
|
32426
32597
|
onBlur: () => setFocused(false),
|
|
@@ -32431,7 +32602,7 @@ var MediaVolumeSlider = ({ displayVerticalVolumeSlider, renderMuteButton, render
|
|
|
32431
32602
|
displayVerticalVolumeSlider,
|
|
32432
32603
|
focused,
|
|
32433
32604
|
hover,
|
|
32434
|
-
|
|
32605
|
+
playerMuted,
|
|
32435
32606
|
mediaVolume,
|
|
32436
32607
|
renderVolumeSlider,
|
|
32437
32608
|
setMediaVolume
|
|
@@ -33304,11 +33475,11 @@ var PlayerUI = ({
|
|
|
33304
33475
|
}, []);
|
|
33305
33476
|
const player = usePlayer();
|
|
33306
33477
|
const playerToggle = player.toggle;
|
|
33307
|
-
const {
|
|
33478
|
+
const { playerMuted, mediaVolume } = useContext52(Internals.MediaVolumeContext);
|
|
33308
33479
|
useEffect122(() => {
|
|
33309
33480
|
player.emitter.dispatchVolumeChange(mediaVolume);
|
|
33310
33481
|
}, [player.emitter, mediaVolume]);
|
|
33311
|
-
const isMuted =
|
|
33482
|
+
const isMuted = playerMuted || mediaVolume === 0;
|
|
33312
33483
|
useEffect122(() => {
|
|
33313
33484
|
player.emitter.dispatchMuteChange({
|
|
33314
33485
|
isMuted
|
|
@@ -33417,7 +33588,7 @@ var PlayerUI = ({
|
|
|
33417
33588
|
}
|
|
33418
33589
|
player.emitter.dispatchScaleChange(scale);
|
|
33419
33590
|
}, [player.emitter, scale]);
|
|
33420
|
-
const { setMediaVolume,
|
|
33591
|
+
const { setMediaVolume, setPlayerMuted } = useContext52(Internals.SetMediaVolumeContext);
|
|
33421
33592
|
const [showBufferIndicator, setShowBufferState] = useState113(false);
|
|
33422
33593
|
useEffect122(() => {
|
|
33423
33594
|
let timeout = null;
|
|
@@ -33491,7 +33662,7 @@ var PlayerUI = ({
|
|
|
33491
33662
|
requestFullscreen,
|
|
33492
33663
|
exitFullscreen,
|
|
33493
33664
|
getVolume: () => {
|
|
33494
|
-
if (
|
|
33665
|
+
if (playerMuted) {
|
|
33495
33666
|
return 0;
|
|
33496
33667
|
}
|
|
33497
33668
|
return mediaVolume;
|
|
@@ -33510,10 +33681,10 @@ var PlayerUI = ({
|
|
|
33510
33681
|
},
|
|
33511
33682
|
isMuted: () => isMuted,
|
|
33512
33683
|
mute: () => {
|
|
33513
|
-
|
|
33684
|
+
setPlayerMuted(true);
|
|
33514
33685
|
},
|
|
33515
33686
|
unmute: () => {
|
|
33516
|
-
|
|
33687
|
+
setPlayerMuted(false);
|
|
33517
33688
|
},
|
|
33518
33689
|
getScale: () => scale,
|
|
33519
33690
|
pauseAndReturnToPlayStart: () => {
|
|
@@ -33525,12 +33696,12 @@ var PlayerUI = ({
|
|
|
33525
33696
|
durationInFrames,
|
|
33526
33697
|
exitFullscreen,
|
|
33527
33698
|
loop,
|
|
33528
|
-
|
|
33699
|
+
playerMuted,
|
|
33529
33700
|
isMuted,
|
|
33530
33701
|
mediaVolume,
|
|
33531
33702
|
player,
|
|
33532
33703
|
requestFullscreen,
|
|
33533
|
-
|
|
33704
|
+
setPlayerMuted,
|
|
33534
33705
|
setMediaVolume,
|
|
33535
33706
|
toggle,
|
|
33536
33707
|
scale
|
|
@@ -33809,14 +33980,15 @@ var SharedPlayerContexts = ({
|
|
|
33809
33980
|
fps,
|
|
33810
33981
|
inputProps
|
|
33811
33982
|
]);
|
|
33812
|
-
const [
|
|
33983
|
+
const [playerMuted, setPlayerMuted] = useState122(() => initiallyMuted);
|
|
33813
33984
|
const [mediaVolume, setMediaVolume] = useState122(() => persistVolumeToStorage ? getPreferredVolume(volumePersistenceKey ?? null) : initialVolume);
|
|
33814
33985
|
const mediaVolumeContextValue = useMemo132(() => {
|
|
33815
33986
|
return {
|
|
33816
|
-
|
|
33987
|
+
playerMuted,
|
|
33817
33988
|
mediaVolume
|
|
33818
33989
|
};
|
|
33819
|
-
}, [
|
|
33990
|
+
}, [playerMuted, mediaVolume]);
|
|
33991
|
+
const shouldCreateAudioContext = audioEnabled && !playerMuted && mediaVolume > 0;
|
|
33820
33992
|
const setMediaVolumeAndPersist = useCallback112((vol) => {
|
|
33821
33993
|
setMediaVolume(vol);
|
|
33822
33994
|
if (persistVolumeToStorage) {
|
|
@@ -33825,7 +33997,7 @@ var SharedPlayerContexts = ({
|
|
|
33825
33997
|
}, [persistVolumeToStorage, logLevel, volumePersistenceKey]);
|
|
33826
33998
|
const setMediaVolumeContextValue = useMemo132(() => {
|
|
33827
33999
|
return {
|
|
33828
|
-
|
|
34000
|
+
setPlayerMuted,
|
|
33829
34001
|
setMediaVolume: setMediaVolumeAndPersist
|
|
33830
34002
|
};
|
|
33831
34003
|
}, [setMediaVolumeAndPersist]);
|
|
@@ -33866,7 +34038,7 @@ var SharedPlayerContexts = ({
|
|
|
33866
34038
|
children: /* @__PURE__ */ jsx133(Internals.BufferingProvider, {
|
|
33867
34039
|
children: /* @__PURE__ */ jsx133(Internals.SharedAudioContextProvider, {
|
|
33868
34040
|
audioLatencyHint,
|
|
33869
|
-
audioEnabled,
|
|
34041
|
+
audioEnabled: shouldCreateAudioContext,
|
|
33870
34042
|
previewSampleRate: sampleRate,
|
|
33871
34043
|
children: /* @__PURE__ */ jsx133(Internals.SharedAudioTagsContextProvider, {
|
|
33872
34044
|
numberOfAudioTags: numberOfSharedAudioTags,
|
|
@@ -37354,7 +37526,7 @@ var {
|
|
|
37354
37526
|
useUnsafeVideoConfig: useUnsafeVideoConfig2,
|
|
37355
37527
|
Timeline,
|
|
37356
37528
|
SharedAudioContext: SharedAudioContext2,
|
|
37357
|
-
|
|
37529
|
+
usePlayerMutedState: usePlayerMutedState2,
|
|
37358
37530
|
useMediaVolumeState: useMediaVolumeState2,
|
|
37359
37531
|
useFrameForVolumeProp: useFrameForVolumeProp2,
|
|
37360
37532
|
evaluateVolume: evaluateVolume2,
|
|
@@ -37396,7 +37568,7 @@ var AudioForPreviewAssertedShowing = ({
|
|
|
37396
37568
|
const { playbackRate: globalPlaybackRate } = Internals.usePlaybackRate();
|
|
37397
37569
|
const sharedAudioContext = useContext212(SharedAudioContext2);
|
|
37398
37570
|
const buffer = useBufferState();
|
|
37399
|
-
const [
|
|
37571
|
+
const [playerMuted] = usePlayerMutedState2();
|
|
37400
37572
|
const [mediaVolume] = useMediaVolumeState2();
|
|
37401
37573
|
const volumePropFrame = useFrameForVolumeProp2(loopVolumeCurveBehavior ?? "repeat");
|
|
37402
37574
|
const userPreferredVolume = evaluateVolume2({
|
|
@@ -37423,7 +37595,7 @@ var AudioForPreviewAssertedShowing = ({
|
|
|
37423
37595
|
if (!bufferingContext) {
|
|
37424
37596
|
throw new Error("useMediaPlayback must be used inside a <BufferingContext>");
|
|
37425
37597
|
}
|
|
37426
|
-
const effectiveMuted = muted ||
|
|
37598
|
+
const effectiveMuted = muted || playerMuted || userPreferredVolume <= 0;
|
|
37427
37599
|
const isPlayerBuffering = Internals.useIsPlayerBuffering(bufferingContext);
|
|
37428
37600
|
const initialPlaying = useRef50(playing && !isPlayerBuffering);
|
|
37429
37601
|
const initialIsPremounting = useRef50(isPremounting);
|
|
@@ -38796,7 +38968,7 @@ var getFormatOrNullOrNetworkError = async (input) => {
|
|
|
38796
38968
|
return null;
|
|
38797
38969
|
}
|
|
38798
38970
|
};
|
|
38799
|
-
var getSinks = async (src, credentials, requestInit) => {
|
|
38971
|
+
var getSinks = async (src, logLevel, credentials, requestInit) => {
|
|
38800
38972
|
const resolvedRequestInit = resolveRequestInit({ credentials, requestInit });
|
|
38801
38973
|
const input = new Input22({
|
|
38802
38974
|
formats: ALL_FORMATS2,
|
|
@@ -38835,7 +39007,7 @@ var getSinks = async (src, credentials, requestInit) => {
|
|
|
38835
39007
|
});
|
|
38836
39008
|
const hasAlpha = startPacket?.sideData.alpha;
|
|
38837
39009
|
if (hasAlpha && !canBrowserUseWebGl2()) {
|
|
38838
|
-
|
|
39010
|
+
Internals.Log.warn({ logLevel, tag: "@remotion/media" }, `WebGL2 is not available, using the non-fast CPU path to decode alpha for ${src}.`);
|
|
38839
39011
|
}
|
|
38840
39012
|
return {
|
|
38841
39013
|
sampleSink
|
|
@@ -38918,7 +39090,7 @@ var getSink = (src, logLevel, credentials, requestInit) => {
|
|
|
38918
39090
|
logLevel,
|
|
38919
39091
|
tag: "@remotion/media"
|
|
38920
39092
|
}, `Sink for ${src} was not found, creating new sink`);
|
|
38921
|
-
promise = getSinks(src, credentials, normalizedRequestInit);
|
|
39093
|
+
promise = getSinks(src, logLevel, credentials, normalizedRequestInit);
|
|
38922
39094
|
sinkPromises[cacheKey] = promise;
|
|
38923
39095
|
}
|
|
38924
39096
|
return promise;
|
|
@@ -39828,6 +40000,7 @@ var AudioInner = (props) => {
|
|
|
39828
40000
|
};
|
|
39829
40001
|
var Audio2 = Interactive.withSchema({
|
|
39830
40002
|
Component: AudioInner,
|
|
40003
|
+
componentName: "<Audio>",
|
|
39831
40004
|
componentIdentity: "dev.remotion.media.Audio",
|
|
39832
40005
|
schema: audioSchema,
|
|
39833
40006
|
supportsEffects: false
|
|
@@ -39875,7 +40048,7 @@ var {
|
|
|
39875
40048
|
useUnsafeVideoConfig: useUnsafeVideoConfig22,
|
|
39876
40049
|
Timeline: Timeline2,
|
|
39877
40050
|
SharedAudioContext: SharedAudioContext22,
|
|
39878
|
-
|
|
40051
|
+
usePlayerMutedState: usePlayerMutedState22,
|
|
39879
40052
|
useMediaVolumeState: useMediaVolumeState22,
|
|
39880
40053
|
useFrameForVolumeProp: useFrameForVolumeProp22,
|
|
39881
40054
|
evaluateVolume: evaluateVolume22,
|
|
@@ -39936,7 +40109,7 @@ var VideoForPreviewAssertedShowing = ({
|
|
|
39936
40109
|
const fallbackVideoRef = useCallback40((video) => {
|
|
39937
40110
|
refForOutline.current = video;
|
|
39938
40111
|
}, [refForOutline]);
|
|
39939
|
-
const [
|
|
40112
|
+
const [playerMuted] = usePlayerMutedState22();
|
|
39940
40113
|
const [mediaVolume] = useMediaVolumeState22();
|
|
39941
40114
|
const volumePropFrame = useFrameForVolumeProp22(loopVolumeCurveBehavior);
|
|
39942
40115
|
const userPreferredVolume = evaluateVolume22({
|
|
@@ -39965,7 +40138,7 @@ var VideoForPreviewAssertedShowing = ({
|
|
|
39965
40138
|
if (!buffering) {
|
|
39966
40139
|
throw new Error("useMediaPlayback must be used inside a <BufferingContext>");
|
|
39967
40140
|
}
|
|
39968
|
-
const effectiveMuted = muted ||
|
|
40141
|
+
const effectiveMuted = muted || playerMuted || userPreferredVolume <= 0;
|
|
39969
40142
|
const isPlayerBuffering = Internals.useIsPlayerBuffering(buffering);
|
|
39970
40143
|
const initialPlaying = useRef213(playing && !isPlayerBuffering);
|
|
39971
40144
|
const initialIsPremounting = useRef213(isPremounting);
|
|
@@ -40869,6 +41042,7 @@ var VideoInner = ({
|
|
|
40869
41042
|
};
|
|
40870
41043
|
var Video = Interactive.withSchema({
|
|
40871
41044
|
Component: VideoInner,
|
|
41045
|
+
componentName: "<Video>",
|
|
40872
41046
|
componentIdentity: "dev.remotion.media.Video",
|
|
40873
41047
|
schema: videoSchema,
|
|
40874
41048
|
supportsEffects: true
|
|
@@ -42176,7 +42350,7 @@ import {
|
|
|
42176
42350
|
import { BufferTarget, StreamTarget } from "mediabunny";
|
|
42177
42351
|
|
|
42178
42352
|
// ../core/dist/esm/version.mjs
|
|
42179
|
-
var VERSION2 = "4.0.
|
|
42353
|
+
var VERSION2 = "4.0.482";
|
|
42180
42354
|
|
|
42181
42355
|
// ../web-renderer/dist/esm/index.mjs
|
|
42182
42356
|
import { AudioSample, VideoSample } from "mediabunny";
|