@remotion/web-renderer 4.0.484 → 4.0.486
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/LICENSE.md +49 -0
- package/dist/drawing/handle-mask.d.ts +2 -2
- package/dist/drawing/text/text-decoration.d.ts +2 -0
- package/dist/esm/index.mjs +96 -12
- package/dist/mediabunny-mappings.d.ts +1 -1
- package/package.json +15 -15
package/LICENSE.md
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Remotion License
|
|
2
|
+
|
|
3
|
+
In Remotion 5.0, the license will slightly change. [View the changes here](https://github.com/remotion-dev/remotion/pull/3750).
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Depending on the type of your legal entity, you are granted permission to use Remotion for your project. Individuals and small companies are allowed to use Remotion to create videos for free (even commercial), while a company license is required for for-profit organizations of a certain size. This two-tier system was designed to ensure funding for this project while still allowing the source code to be available and the program to be free for most. Read below for the exact terms of use.
|
|
8
|
+
|
|
9
|
+
- [Free License](#free-license)
|
|
10
|
+
- [Company License](#company-license)
|
|
11
|
+
|
|
12
|
+
## Free License
|
|
13
|
+
|
|
14
|
+
Copyright © 2026 [Remotion](https://www.remotion.dev)
|
|
15
|
+
|
|
16
|
+
### Eligibility
|
|
17
|
+
|
|
18
|
+
You are eligible to use Remotion for free if you are:
|
|
19
|
+
|
|
20
|
+
- an individual
|
|
21
|
+
- a for-profit organization with up to 3 employees
|
|
22
|
+
- a non-profit or not-for-profit organization
|
|
23
|
+
- evaluating whether Remotion is a good fit, and are not yet using it in a commercial way
|
|
24
|
+
|
|
25
|
+
### Allowed use cases
|
|
26
|
+
|
|
27
|
+
Permission is hereby granted, free of charge, to any person eligible for the "Free License", to use the software non-commercially or commercially for the purpose of creating videos and images and to modify the software to their own liking, for the purpose of fulfilling their custom use case or to contribute bug fixes or improvements back to Remotion.
|
|
28
|
+
|
|
29
|
+
### Disallowed use cases
|
|
30
|
+
|
|
31
|
+
It is not allowed to copy or modify Remotion code for the purpose of selling, renting, licensing, relicensing, or sublicensing your own derivate of Remotion.
|
|
32
|
+
|
|
33
|
+
### Warranty notice
|
|
34
|
+
|
|
35
|
+
The software is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose, and non-infringement. In no event shall the author or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the software.
|
|
36
|
+
|
|
37
|
+
### Support
|
|
38
|
+
|
|
39
|
+
Support is provided on a best-we-can-do basis via GitHub Issues and Discord.
|
|
40
|
+
|
|
41
|
+
## Company License
|
|
42
|
+
|
|
43
|
+
You are required to obtain a Company License to use Remotion if you are not within the group of entities eligible for a Free License. This license will enable you to use Remotion for the allowed use cases specified in the Free License, and give you access to prioritized support (read the [Support Policy](https://www.remotion.dev/docs/support)).
|
|
44
|
+
|
|
45
|
+
Visit [remotion.pro](https://www.remotion.pro/license) for pricing and to buy a license.
|
|
46
|
+
|
|
47
|
+
### FAQs
|
|
48
|
+
|
|
49
|
+
Are you not sure whether you need a Company License because of an edge case? Here are some [frequently asked questions](https://www.remotion.pro/faq).
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { LinearGradientInfo } from './parse-linear-gradient';
|
|
2
2
|
export declare const getPrecomposeRectForMask: (element: HTMLElement | SVGElement) => DOMRect;
|
|
3
|
-
export declare const handleMask: ({ gradientInfo,
|
|
3
|
+
export declare const handleMask: ({ gradientInfo, maskRect, precomposeRect, tempContext, scale, }: {
|
|
4
4
|
gradientInfo: LinearGradientInfo;
|
|
5
|
-
|
|
5
|
+
maskRect: DOMRect;
|
|
6
6
|
precomposeRect: DOMRect;
|
|
7
7
|
tempContext: OffscreenCanvasRenderingContext2D;
|
|
8
8
|
scale: number;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
type TextDecorationLine = 'underline' | 'overline' | 'line-through';
|
|
2
|
+
export type TextDecorationStyle = 'solid' | 'double' | 'dotted' | 'dashed' | 'wavy';
|
|
2
3
|
export type TextDecoration = {
|
|
3
4
|
lines: TextDecorationLine[];
|
|
4
5
|
color: string;
|
|
5
6
|
thickness: number;
|
|
7
|
+
style: TextDecorationStyle;
|
|
6
8
|
};
|
|
7
9
|
export declare const parseTextDecoration: ({ onlyBackgroundClipText, style, }: {
|
|
8
10
|
onlyBackgroundClipText: boolean;
|
package/dist/esm/index.mjs
CHANGED
|
@@ -3866,12 +3866,12 @@ var getPrecomposeRectForMask = (element) => {
|
|
|
3866
3866
|
};
|
|
3867
3867
|
var handleMask = ({
|
|
3868
3868
|
gradientInfo,
|
|
3869
|
-
|
|
3869
|
+
maskRect,
|
|
3870
3870
|
precomposeRect,
|
|
3871
3871
|
tempContext,
|
|
3872
3872
|
scale
|
|
3873
3873
|
}) => {
|
|
3874
|
-
const rectToFill = new DOMRect((
|
|
3874
|
+
const rectToFill = new DOMRect((maskRect.left - precomposeRect.left) * scale, (maskRect.top - precomposeRect.top) * scale, maskRect.width * scale, maskRect.height * scale);
|
|
3875
3875
|
const gradient = createCanvasGradient({
|
|
3876
3876
|
ctx: tempContext,
|
|
3877
3877
|
rect: rectToFill,
|
|
@@ -3998,7 +3998,7 @@ var processNode = async ({
|
|
|
3998
3998
|
if (precompositing.needsMaskImage) {
|
|
3999
3999
|
handleMask({
|
|
4000
4000
|
gradientInfo: precompositing.needsMaskImage,
|
|
4001
|
-
|
|
4001
|
+
maskRect: dimensions,
|
|
4002
4002
|
precomposeRect,
|
|
4003
4003
|
tempContext,
|
|
4004
4004
|
scale
|
|
@@ -4133,14 +4133,17 @@ var currentColorValues = new Set(["currentcolor", "currentColor"]);
|
|
|
4133
4133
|
var getDefaultTextDecorationThickness = (fontSizePx) => {
|
|
4134
4134
|
return Math.max(1, Number.isFinite(fontSizePx) ? fontSizePx / 16 : 1);
|
|
4135
4135
|
};
|
|
4136
|
+
var getTextDecorationStyle = (style) => {
|
|
4137
|
+
if (style === "double" || style === "dotted" || style === "dashed" || style === "wavy") {
|
|
4138
|
+
return style;
|
|
4139
|
+
}
|
|
4140
|
+
return "solid";
|
|
4141
|
+
};
|
|
4136
4142
|
var parseTextDecoration = ({
|
|
4137
4143
|
onlyBackgroundClipText,
|
|
4138
4144
|
style
|
|
4139
4145
|
}) => {
|
|
4140
|
-
const textDecorationStyle = style.getPropertyValue("text-decoration-style");
|
|
4141
|
-
if (textDecorationStyle && textDecorationStyle !== "solid") {
|
|
4142
|
-
return null;
|
|
4143
|
-
}
|
|
4146
|
+
const textDecorationStyle = getTextDecorationStyle(style.getPropertyValue("text-decoration-style").trim());
|
|
4144
4147
|
const textDecorationLine = style.getPropertyValue("text-decoration-line");
|
|
4145
4148
|
const lineParts = textDecorationLine.split(/\s+/);
|
|
4146
4149
|
const lines = textDecorationLines.filter((line) => lineParts.includes(line));
|
|
@@ -4157,7 +4160,8 @@ var parseTextDecoration = ({
|
|
|
4157
4160
|
return {
|
|
4158
4161
|
lines,
|
|
4159
4162
|
color: onlyBackgroundClipText || !textDecorationColor || currentColorValues.has(textDecorationColor) ? onlyBackgroundClipText ? "black" : style.color : textDecorationColor,
|
|
4160
|
-
thickness
|
|
4163
|
+
thickness,
|
|
4164
|
+
style: textDecorationStyle
|
|
4161
4165
|
};
|
|
4162
4166
|
};
|
|
4163
4167
|
var getTextDecorations = ({
|
|
@@ -4204,6 +4208,54 @@ var getTextDecorationY = ({
|
|
|
4204
4208
|
}
|
|
4205
4209
|
return y - actualAscent * 0.35;
|
|
4206
4210
|
};
|
|
4211
|
+
var getTextDecorationLineDashPattern = (style, thickness) => {
|
|
4212
|
+
if (style === "dashed") {
|
|
4213
|
+
return [thickness * 2, thickness];
|
|
4214
|
+
}
|
|
4215
|
+
if (style === "dotted") {
|
|
4216
|
+
return [thickness, thickness];
|
|
4217
|
+
}
|
|
4218
|
+
return [];
|
|
4219
|
+
};
|
|
4220
|
+
var drawWavyTextDecorationLine = ({
|
|
4221
|
+
contextToDraw,
|
|
4222
|
+
endX,
|
|
4223
|
+
lineY,
|
|
4224
|
+
startX,
|
|
4225
|
+
thickness
|
|
4226
|
+
}) => {
|
|
4227
|
+
const step = Math.max(2, thickness);
|
|
4228
|
+
const amplitude = step;
|
|
4229
|
+
const halfWavelength = step * 2;
|
|
4230
|
+
const wavelength = halfWavelength * 2;
|
|
4231
|
+
const phaseStartX = Math.floor(startX / wavelength) * wavelength;
|
|
4232
|
+
contextToDraw.save();
|
|
4233
|
+
contextToDraw.beginPath();
|
|
4234
|
+
contextToDraw.rect(startX, lineY - amplitude - thickness, endX - startX, (amplitude + thickness) * 2);
|
|
4235
|
+
contextToDraw.clip();
|
|
4236
|
+
contextToDraw.beginPath();
|
|
4237
|
+
contextToDraw.moveTo(phaseStartX, lineY);
|
|
4238
|
+
let x = phaseStartX;
|
|
4239
|
+
let direction = 1;
|
|
4240
|
+
while (x < endX) {
|
|
4241
|
+
contextToDraw.quadraticCurveTo(x + halfWavelength / 2, lineY + direction * amplitude * 2, x + halfWavelength, lineY);
|
|
4242
|
+
x += halfWavelength;
|
|
4243
|
+
direction = -direction;
|
|
4244
|
+
}
|
|
4245
|
+
contextToDraw.stroke();
|
|
4246
|
+
contextToDraw.restore();
|
|
4247
|
+
};
|
|
4248
|
+
var strokeTextDecorationLine = ({
|
|
4249
|
+
contextToDraw,
|
|
4250
|
+
endX,
|
|
4251
|
+
lineY,
|
|
4252
|
+
startX
|
|
4253
|
+
}) => {
|
|
4254
|
+
contextToDraw.beginPath();
|
|
4255
|
+
contextToDraw.moveTo(startX, lineY);
|
|
4256
|
+
contextToDraw.lineTo(endX, lineY);
|
|
4257
|
+
contextToDraw.stroke();
|
|
4258
|
+
};
|
|
4207
4259
|
var drawTextDecoration = ({
|
|
4208
4260
|
contextToDraw,
|
|
4209
4261
|
fontSizePx,
|
|
@@ -4234,10 +4286,42 @@ var drawTextDecoration = ({
|
|
|
4234
4286
|
thickness: textDecoration.thickness,
|
|
4235
4287
|
fontSizePx
|
|
4236
4288
|
});
|
|
4237
|
-
|
|
4238
|
-
|
|
4239
|
-
|
|
4240
|
-
|
|
4289
|
+
if (textDecoration.style === "wavy") {
|
|
4290
|
+
contextToDraw.setLineDash([]);
|
|
4291
|
+
drawWavyTextDecorationLine({
|
|
4292
|
+
contextToDraw,
|
|
4293
|
+
endX,
|
|
4294
|
+
lineY,
|
|
4295
|
+
startX,
|
|
4296
|
+
thickness: textDecoration.thickness
|
|
4297
|
+
});
|
|
4298
|
+
continue;
|
|
4299
|
+
}
|
|
4300
|
+
if (textDecoration.style === "double") {
|
|
4301
|
+
contextToDraw.setLineDash([]);
|
|
4302
|
+
strokeTextDecorationLine({
|
|
4303
|
+
contextToDraw,
|
|
4304
|
+
endX,
|
|
4305
|
+
lineY: lineY - textDecoration.thickness,
|
|
4306
|
+
startX
|
|
4307
|
+
});
|
|
4308
|
+
strokeTextDecorationLine({
|
|
4309
|
+
contextToDraw,
|
|
4310
|
+
endX,
|
|
4311
|
+
lineY: lineY + textDecoration.thickness,
|
|
4312
|
+
startX
|
|
4313
|
+
});
|
|
4314
|
+
contextToDraw.setLineDash([]);
|
|
4315
|
+
continue;
|
|
4316
|
+
}
|
|
4317
|
+
contextToDraw.setLineDash(getTextDecorationLineDashPattern(textDecoration.style, textDecoration.thickness));
|
|
4318
|
+
strokeTextDecorationLine({
|
|
4319
|
+
contextToDraw,
|
|
4320
|
+
endX,
|
|
4321
|
+
lineY,
|
|
4322
|
+
startX
|
|
4323
|
+
});
|
|
4324
|
+
contextToDraw.setLineDash([]);
|
|
4241
4325
|
}
|
|
4242
4326
|
}
|
|
4243
4327
|
contextToDraw.restore();
|
|
@@ -5,7 +5,7 @@ export type WebRendererContainer = 'mp4' | 'webm' | 'mkv' | 'mov' | 'wav' | 'mp3
|
|
|
5
5
|
export type WebRendererAudioCodec = 'aac' | 'opus' | 'mp3' | 'vorbis' | 'pcm-s16' | 'flac';
|
|
6
6
|
export type WebRendererQuality = 'very-low' | 'low' | 'medium' | 'high' | 'very-high';
|
|
7
7
|
export declare const isAudioOnlyContainer: (container: WebRendererContainer) => boolean;
|
|
8
|
-
export declare const codecToMediabunnyCodec: (codec: WebRendererVideoCodec) => "av1" | "avc" | "hevc" | "vp8" | "vp9";
|
|
8
|
+
export declare const codecToMediabunnyCodec: (codec: WebRendererVideoCodec) => "av1" | "avc" | "hevc" | "prores" | "vp8" | "vp9";
|
|
9
9
|
export declare const containerToMediabunnyContainer: (container: WebRendererContainer) => OutputFormat;
|
|
10
10
|
export declare const getDefaultVideoCodecForContainer: (container: WebRendererContainer) => WebRendererVideoCodec | null;
|
|
11
11
|
export declare const getDefaultContainerForCodec: (codec: WebRendererVideoCodec) => WebRendererContainer;
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"url": "https://github.com/remotion-dev/remotion/tree/main/packages/web-renderer"
|
|
4
4
|
},
|
|
5
5
|
"name": "@remotion/web-renderer",
|
|
6
|
-
"version": "4.0.
|
|
6
|
+
"version": "4.0.486",
|
|
7
7
|
"main": "dist/index.js",
|
|
8
8
|
"type": "module",
|
|
9
9
|
"scripts": {
|
|
@@ -17,24 +17,24 @@
|
|
|
17
17
|
"remotion": "cd ../example && bunx remotion studio ../web-renderer/src/test/studio.ts --public-dir=../example-videos/videos"
|
|
18
18
|
},
|
|
19
19
|
"author": "Remotion <jonny@remotion.dev>",
|
|
20
|
-
"license": "
|
|
20
|
+
"license": "SEE LICENSE IN LICENSE.md",
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@mediabunny/mp3-encoder": "1.
|
|
23
|
-
"@mediabunny/aac-encoder": "1.
|
|
24
|
-
"@mediabunny/flac-encoder": "1.
|
|
25
|
-
"@remotion/licensing": "4.0.
|
|
26
|
-
"remotion": "4.0.
|
|
27
|
-
"mediabunny": "1.
|
|
22
|
+
"@mediabunny/mp3-encoder": "1.50.3",
|
|
23
|
+
"@mediabunny/aac-encoder": "1.50.3",
|
|
24
|
+
"@mediabunny/flac-encoder": "1.50.3",
|
|
25
|
+
"@remotion/licensing": "4.0.486",
|
|
26
|
+
"remotion": "4.0.486",
|
|
27
|
+
"mediabunny": "1.50.3"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@react-three/fiber": "9.2.0",
|
|
31
|
-
"@remotion/eslint-config-internal": "4.0.
|
|
32
|
-
"@remotion/paths": "4.0.
|
|
33
|
-
"@remotion/player": "4.0.
|
|
34
|
-
"@remotion/media": "4.0.
|
|
35
|
-
"@remotion/shapes": "4.0.
|
|
36
|
-
"@remotion/three": "4.0.
|
|
37
|
-
"@remotion/transitions": "4.0.
|
|
31
|
+
"@remotion/eslint-config-internal": "4.0.486",
|
|
32
|
+
"@remotion/paths": "4.0.486",
|
|
33
|
+
"@remotion/player": "4.0.486",
|
|
34
|
+
"@remotion/media": "4.0.486",
|
|
35
|
+
"@remotion/shapes": "4.0.486",
|
|
36
|
+
"@remotion/three": "4.0.486",
|
|
37
|
+
"@remotion/transitions": "4.0.486",
|
|
38
38
|
"@types/three": "0.170.0",
|
|
39
39
|
"@typescript/native-preview": "7.0.0-dev.20260217.1",
|
|
40
40
|
"@vitejs/plugin-react": "4.3.4",
|