remotion 4.0.25 → 4.0.27
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/Sequence.js +1 -3
- package/dist/cjs/use-media-in-timeline.js +1 -3
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/video/video-fragment.js +4 -2
- package/dist/esm/index.mjs +7 -9
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/dist/cjs/get-environment.d.ts +0 -3
- package/dist/cjs/get-environment.js +0 -34
package/dist/cjs/Sequence.js
CHANGED
|
@@ -20,7 +20,6 @@ const SequenceRefForwardingFunction = ({ from = 0, durationInFrames = Infinity,
|
|
|
20
20
|
? parentSequence.cumulatedFrom + parentSequence.relativeFrom
|
|
21
21
|
: 0;
|
|
22
22
|
const nonce = (0, nonce_js_1.useNonce)();
|
|
23
|
-
const environment = (0, get_remotion_environment_js_1.getRemotionEnvironment)();
|
|
24
23
|
if (layout !== 'absolute-fill' && layout !== 'none') {
|
|
25
24
|
throw new TypeError(`The layout prop of <Sequence /> expects either "absolute-fill" or "none", but you passed: ${layout}`);
|
|
26
25
|
}
|
|
@@ -68,7 +67,7 @@ const SequenceRefForwardingFunction = ({ from = 0, durationInFrames = Infinity,
|
|
|
68
67
|
}, [children, name]);
|
|
69
68
|
(0, react_1.useEffect)(() => {
|
|
70
69
|
var _a;
|
|
71
|
-
if (!
|
|
70
|
+
if (!(0, get_remotion_environment_js_1.getRemotionEnvironment)().isStudio) {
|
|
72
71
|
return;
|
|
73
72
|
}
|
|
74
73
|
registerSequence({
|
|
@@ -100,7 +99,6 @@ const SequenceRefForwardingFunction = ({ from = 0, durationInFrames = Infinity,
|
|
|
100
99
|
showInTimeline,
|
|
101
100
|
nonce,
|
|
102
101
|
loopDisplay,
|
|
103
|
-
environment,
|
|
104
102
|
]);
|
|
105
103
|
const endThreshold = cumulatedFrom + from + durationInFrames - 1;
|
|
106
104
|
const content = absoluteFrame < cumulatedFrom + from
|
|
@@ -37,7 +37,6 @@ const useMediaInTimeline = ({ volume, mediaVolume, mediaRef, src, mediaType, pla
|
|
|
37
37
|
? Math.min(parentSequence.durationInFrames, videoConfig.durationInFrames)
|
|
38
38
|
: videoConfig.durationInFrames;
|
|
39
39
|
const doesVolumeChange = typeof volume === 'function';
|
|
40
|
-
const environment = (0, get_remotion_environment_js_1.getRemotionEnvironment)();
|
|
41
40
|
const volumes = (0, react_1.useMemo)(() => {
|
|
42
41
|
if (typeof volume === 'number') {
|
|
43
42
|
return volume;
|
|
@@ -67,7 +66,7 @@ const useMediaInTimeline = ({ volume, mediaVolume, mediaRef, src, mediaType, pla
|
|
|
67
66
|
if (!src) {
|
|
68
67
|
throw new Error('No src passed');
|
|
69
68
|
}
|
|
70
|
-
if (!
|
|
69
|
+
if (!(0, get_remotion_environment_js_1.getRemotionEnvironment)().isStudio && process.env.NODE_ENV !== 'test') {
|
|
71
70
|
return;
|
|
72
71
|
}
|
|
73
72
|
registerSequence({
|
|
@@ -107,7 +106,6 @@ const useMediaInTimeline = ({ volume, mediaVolume, mediaRef, src, mediaType, pla
|
|
|
107
106
|
mediaType,
|
|
108
107
|
startsAt,
|
|
109
108
|
playbackRate,
|
|
110
|
-
environment,
|
|
111
109
|
]);
|
|
112
110
|
(0, react_1.useEffect)(() => {
|
|
113
111
|
const tag = {
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "4.0.
|
|
1
|
+
export declare const VERSION = "4.0.27";
|
package/dist/cjs/version.js
CHANGED
|
@@ -28,8 +28,10 @@ const useAppendVideoFragment = ({ actualSrc: initialActualSrc, actualFrom: initi
|
|
|
28
28
|
};
|
|
29
29
|
exports.useAppendVideoFragment = useAppendVideoFragment;
|
|
30
30
|
const isIosSafari = () => {
|
|
31
|
-
return
|
|
32
|
-
|
|
31
|
+
return typeof window === 'undefined'
|
|
32
|
+
? false
|
|
33
|
+
: /iP(ad|od|hone)/i.test(window.navigator.userAgent) &&
|
|
34
|
+
Boolean(navigator.userAgent.match(/Version\/[\d.]+.*Safari/));
|
|
33
35
|
};
|
|
34
36
|
exports.isIosSafari = isIosSafari;
|
|
35
37
|
// https://github.com/remotion-dev/remotion/issues/1655
|
package/dist/esm/index.mjs
CHANGED
|
@@ -59,7 +59,7 @@ function truthy(value) {
|
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
// Automatically generated on publish
|
|
62
|
-
const VERSION = '4.0.
|
|
62
|
+
const VERSION = '4.0.27';
|
|
63
63
|
|
|
64
64
|
const checkMultipleRemotionVersions = () => {
|
|
65
65
|
if (typeof globalThis === 'undefined') {
|
|
@@ -984,7 +984,6 @@ const SequenceRefForwardingFunction = ({ from = 0, durationInFrames = Infinity,
|
|
|
984
984
|
? parentSequence.cumulatedFrom + parentSequence.relativeFrom
|
|
985
985
|
: 0;
|
|
986
986
|
const nonce = useNonce();
|
|
987
|
-
const environment = getRemotionEnvironment();
|
|
988
987
|
if (layout !== 'absolute-fill' && layout !== 'none') {
|
|
989
988
|
throw new TypeError(`The layout prop of <Sequence /> expects either "absolute-fill" or "none", but you passed: ${layout}`);
|
|
990
989
|
}
|
|
@@ -1032,7 +1031,7 @@ const SequenceRefForwardingFunction = ({ from = 0, durationInFrames = Infinity,
|
|
|
1032
1031
|
}, [children, name]);
|
|
1033
1032
|
useEffect(() => {
|
|
1034
1033
|
var _a;
|
|
1035
|
-
if (!
|
|
1034
|
+
if (!getRemotionEnvironment().isStudio) {
|
|
1036
1035
|
return;
|
|
1037
1036
|
}
|
|
1038
1037
|
registerSequence({
|
|
@@ -1064,7 +1063,6 @@ const SequenceRefForwardingFunction = ({ from = 0, durationInFrames = Infinity,
|
|
|
1064
1063
|
showInTimeline,
|
|
1065
1064
|
nonce,
|
|
1066
1065
|
loopDisplay,
|
|
1067
|
-
environment,
|
|
1068
1066
|
]);
|
|
1069
1067
|
const endThreshold = cumulatedFrom + from + durationInFrames - 1;
|
|
1070
1068
|
const content = absoluteFrame < cumulatedFrom + from
|
|
@@ -1501,7 +1499,6 @@ const useMediaInTimeline = ({ volume, mediaVolume, mediaRef, src, mediaType, pla
|
|
|
1501
1499
|
? Math.min(parentSequence.durationInFrames, videoConfig.durationInFrames)
|
|
1502
1500
|
: videoConfig.durationInFrames;
|
|
1503
1501
|
const doesVolumeChange = typeof volume === 'function';
|
|
1504
|
-
const environment = getRemotionEnvironment();
|
|
1505
1502
|
const volumes = useMemo(() => {
|
|
1506
1503
|
if (typeof volume === 'number') {
|
|
1507
1504
|
return volume;
|
|
@@ -1531,7 +1528,7 @@ const useMediaInTimeline = ({ volume, mediaVolume, mediaRef, src, mediaType, pla
|
|
|
1531
1528
|
if (!src) {
|
|
1532
1529
|
throw new Error('No src passed');
|
|
1533
1530
|
}
|
|
1534
|
-
if (!
|
|
1531
|
+
if (!getRemotionEnvironment().isStudio && process.env.NODE_ENV !== 'test') {
|
|
1535
1532
|
return;
|
|
1536
1533
|
}
|
|
1537
1534
|
registerSequence({
|
|
@@ -1571,7 +1568,6 @@ const useMediaInTimeline = ({ volume, mediaVolume, mediaRef, src, mediaType, pla
|
|
|
1571
1568
|
mediaType,
|
|
1572
1569
|
startsAt,
|
|
1573
1570
|
playbackRate,
|
|
1574
|
-
environment,
|
|
1575
1571
|
]);
|
|
1576
1572
|
useEffect(() => {
|
|
1577
1573
|
const tag = {
|
|
@@ -1757,8 +1753,10 @@ const useAppendVideoFragment = ({ actualSrc: initialActualSrc, actualFrom: initi
|
|
|
1757
1753
|
return appended;
|
|
1758
1754
|
};
|
|
1759
1755
|
const isIosSafari = () => {
|
|
1760
|
-
return
|
|
1761
|
-
|
|
1756
|
+
return typeof window === 'undefined'
|
|
1757
|
+
? false
|
|
1758
|
+
: /iP(ad|od|hone)/i.test(window.navigator.userAgent) &&
|
|
1759
|
+
Boolean(navigator.userAgent.match(/Version\/[\d.]+.*Safari/));
|
|
1762
1760
|
};
|
|
1763
1761
|
// https://github.com/remotion-dev/remotion/issues/1655
|
|
1764
1762
|
const isIOSSafariCase = (actualSrc) => {
|
package/dist/esm/version.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useRemotionEnvironment = exports.getRemotionEnvironment = void 0;
|
|
4
|
-
const is_player_js_1 = require("./is-player.js");
|
|
5
|
-
const getRemotionEnvironment = () => {
|
|
6
|
-
if (process.env.NODE_ENV === 'production') {
|
|
7
|
-
if (typeof window !== 'undefined' && window.remotion_isPlayer) {
|
|
8
|
-
return 'player-production';
|
|
9
|
-
}
|
|
10
|
-
return 'rendering';
|
|
11
|
-
}
|
|
12
|
-
// The Vitest framework sets NODE_ENV as test.
|
|
13
|
-
// Right now we don't need to treat it in a special
|
|
14
|
-
// way which is good - defaulting to `rendering`.
|
|
15
|
-
if (process.env.NODE_ENV === 'test') {
|
|
16
|
-
return 'rendering';
|
|
17
|
-
}
|
|
18
|
-
if (typeof window !== 'undefined' && window.remotion_isPlayer) {
|
|
19
|
-
return 'player-development';
|
|
20
|
-
}
|
|
21
|
-
return 'preview';
|
|
22
|
-
};
|
|
23
|
-
exports.getRemotionEnvironment = getRemotionEnvironment;
|
|
24
|
-
const useRemotionEnvironment = () => {
|
|
25
|
-
const isPlayer = (0, is_player_js_1.useIsPlayer)();
|
|
26
|
-
if (isPlayer) {
|
|
27
|
-
if (process.env.NODE_ENV === 'production') {
|
|
28
|
-
return 'player-production';
|
|
29
|
-
}
|
|
30
|
-
return 'player-development';
|
|
31
|
-
}
|
|
32
|
-
return (0, exports.getRemotionEnvironment)();
|
|
33
|
-
};
|
|
34
|
-
exports.useRemotionEnvironment = useRemotionEnvironment;
|