@remotion/player 3.3.32 → 3.3.34
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.
|
@@ -72,6 +72,10 @@ const MediaVolumeSlider = ({ displayVerticalVolumeSlider }) => {
|
|
|
72
72
|
cursor: 'pointer',
|
|
73
73
|
height: BAR_HEIGHT,
|
|
74
74
|
width: exports.VOLUME_SLIDER_WIDTH,
|
|
75
|
+
backgroundImage: `linear-gradient(
|
|
76
|
+
to right,
|
|
77
|
+
white ${mediaVolume * 100}%, rgba(255, 255, 255, 0) ${mediaVolume * 100}%
|
|
78
|
+
)`,
|
|
75
79
|
};
|
|
76
80
|
if (displayVerticalVolumeSlider) {
|
|
77
81
|
return {
|
|
@@ -85,7 +89,7 @@ const MediaVolumeSlider = ({ displayVerticalVolumeSlider }) => {
|
|
|
85
89
|
...commonStyle,
|
|
86
90
|
marginLeft: 5,
|
|
87
91
|
};
|
|
88
|
-
}, [displayVerticalVolumeSlider]);
|
|
92
|
+
}, [displayVerticalVolumeSlider, mediaVolume]);
|
|
89
93
|
const sliderStyle = `
|
|
90
94
|
.${randomClass}::-webkit-slider-thumb {
|
|
91
95
|
-webkit-appearance: none;
|
|
@@ -95,12 +99,6 @@ const MediaVolumeSlider = ({ displayVerticalVolumeSlider }) => {
|
|
|
95
99
|
height: ${KNOB_SIZE}px;
|
|
96
100
|
width: ${KNOB_SIZE}px;
|
|
97
101
|
}
|
|
98
|
-
.${randomClass} {
|
|
99
|
-
background-image: linear-gradient(
|
|
100
|
-
to right,
|
|
101
|
-
white ${mediaVolume * 100}%, rgba(255, 255, 255, 0) ${mediaVolume * 100}%
|
|
102
|
-
);
|
|
103
|
-
}
|
|
104
102
|
|
|
105
103
|
.${randomClass}::-moz-range-thumb {
|
|
106
104
|
-webkit-appearance: none;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const
|
|
1
|
+
export declare const validateSingleFrame: (frame: unknown, variableName: string) => number | null;
|
|
2
2
|
export declare const validateInOutFrames: ({ inFrame, durationInFrames, outFrame, }: {
|
|
3
3
|
inFrame: unknown;
|
|
4
4
|
outFrame: unknown;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.validateInOutFrames = exports.
|
|
4
|
-
const
|
|
3
|
+
exports.validateInOutFrames = exports.validateSingleFrame = void 0;
|
|
4
|
+
const validateSingleFrame = (frame, variableName) => {
|
|
5
5
|
if (typeof frame === 'undefined' || frame === null) {
|
|
6
6
|
return frame !== null && frame !== void 0 ? frame : null;
|
|
7
7
|
}
|
|
@@ -19,11 +19,11 @@ const validateSingleFrameFrame = (frame, variableName) => {
|
|
|
19
19
|
}
|
|
20
20
|
return frame;
|
|
21
21
|
};
|
|
22
|
-
exports.
|
|
22
|
+
exports.validateSingleFrame = validateSingleFrame;
|
|
23
23
|
const validateInOutFrames = ({ inFrame, durationInFrames, outFrame, }) => {
|
|
24
|
-
const validatedInFrame = (0, exports.
|
|
25
|
-
const
|
|
26
|
-
if (validatedInFrame === null &&
|
|
24
|
+
const validatedInFrame = (0, exports.validateSingleFrame)(inFrame, 'inFrame');
|
|
25
|
+
const validatedOutFrame = (0, exports.validateSingleFrame)(outFrame, 'outFrame');
|
|
26
|
+
if (validatedInFrame === null && validatedOutFrame === null) {
|
|
27
27
|
return;
|
|
28
28
|
}
|
|
29
29
|
// Must not be over the duration
|
|
@@ -31,22 +31,22 @@ const validateInOutFrames = ({ inFrame, durationInFrames, outFrame, }) => {
|
|
|
31
31
|
throw new Error('inFrame must be less than (durationInFrames - 1), but is ' +
|
|
32
32
|
validatedInFrame);
|
|
33
33
|
}
|
|
34
|
-
if (
|
|
34
|
+
if (validatedOutFrame !== null && validatedOutFrame > durationInFrames - 1) {
|
|
35
35
|
throw new Error('outFrame must be less than (durationInFrames - 1), but is ' +
|
|
36
|
-
|
|
36
|
+
validatedOutFrame);
|
|
37
37
|
}
|
|
38
38
|
// Must not be under 0
|
|
39
39
|
if (validatedInFrame !== null && validatedInFrame < 0) {
|
|
40
40
|
throw new Error('inFrame must be greater than 0, but is ' + validatedInFrame);
|
|
41
41
|
}
|
|
42
|
-
if (
|
|
43
|
-
throw new Error(
|
|
42
|
+
if (validatedOutFrame !== null && validatedOutFrame <= 0) {
|
|
43
|
+
throw new Error(`outFrame must be greater than 0, but is ${validatedOutFrame}. If you want to render a single frame, use <Thumbnail /> instead.`);
|
|
44
44
|
}
|
|
45
|
-
if (
|
|
45
|
+
if (validatedOutFrame !== null &&
|
|
46
46
|
validatedInFrame !== null &&
|
|
47
|
-
|
|
47
|
+
validatedOutFrame <= validatedInFrame) {
|
|
48
48
|
throw new Error('outFrame must be greater than inFrame, but is ' +
|
|
49
|
-
|
|
49
|
+
validatedOutFrame +
|
|
50
50
|
' <= ' +
|
|
51
51
|
validatedInFrame);
|
|
52
52
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/player",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.34",
|
|
4
4
|
"description": "Remotion Player",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
],
|
|
28
28
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"remotion": "3.3.
|
|
30
|
+
"remotion": "3.3.34"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"react": ">=16.8.0",
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"publishConfig": {
|
|
62
62
|
"access": "public"
|
|
63
63
|
},
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "b078979b3e2f5cc4d240f112b827e7ef951aa318"
|
|
65
65
|
}
|