@remotion/webcodecs 4.0.333 → 4.0.335

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.
@@ -383,8 +383,7 @@ var rotateAndResizeVideoFrame = ({
383
383
  if (normalized === 0 && tentativeDimensions.height === frame.displayHeight && tentativeDimensions.width === frame.displayWidth && !mustProcess) {
384
384
  return frame;
385
385
  }
386
- const frameRotation = frame.rotation ?? 0;
387
- const canvasRotationToApply = normalizeVideoRotation(normalized - frameRotation);
386
+ const canvasRotationToApply = normalizeVideoRotation(normalized);
388
387
  const { width, height } = calculateNewDimensionsFromRotateAndScale({
389
388
  height: frame.displayHeight,
390
389
  width: frame.displayWidth,
@@ -5133,7 +5132,7 @@ var reencodeVideoTrack = async ({
5133
5132
  if (videoOperation.type !== "reencode") {
5134
5133
  throw new Error(`Video track with ID ${track.trackId} could not be resolved with a valid operation. Received ${JSON.stringify(videoOperation)}, but must be either "copy", "reencode", "drop" or "fail"`);
5135
5134
  }
5136
- const rotation = (videoOperation.rotate ?? rotate) + track.rotation;
5135
+ const rotation = videoOperation.rotate ?? rotate;
5137
5136
  const { height: newHeight, width: newWidth } = calculateNewDimensionsFromRotateAndScale({
5138
5137
  width: track.codedWidth,
5139
5138
  height: track.codedHeight,
@@ -16,7 +16,7 @@ const reencodeVideoTrack = async ({ videoOperation, rotate, track, logLevel, abo
16
16
  if (videoOperation.type !== 'reencode') {
17
17
  throw new Error(`Video track with ID ${track.trackId} could not be resolved with a valid operation. Received ${JSON.stringify(videoOperation)}, but must be either "copy", "reencode", "drop" or "fail"`);
18
18
  }
19
- const rotation = (videoOperation.rotate ?? rotate) + track.rotation;
19
+ const rotation = videoOperation.rotate ?? rotate;
20
20
  const { height: newHeight, width: newWidth } = (0, rotation_1.calculateNewDimensionsFromRotateAndScale)({
21
21
  width: track.codedWidth,
22
22
  height: track.codedHeight,
@@ -32,9 +32,7 @@ const rotateAndResizeVideoFrame = ({ frame, rotation, needsToBeMultipleOfTwo = f
32
32
  !mustProcess) {
33
33
  return frame;
34
34
  }
35
- // @ts-expect-error
36
- const frameRotation = frame.rotation ?? 0;
37
- const canvasRotationToApply = (0, exports.normalizeVideoRotation)(normalized - frameRotation);
35
+ const canvasRotationToApply = (0, exports.normalizeVideoRotation)(normalized);
38
36
  const { width, height } = (0, rotation_1.calculateNewDimensionsFromRotateAndScale)({
39
37
  height: frame.displayHeight,
40
38
  width: frame.displayWidth,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/webcodecs",
3
- "version": "4.0.333",
3
+ "version": "4.0.335",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "module": "dist/esm/index.mjs",
@@ -19,8 +19,8 @@
19
19
  "author": "Jonny Burger <jonny@remotion.dev>",
20
20
  "license": "Remotion License (See https://remotion.dev/docs/webcodecs#license)",
21
21
  "dependencies": {
22
- "@remotion/licensing": "4.0.333",
23
- "@remotion/media-parser": "4.0.333"
22
+ "@remotion/licensing": "4.0.335",
23
+ "@remotion/media-parser": "4.0.335"
24
24
  },
25
25
  "peerDependencies": {},
26
26
  "devDependencies": {
@@ -29,8 +29,8 @@
29
29
  "vite": "5.4.19",
30
30
  "@playwright/test": "1.51.1",
31
31
  "eslint": "9.19.0",
32
- "@remotion/eslint-config-internal": "4.0.333",
33
- "@remotion/example-videos": "4.0.333"
32
+ "@remotion/eslint-config-internal": "4.0.335",
33
+ "@remotion/example-videos": "4.0.335"
34
34
  },
35
35
  "keywords": [],
36
36
  "publishConfig": {