remotion 4.0.481 → 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/cjs/CompositionManager.d.ts +1 -0
- package/dist/cjs/HtmlInCanvas.d.ts +74 -0
- package/dist/cjs/HtmlInCanvas.js +12 -10
- package/dist/cjs/Img.d.ts +7 -0
- package/dist/cjs/Img.js +5 -5
- package/dist/cjs/Interactive.d.ts +86 -1
- package/dist/cjs/Interactive.js +4 -2
- package/dist/cjs/Sequence.d.ts +1 -0
- package/dist/cjs/Sequence.js +25 -6
- package/dist/cjs/audio/AudioForPreview.js +3 -3
- package/dist/cjs/canvas-image/CanvasImage.d.ts +7 -0
- package/dist/cjs/canvas-image/CanvasImage.js +2 -2
- package/dist/cjs/effects/Solid.d.ts +95 -0
- package/dist/cjs/effects/Solid.js +14 -5
- package/dist/cjs/interactivity-schema.d.ts +106 -0
- package/dist/cjs/interactivity-schema.js +81 -1
- package/dist/cjs/internals.d.ts +86 -1
- package/dist/cjs/internals.js +2 -1
- package/dist/cjs/no-react.d.ts +7 -0
- package/dist/cjs/prefetch.js +15 -10
- package/dist/cjs/use-media-in-timeline.js +1 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/video/VideoForPreview.js +2 -2
- package/dist/cjs/volume-position-state.d.ts +4 -4
- package/dist/cjs/volume-position-state.js +9 -9
- package/dist/esm/index.mjs +172 -34
- package/dist/esm/no-react.mjs +9 -0
- package/dist/esm/version.mjs +1 -1
- package/package.json +2 -2
package/dist/esm/index.mjs
CHANGED
|
@@ -1291,7 +1291,7 @@ var addSequenceStackTraces = (component) => {
|
|
|
1291
1291
|
};
|
|
1292
1292
|
|
|
1293
1293
|
// src/version.ts
|
|
1294
|
-
var VERSION = "4.0.
|
|
1294
|
+
var VERSION = "4.0.482";
|
|
1295
1295
|
|
|
1296
1296
|
// src/multiple-versions-warning.ts
|
|
1297
1297
|
var checkMultipleRemotionVersions = () => {
|
|
@@ -1750,6 +1750,77 @@ var transformSchema = {
|
|
|
1750
1750
|
}
|
|
1751
1751
|
};
|
|
1752
1752
|
var sequenceVisualStyleSchema = transformSchema;
|
|
1753
|
+
var textSchema = {
|
|
1754
|
+
"style.color": {
|
|
1755
|
+
type: "color",
|
|
1756
|
+
default: undefined,
|
|
1757
|
+
description: "Color"
|
|
1758
|
+
},
|
|
1759
|
+
"style.fontSize": {
|
|
1760
|
+
type: "number",
|
|
1761
|
+
default: undefined,
|
|
1762
|
+
min: 0,
|
|
1763
|
+
step: 1,
|
|
1764
|
+
description: "Font size",
|
|
1765
|
+
hiddenFromList: false
|
|
1766
|
+
},
|
|
1767
|
+
"style.lineHeight": {
|
|
1768
|
+
type: "number",
|
|
1769
|
+
default: undefined,
|
|
1770
|
+
min: 0,
|
|
1771
|
+
step: 0.05,
|
|
1772
|
+
description: "Line height",
|
|
1773
|
+
hiddenFromList: false
|
|
1774
|
+
},
|
|
1775
|
+
"style.fontWeight": {
|
|
1776
|
+
type: "enum",
|
|
1777
|
+
default: "400",
|
|
1778
|
+
description: "Font weight",
|
|
1779
|
+
variants: {
|
|
1780
|
+
"100": {},
|
|
1781
|
+
"200": {},
|
|
1782
|
+
"300": {},
|
|
1783
|
+
"400": {},
|
|
1784
|
+
"500": {},
|
|
1785
|
+
"600": {},
|
|
1786
|
+
"700": {},
|
|
1787
|
+
"800": {},
|
|
1788
|
+
"900": {},
|
|
1789
|
+
normal: {},
|
|
1790
|
+
bold: {}
|
|
1791
|
+
}
|
|
1792
|
+
},
|
|
1793
|
+
"style.fontStyle": {
|
|
1794
|
+
type: "enum",
|
|
1795
|
+
default: "normal",
|
|
1796
|
+
description: "Font style",
|
|
1797
|
+
variants: {
|
|
1798
|
+
normal: {},
|
|
1799
|
+
italic: {},
|
|
1800
|
+
oblique: {}
|
|
1801
|
+
}
|
|
1802
|
+
},
|
|
1803
|
+
"style.textAlign": {
|
|
1804
|
+
type: "enum",
|
|
1805
|
+
default: "left",
|
|
1806
|
+
description: "Text align",
|
|
1807
|
+
variants: {
|
|
1808
|
+
left: {},
|
|
1809
|
+
center: {},
|
|
1810
|
+
right: {},
|
|
1811
|
+
justify: {},
|
|
1812
|
+
start: {},
|
|
1813
|
+
end: {}
|
|
1814
|
+
}
|
|
1815
|
+
},
|
|
1816
|
+
"style.letterSpacing": {
|
|
1817
|
+
type: "number",
|
|
1818
|
+
default: undefined,
|
|
1819
|
+
step: 0.1,
|
|
1820
|
+
description: "Letter spacing",
|
|
1821
|
+
hiddenFromList: false
|
|
1822
|
+
}
|
|
1823
|
+
};
|
|
1753
1824
|
var premountSchema = {
|
|
1754
1825
|
premountFor: {
|
|
1755
1826
|
type: "number",
|
|
@@ -1808,6 +1879,13 @@ var fromField = {
|
|
|
1808
1879
|
step: 1,
|
|
1809
1880
|
hiddenFromList: true
|
|
1810
1881
|
};
|
|
1882
|
+
var trimBeforeField = {
|
|
1883
|
+
type: "number",
|
|
1884
|
+
default: 0,
|
|
1885
|
+
min: 0,
|
|
1886
|
+
step: 1,
|
|
1887
|
+
hiddenFromList: true
|
|
1888
|
+
};
|
|
1811
1889
|
var freezeField = {
|
|
1812
1890
|
type: "number",
|
|
1813
1891
|
default: null,
|
|
@@ -1817,6 +1895,7 @@ var freezeField = {
|
|
|
1817
1895
|
var baseSchema = {
|
|
1818
1896
|
durationInFrames: durationInFramesField,
|
|
1819
1897
|
from: fromField,
|
|
1898
|
+
trimBefore: trimBeforeField,
|
|
1820
1899
|
freeze: freezeField,
|
|
1821
1900
|
hidden: hiddenField,
|
|
1822
1901
|
name: sequenceNameField,
|
|
@@ -1836,6 +1915,7 @@ var sequenceSchema = {
|
|
|
1836
1915
|
};
|
|
1837
1916
|
var baseSchemaWithoutFrom = {
|
|
1838
1917
|
durationInFrames: durationInFramesField,
|
|
1918
|
+
trimBefore: trimBeforeField,
|
|
1839
1919
|
freeze: freezeField,
|
|
1840
1920
|
hidden: hiddenField,
|
|
1841
1921
|
name: sequenceNameField,
|
|
@@ -4198,6 +4278,7 @@ import { jsx as jsx12 } from "react/jsx-runtime";
|
|
|
4198
4278
|
var EMPTY_EFFECTS = [];
|
|
4199
4279
|
var RegularSequenceRefForwardingFunction = ({
|
|
4200
4280
|
from = 0,
|
|
4281
|
+
trimBefore = 0,
|
|
4201
4282
|
freeze,
|
|
4202
4283
|
durationInFrames = Infinity,
|
|
4203
4284
|
children,
|
|
@@ -4222,7 +4303,6 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
4222
4303
|
const parentSequence = useContext17(SequenceContext);
|
|
4223
4304
|
const { rootId } = useTimelineContext();
|
|
4224
4305
|
const cumulatedFrom = parentSequence ? parentSequence.cumulatedFrom + parentSequence.relativeFrom : 0;
|
|
4225
|
-
const absoluteFrom = (parentSequence?.absoluteFrom ?? 0) + from;
|
|
4226
4306
|
const nonce = useNonce();
|
|
4227
4307
|
if (layout !== "absolute-fill" && layout !== "none") {
|
|
4228
4308
|
throw new TypeError(`The layout prop of <Sequence /> expects either "absolute-fill" or "none", but you passed: ${layout}`);
|
|
@@ -4242,6 +4322,18 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
4242
4322
|
if (!Number.isFinite(from)) {
|
|
4243
4323
|
throw new TypeError(`The "from" prop of a sequence must be finite, but got ${from}.`);
|
|
4244
4324
|
}
|
|
4325
|
+
if (typeof trimBefore !== "number") {
|
|
4326
|
+
throw new TypeError(`You passed to the "trimBefore" prop of your <Sequence> an argument of type ${typeof trimBefore}, but it must be a number.`);
|
|
4327
|
+
}
|
|
4328
|
+
if (trimBefore < 0) {
|
|
4329
|
+
throw new TypeError(`The "trimBefore" prop of <Sequence /> must be greater than or equal to 0, but got ${trimBefore}.`);
|
|
4330
|
+
}
|
|
4331
|
+
if (Number.isNaN(trimBefore)) {
|
|
4332
|
+
throw new TypeError('The "trimBefore" prop of <Sequence /> must be a real number, but it is NaN.');
|
|
4333
|
+
}
|
|
4334
|
+
if (!Number.isFinite(trimBefore)) {
|
|
4335
|
+
throw new TypeError(`The "trimBefore" prop of <Sequence /> must be finite, but it is ${trimBefore}.`);
|
|
4336
|
+
}
|
|
4245
4337
|
if (typeof freeze !== "undefined" && freeze !== null) {
|
|
4246
4338
|
if (typeof freeze !== "number") {
|
|
4247
4339
|
throw new TypeError(`The "freeze" prop of <Sequence /> must be a number, but is of type ${typeof freeze}.`);
|
|
@@ -4255,7 +4347,9 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
4255
4347
|
}
|
|
4256
4348
|
const absoluteFrame = useTimelinePosition();
|
|
4257
4349
|
const videoConfig = useVideoConfig();
|
|
4258
|
-
const
|
|
4350
|
+
const effectiveRelativeFrom = from - trimBefore;
|
|
4351
|
+
const absoluteFrom = (parentSequence?.absoluteFrom ?? 0) + effectiveRelativeFrom;
|
|
4352
|
+
const parentSequenceDuration = parentSequence ? Math.min(parentSequence.durationInFrames - effectiveRelativeFrom, durationInFrames) : durationInFrames;
|
|
4259
4353
|
const actualDurationInFrames = Math.max(0, Math.min(videoConfig.durationInFrames - from, parentSequenceDuration));
|
|
4260
4354
|
const { registerSequence, unregisterSequence } = useContext17(SequenceManager);
|
|
4261
4355
|
const wrapperRefForOutline = useRef6(null);
|
|
@@ -4266,7 +4360,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
4266
4360
|
const postmounting = useMemo14(() => {
|
|
4267
4361
|
return parentSequence?.postmounting || Boolean(other._remotionInternalIsPostmounting);
|
|
4268
4362
|
}, [other._remotionInternalIsPostmounting, parentSequence?.postmounting]);
|
|
4269
|
-
const currentSequenceStart = cumulatedFrom +
|
|
4363
|
+
const currentSequenceStart = cumulatedFrom + effectiveRelativeFrom;
|
|
4270
4364
|
const parentSequenceStart = parentSequence ? parentSequence.cumulatedFrom + parentSequence.relativeFrom : 0;
|
|
4271
4365
|
const parentFirstFrame = parentSequence ? parentSequenceStart - parentSequence.cumulatedNegativeFrom : 0;
|
|
4272
4366
|
const firstFrame = Math.max(0, parentFirstFrame, currentSequenceStart);
|
|
@@ -4275,7 +4369,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
4275
4369
|
return {
|
|
4276
4370
|
absoluteFrom,
|
|
4277
4371
|
cumulatedFrom,
|
|
4278
|
-
relativeFrom:
|
|
4372
|
+
relativeFrom: effectiveRelativeFrom,
|
|
4279
4373
|
cumulatedNegativeFrom,
|
|
4280
4374
|
durationInFrames: actualDurationInFrames,
|
|
4281
4375
|
parentFrom: parentSequence?.relativeFrom ?? 0,
|
|
@@ -4290,7 +4384,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
4290
4384
|
}, [
|
|
4291
4385
|
cumulatedFrom,
|
|
4292
4386
|
absoluteFrom,
|
|
4293
|
-
|
|
4387
|
+
effectiveRelativeFrom,
|
|
4294
4388
|
actualDurationInFrames,
|
|
4295
4389
|
parentSequence,
|
|
4296
4390
|
id,
|
|
@@ -4312,6 +4406,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
4312
4406
|
const stackRef = useRef6(null);
|
|
4313
4407
|
stackRef.current = stack ?? inheritedStack;
|
|
4314
4408
|
const registeredFrozenFrame = typeof freeze === "number" ? freeze : null;
|
|
4409
|
+
const registeredTrimBefore = trimBefore === 0 ? null : trimBefore;
|
|
4315
4410
|
const parentCumulatedNegativeFrom = parentSequence?.cumulatedNegativeFrom ?? 0;
|
|
4316
4411
|
const startMediaFrom = isMedia && isMedia.type !== "image" ? isMedia.data.startMediaFrom + parentCumulatedNegativeFrom - cumulatedNegativeFrom : null;
|
|
4317
4412
|
const mediaFrameAtSequenceZero = isMedia && isMedia.type !== "image" ? isMedia.data.startMediaFrom + parentCumulatedNegativeFrom : null;
|
|
@@ -4330,6 +4425,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
4330
4425
|
documentationLink: resolvedDocumentationLink,
|
|
4331
4426
|
duration: actualDurationInFrames,
|
|
4332
4427
|
from,
|
|
4428
|
+
trimBefore: registeredTrimBefore,
|
|
4333
4429
|
id,
|
|
4334
4430
|
loopDisplay,
|
|
4335
4431
|
nonce: nonce.get(),
|
|
@@ -4354,6 +4450,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
4354
4450
|
doesVolumeChange: isMedia.data.doesVolumeChange,
|
|
4355
4451
|
duration: actualDurationInFrames,
|
|
4356
4452
|
from,
|
|
4453
|
+
trimBefore: registeredTrimBefore,
|
|
4357
4454
|
id,
|
|
4358
4455
|
loopDisplay,
|
|
4359
4456
|
nonce: nonce.get(),
|
|
@@ -4379,6 +4476,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
4379
4476
|
}
|
|
4380
4477
|
registerSequence({
|
|
4381
4478
|
from,
|
|
4479
|
+
trimBefore: registeredTrimBefore,
|
|
4382
4480
|
duration: actualDurationInFrames,
|
|
4383
4481
|
id,
|
|
4384
4482
|
displayName: timelineClipName,
|
|
@@ -4412,6 +4510,8 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
4412
4510
|
actualDurationInFrames,
|
|
4413
4511
|
rootId,
|
|
4414
4512
|
from,
|
|
4513
|
+
trimBefore,
|
|
4514
|
+
registeredTrimBefore,
|
|
4415
4515
|
showInTimeline,
|
|
4416
4516
|
nonce,
|
|
4417
4517
|
loopDisplay,
|
|
@@ -5759,13 +5859,15 @@ var prefetch = (src, options) => {
|
|
|
5759
5859
|
resolve = res;
|
|
5760
5860
|
reject = rej;
|
|
5761
5861
|
});
|
|
5862
|
+
waitUntilDone.catch(() => {
|
|
5863
|
+
return;
|
|
5864
|
+
});
|
|
5762
5865
|
const controller = new AbortController;
|
|
5763
|
-
let
|
|
5866
|
+
let reader = null;
|
|
5764
5867
|
fetch(srcWithoutHash, {
|
|
5765
5868
|
signal: controller.signal,
|
|
5766
5869
|
credentials: options?.credentials ?? undefined
|
|
5767
5870
|
}).then((res) => {
|
|
5768
|
-
canBeAborted = false;
|
|
5769
5871
|
if (canceled) {
|
|
5770
5872
|
return null;
|
|
5771
5873
|
}
|
|
@@ -5781,15 +5883,16 @@ var prefetch = (src, options) => {
|
|
|
5781
5883
|
if (!res.body) {
|
|
5782
5884
|
throw new Error(`HTTP response of ${srcWithoutHash} has no body`);
|
|
5783
5885
|
}
|
|
5784
|
-
const
|
|
5886
|
+
const responseReader = res.body.getReader();
|
|
5887
|
+
reader = responseReader;
|
|
5785
5888
|
return getBlobFromReader({
|
|
5786
|
-
reader,
|
|
5889
|
+
reader: responseReader,
|
|
5787
5890
|
contentType: options?.contentType ?? headerContentType ?? null,
|
|
5788
5891
|
contentLength: res.headers.get("Content-Length") ? parseInt(res.headers.get("Content-Length"), 10) : null,
|
|
5789
5892
|
onProgress: options?.onProgress
|
|
5790
5893
|
});
|
|
5791
5894
|
}).then((buf) => {
|
|
5792
|
-
if (!buf) {
|
|
5895
|
+
if (!buf || canceled) {
|
|
5793
5896
|
return;
|
|
5794
5897
|
}
|
|
5795
5898
|
const actualBlob = options?.contentType ? new Blob([buf], { type: options.contentType }) : buf;
|
|
@@ -5837,12 +5940,18 @@ var prefetch = (src, options) => {
|
|
|
5837
5940
|
return copy;
|
|
5838
5941
|
});
|
|
5839
5942
|
} else {
|
|
5840
|
-
canceled
|
|
5841
|
-
|
|
5842
|
-
try {
|
|
5843
|
-
controller.abort(new Error("free() called"));
|
|
5844
|
-
} catch {}
|
|
5943
|
+
if (canceled) {
|
|
5944
|
+
return;
|
|
5845
5945
|
}
|
|
5946
|
+
canceled = true;
|
|
5947
|
+
const cancellationError = new Error("free() called");
|
|
5948
|
+
reject(cancellationError);
|
|
5949
|
+
try {
|
|
5950
|
+
controller.abort(cancellationError);
|
|
5951
|
+
} catch {}
|
|
5952
|
+
reader?.cancel(cancellationError).catch(() => {
|
|
5953
|
+
return;
|
|
5954
|
+
});
|
|
5846
5955
|
}
|
|
5847
5956
|
},
|
|
5848
5957
|
waitUntilDone: () => {
|
|
@@ -7084,6 +7193,7 @@ var useMediaInTimeline = ({
|
|
|
7084
7193
|
id,
|
|
7085
7194
|
duration,
|
|
7086
7195
|
from: 0,
|
|
7196
|
+
trimBefore: null,
|
|
7087
7197
|
parent: parentSequence?.id ?? null,
|
|
7088
7198
|
displayName: finalDisplayName,
|
|
7089
7199
|
documentationLink,
|
|
@@ -8000,11 +8110,11 @@ var useMediaTag = ({
|
|
|
8000
8110
|
// src/volume-position-state.ts
|
|
8001
8111
|
import { createContext as createContext22, useContext as useContext27, useMemo as useMemo26 } from "react";
|
|
8002
8112
|
var MediaVolumeContext = createContext22({
|
|
8003
|
-
|
|
8113
|
+
playerMuted: false,
|
|
8004
8114
|
mediaVolume: 1
|
|
8005
8115
|
});
|
|
8006
8116
|
var SetMediaVolumeContext = createContext22({
|
|
8007
|
-
|
|
8117
|
+
setPlayerMuted: () => {
|
|
8008
8118
|
throw new Error("default");
|
|
8009
8119
|
},
|
|
8010
8120
|
setMediaVolume: () => {
|
|
@@ -8018,12 +8128,12 @@ var useMediaVolumeState = () => {
|
|
|
8018
8128
|
return [mediaVolume, setMediaVolume];
|
|
8019
8129
|
}, [mediaVolume, setMediaVolume]);
|
|
8020
8130
|
};
|
|
8021
|
-
var
|
|
8022
|
-
const {
|
|
8023
|
-
const {
|
|
8131
|
+
var usePlayerMutedState = () => {
|
|
8132
|
+
const { playerMuted } = useContext27(MediaVolumeContext);
|
|
8133
|
+
const { setPlayerMuted } = useContext27(SetMediaVolumeContext);
|
|
8024
8134
|
return useMemo26(() => {
|
|
8025
|
-
return [
|
|
8026
|
-
}, [
|
|
8135
|
+
return [playerMuted, setPlayerMuted];
|
|
8136
|
+
}, [playerMuted, setPlayerMuted]);
|
|
8027
8137
|
};
|
|
8028
8138
|
|
|
8029
8139
|
// src/volume-safeguard.ts
|
|
@@ -8074,7 +8184,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
|
|
|
8074
8184
|
throw new Error("typecheck error");
|
|
8075
8185
|
}
|
|
8076
8186
|
const [mediaVolume] = useMediaVolumeState();
|
|
8077
|
-
const [
|
|
8187
|
+
const [playerMuted] = usePlayerMutedState();
|
|
8078
8188
|
const volumePropFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
|
|
8079
8189
|
if (!src) {
|
|
8080
8190
|
throw new TypeError("No 'src' was passed to <Html5Audio>.");
|
|
@@ -8095,7 +8205,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
|
|
|
8095
8205
|
});
|
|
8096
8206
|
const propsToPass = useMemo27(() => {
|
|
8097
8207
|
return {
|
|
8098
|
-
muted: muted ||
|
|
8208
|
+
muted: muted || playerMuted || userPreferredVolume <= 0,
|
|
8099
8209
|
src: preloadedSrc,
|
|
8100
8210
|
loop: _remotionInternalNativeLoopPassed,
|
|
8101
8211
|
crossOrigin: crossOriginValue,
|
|
@@ -8103,7 +8213,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
|
|
|
8103
8213
|
};
|
|
8104
8214
|
}, [
|
|
8105
8215
|
_remotionInternalNativeLoopPassed,
|
|
8106
|
-
|
|
8216
|
+
playerMuted,
|
|
8107
8217
|
muted,
|
|
8108
8218
|
nativeProps,
|
|
8109
8219
|
preloadedSrc,
|
|
@@ -8526,6 +8636,15 @@ var solidSchema = {
|
|
|
8526
8636
|
description: "Height",
|
|
8527
8637
|
hiddenFromList: false
|
|
8528
8638
|
},
|
|
8639
|
+
pixelDensity: {
|
|
8640
|
+
type: "number",
|
|
8641
|
+
min: 1,
|
|
8642
|
+
max: 3,
|
|
8643
|
+
step: 0.1,
|
|
8644
|
+
default: 1,
|
|
8645
|
+
description: "Pixel density",
|
|
8646
|
+
hiddenFromList: false
|
|
8647
|
+
},
|
|
8529
8648
|
...transformSchema
|
|
8530
8649
|
};
|
|
8531
8650
|
var SolidInner = ({
|
|
@@ -8642,6 +8761,7 @@ var SolidOuter = forwardRef8(({
|
|
|
8642
8761
|
style,
|
|
8643
8762
|
name,
|
|
8644
8763
|
from,
|
|
8764
|
+
trimBefore,
|
|
8645
8765
|
freeze,
|
|
8646
8766
|
hidden,
|
|
8647
8767
|
showInTimeline,
|
|
@@ -8656,6 +8776,7 @@ var SolidOuter = forwardRef8(({
|
|
|
8656
8776
|
return /* @__PURE__ */ jsx24(Sequence, {
|
|
8657
8777
|
layout: "none",
|
|
8658
8778
|
from,
|
|
8779
|
+
trimBefore,
|
|
8659
8780
|
freeze,
|
|
8660
8781
|
hidden,
|
|
8661
8782
|
showInTimeline,
|
|
@@ -8824,10 +8945,6 @@ var HtmlInCanvasContent = forwardRef9(({
|
|
|
8824
8945
|
if (!placeholderCanvas) {
|
|
8825
8946
|
throw new Error("Canvas not found");
|
|
8826
8947
|
}
|
|
8827
|
-
const offscreen2d = offscreen.getContext("2d");
|
|
8828
|
-
if (!offscreen2d) {
|
|
8829
|
-
throw new Error("Failed to acquire 2D context for <HtmlInCanvas> offscreen canvas");
|
|
8830
|
-
}
|
|
8831
8948
|
const handle = delayRender("onPaint");
|
|
8832
8949
|
if (!initializedRef.current) {
|
|
8833
8950
|
initializedRef.current = true;
|
|
@@ -9012,6 +9129,15 @@ var HtmlInCanvasInner = forwardRef9(({
|
|
|
9012
9129
|
HtmlInCanvasInner.displayName = "HtmlInCanvas";
|
|
9013
9130
|
var htmlInCanvasSchema = {
|
|
9014
9131
|
...baseSchema,
|
|
9132
|
+
pixelDensity: {
|
|
9133
|
+
type: "number",
|
|
9134
|
+
min: 1,
|
|
9135
|
+
max: 3,
|
|
9136
|
+
step: 0.1,
|
|
9137
|
+
default: 1,
|
|
9138
|
+
description: "Pixel density",
|
|
9139
|
+
hiddenFromList: false
|
|
9140
|
+
},
|
|
9015
9141
|
...transformSchema
|
|
9016
9142
|
};
|
|
9017
9143
|
var HtmlInCanvasWrapped = withInteractivitySchema({
|
|
@@ -9345,6 +9471,7 @@ var CanvasImageInner = forwardRef10(({
|
|
|
9345
9471
|
delayRenderTimeoutInMilliseconds,
|
|
9346
9472
|
durationInFrames,
|
|
9347
9473
|
from,
|
|
9474
|
+
trimBefore,
|
|
9348
9475
|
freeze,
|
|
9349
9476
|
hidden,
|
|
9350
9477
|
name,
|
|
@@ -9366,6 +9493,7 @@ var CanvasImageInner = forwardRef10(({
|
|
|
9366
9493
|
return /* @__PURE__ */ jsx26(Sequence, {
|
|
9367
9494
|
layout: "none",
|
|
9368
9495
|
from: from ?? 0,
|
|
9496
|
+
trimBefore,
|
|
9369
9497
|
durationInFrames: durationInFrames ?? Infinity,
|
|
9370
9498
|
freeze,
|
|
9371
9499
|
hidden,
|
|
@@ -9639,6 +9767,7 @@ var NativeImgInner = ({
|
|
|
9639
9767
|
showInTimeline,
|
|
9640
9768
|
src,
|
|
9641
9769
|
from,
|
|
9770
|
+
trimBefore,
|
|
9642
9771
|
durationInFrames,
|
|
9643
9772
|
freeze,
|
|
9644
9773
|
controls,
|
|
@@ -9651,6 +9780,7 @@ var NativeImgInner = ({
|
|
|
9651
9780
|
return /* @__PURE__ */ jsx28(Sequence, {
|
|
9652
9781
|
layout: "none",
|
|
9653
9782
|
from: from ?? 0,
|
|
9783
|
+
trimBefore,
|
|
9654
9784
|
durationInFrames: durationInFrames ?? Infinity,
|
|
9655
9785
|
freeze,
|
|
9656
9786
|
_remotionInternalStack: stack,
|
|
@@ -9724,6 +9854,7 @@ var ImgInner = ({
|
|
|
9724
9854
|
showInTimeline,
|
|
9725
9855
|
src,
|
|
9726
9856
|
from,
|
|
9857
|
+
trimBefore,
|
|
9727
9858
|
durationInFrames,
|
|
9728
9859
|
freeze,
|
|
9729
9860
|
controls,
|
|
@@ -9749,6 +9880,7 @@ var ImgInner = ({
|
|
|
9749
9880
|
showInTimeline,
|
|
9750
9881
|
src,
|
|
9751
9882
|
from,
|
|
9883
|
+
trimBefore,
|
|
9752
9884
|
durationInFrames,
|
|
9753
9885
|
freeze,
|
|
9754
9886
|
controls,
|
|
@@ -9791,6 +9923,7 @@ var ImgInner = ({
|
|
|
9791
9923
|
delayRenderRetries,
|
|
9792
9924
|
delayRenderTimeoutInMilliseconds,
|
|
9793
9925
|
from,
|
|
9926
|
+
trimBefore,
|
|
9794
9927
|
durationInFrames,
|
|
9795
9928
|
freeze,
|
|
9796
9929
|
hidden,
|
|
@@ -9816,7 +9949,8 @@ import React29, { forwardRef as forwardRef12, useCallback as useCallback20, useR
|
|
|
9816
9949
|
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
9817
9950
|
var interactiveElementSchema = {
|
|
9818
9951
|
...baseSchema,
|
|
9819
|
-
...transformSchema
|
|
9952
|
+
...transformSchema,
|
|
9953
|
+
...textSchema
|
|
9820
9954
|
};
|
|
9821
9955
|
var setRef = (ref, value) => {
|
|
9822
9956
|
if (typeof ref === "function") {
|
|
@@ -9830,6 +9964,7 @@ var makeInteractiveElement = (tag, displayName) => {
|
|
|
9830
9964
|
const {
|
|
9831
9965
|
durationInFrames,
|
|
9832
9966
|
from,
|
|
9967
|
+
trimBefore,
|
|
9833
9968
|
freeze,
|
|
9834
9969
|
hidden,
|
|
9835
9970
|
name,
|
|
@@ -9846,6 +9981,7 @@ var makeInteractiveElement = (tag, displayName) => {
|
|
|
9846
9981
|
return /* @__PURE__ */ jsx29(Sequence, {
|
|
9847
9982
|
layout: "none",
|
|
9848
9983
|
from: from ?? 0,
|
|
9984
|
+
trimBefore,
|
|
9849
9985
|
durationInFrames: durationInFrames ?? Infinity,
|
|
9850
9986
|
freeze,
|
|
9851
9987
|
hidden,
|
|
@@ -9876,6 +10012,7 @@ var makeInteractiveElement = (tag, displayName) => {
|
|
|
9876
10012
|
var Interactive = {
|
|
9877
10013
|
baseSchema,
|
|
9878
10014
|
transformSchema,
|
|
10015
|
+
textSchema,
|
|
9879
10016
|
premountSchema,
|
|
9880
10017
|
sequenceSchema,
|
|
9881
10018
|
withSchema: withInteractivitySchema,
|
|
@@ -10858,7 +10995,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
10858
10995
|
throw new Error("acceptableTimeShift has been removed. Use acceptableTimeShiftInSeconds instead.");
|
|
10859
10996
|
}
|
|
10860
10997
|
const [mediaVolume] = useMediaVolumeState();
|
|
10861
|
-
const [
|
|
10998
|
+
const [playerMuted] = usePlayerMutedState();
|
|
10862
10999
|
const userPreferredVolume = evaluateVolume({
|
|
10863
11000
|
frame: volumePropFrame,
|
|
10864
11001
|
volume,
|
|
@@ -11014,7 +11151,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
11014
11151
|
return /* @__PURE__ */ jsx34("video", {
|
|
11015
11152
|
...nativeProps,
|
|
11016
11153
|
ref: videoRef,
|
|
11017
|
-
muted: muted ||
|
|
11154
|
+
muted: muted || playerMuted || userPreferredVolume <= 0,
|
|
11018
11155
|
playsInline: true,
|
|
11019
11156
|
src: actualSrc,
|
|
11020
11157
|
loop: _remotionInternalNativeLoopPassed,
|
|
@@ -11350,6 +11487,7 @@ var Internals = {
|
|
|
11350
11487
|
sequenceStyleSchema,
|
|
11351
11488
|
sequenceVisualStyleSchema,
|
|
11352
11489
|
sequencePremountSchema,
|
|
11490
|
+
textSchema,
|
|
11353
11491
|
transformSchema,
|
|
11354
11492
|
premountSchema,
|
|
11355
11493
|
flattenActiveSchema,
|
|
@@ -11359,7 +11497,7 @@ var Internals = {
|
|
|
11359
11497
|
useVideo,
|
|
11360
11498
|
getRoot,
|
|
11361
11499
|
useMediaVolumeState,
|
|
11362
|
-
|
|
11500
|
+
usePlayerMutedState,
|
|
11363
11501
|
useMediaInTimeline,
|
|
11364
11502
|
useLazyComponent,
|
|
11365
11503
|
truthy,
|
package/dist/esm/no-react.mjs
CHANGED
|
@@ -724,6 +724,13 @@ var fromField = {
|
|
|
724
724
|
step: 1,
|
|
725
725
|
hiddenFromList: true
|
|
726
726
|
};
|
|
727
|
+
var trimBeforeField = {
|
|
728
|
+
type: "number",
|
|
729
|
+
default: 0,
|
|
730
|
+
min: 0,
|
|
731
|
+
step: 1,
|
|
732
|
+
hiddenFromList: true
|
|
733
|
+
};
|
|
727
734
|
var freezeField = {
|
|
728
735
|
type: "number",
|
|
729
736
|
default: null,
|
|
@@ -733,6 +740,7 @@ var freezeField = {
|
|
|
733
740
|
var baseSchema = {
|
|
734
741
|
durationInFrames: durationInFramesField,
|
|
735
742
|
from: fromField,
|
|
743
|
+
trimBefore: trimBeforeField,
|
|
736
744
|
freeze: freezeField,
|
|
737
745
|
hidden: hiddenField,
|
|
738
746
|
name: sequenceNameField,
|
|
@@ -752,6 +760,7 @@ var sequenceSchema = {
|
|
|
752
760
|
};
|
|
753
761
|
var baseSchemaWithoutFrom = {
|
|
754
762
|
durationInFrames: durationInFramesField,
|
|
763
|
+
trimBefore: trimBeforeField,
|
|
755
764
|
freeze: freezeField,
|
|
756
765
|
hidden: hiddenField,
|
|
757
766
|
name: sequenceNameField,
|
package/dist/esm/version.mjs
CHANGED
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"url": "https://github.com/remotion-dev/remotion/tree/main/packages/core"
|
|
4
4
|
},
|
|
5
5
|
"name": "remotion",
|
|
6
|
-
"version": "4.0.
|
|
6
|
+
"version": "4.0.482",
|
|
7
7
|
"description": "Make videos programmatically",
|
|
8
8
|
"main": "dist/cjs/index.js",
|
|
9
9
|
"types": "dist/cjs/index.d.ts",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"react-dom": "19.2.3",
|
|
36
36
|
"webpack": "5.105.0",
|
|
37
37
|
"zod": "4.3.6",
|
|
38
|
-
"@remotion/eslint-config-internal": "4.0.
|
|
38
|
+
"@remotion/eslint-config-internal": "4.0.482",
|
|
39
39
|
"eslint": "9.19.0",
|
|
40
40
|
"@typescript/native-preview": "7.0.0-dev.20260217.1"
|
|
41
41
|
},
|