@remotion/media 4.0.352 → 4.0.354

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.
Files changed (43) hide show
  1. package/dist/audio/audio-for-rendering.js +37 -27
  2. package/dist/audio/audio.js +6 -3
  3. package/dist/audio/props.d.ts +1 -7
  4. package/dist/audio-extraction/audio-iterator.d.ts +1 -1
  5. package/dist/audio-extraction/audio-iterator.js +2 -2
  6. package/dist/audio-extraction/audio-manager.d.ts +1 -1
  7. package/dist/audio-extraction/extract-audio.d.ts +7 -4
  8. package/dist/audio-extraction/extract-audio.js +16 -7
  9. package/dist/caches.d.ts +6 -6
  10. package/dist/caches.js +5 -6
  11. package/dist/convert-audiodata/apply-volume.d.ts +1 -0
  12. package/dist/convert-audiodata/apply-volume.js +17 -0
  13. package/dist/convert-audiodata/convert-audiodata.d.ts +2 -2
  14. package/dist/convert-audiodata/convert-audiodata.js +13 -7
  15. package/dist/convert-audiodata/resample-audiodata.d.ts +1 -2
  16. package/dist/convert-audiodata/resample-audiodata.js +42 -20
  17. package/dist/esm/index.mjs +242 -182
  18. package/dist/extract-frame-and-audio.d.ts +3 -2
  19. package/dist/extract-frame-and-audio.js +4 -3
  20. package/dist/looped-frame.d.ts +9 -0
  21. package/dist/looped-frame.js +10 -0
  22. package/dist/video/media-player.d.ts +28 -30
  23. package/dist/video/media-player.js +174 -314
  24. package/dist/video/new-video-for-preview.d.ts +1 -1
  25. package/dist/video/new-video-for-preview.js +12 -18
  26. package/dist/video/props.d.ts +0 -5
  27. package/dist/video/timeout-utils.d.ts +2 -0
  28. package/dist/video/timeout-utils.js +18 -0
  29. package/dist/video/video-for-preview.d.ts +11 -0
  30. package/dist/video/video-for-preview.js +113 -0
  31. package/dist/video/video-for-rendering.js +41 -31
  32. package/dist/video/video.js +2 -2
  33. package/dist/video-extraction/extract-frame-via-broadcast-channel.d.ts +4 -3
  34. package/dist/video-extraction/extract-frame-via-broadcast-channel.js +9 -5
  35. package/dist/video-extraction/extract-frame.d.ts +1 -1
  36. package/dist/video-extraction/extract-frame.js +3 -0
  37. package/dist/video-extraction/get-frames-since-keyframe.d.ts +1 -1
  38. package/dist/video-extraction/get-frames-since-keyframe.js +7 -8
  39. package/dist/video-extraction/keyframe-bank.d.ts +1 -1
  40. package/dist/video-extraction/keyframe-bank.js +7 -7
  41. package/dist/video-extraction/keyframe-manager.d.ts +1 -1
  42. package/dist/video-extraction/keyframe-manager.js +6 -6
  43. package/package.json +3 -3
@@ -1,5 +1,5 @@
1
+ import { Internals } from 'remotion';
1
2
  import { getMaxVideoCacheSize, getTotalCacheStats, SAFE_BACK_WINDOW_IN_SECONDS, } from '../caches';
2
- import { Log } from '../log';
3
3
  import { getFramesSinceKeyframe } from './get-frames-since-keyframe';
4
4
  export const makeKeyframeManager = () => {
5
5
  // src => {[startTimestampInSeconds]: KeyframeBank
@@ -20,10 +20,10 @@ export const makeKeyframeManager = () => {
20
20
  if (size === 0) {
21
21
  continue;
22
22
  }
23
- Log.verbose(logLevel, `[Video] Open frames for src ${src}: ${timestamps.join(', ')}`);
23
+ Internals.Log.verbose({ logLevel, tag: '@remotion/media' }, `Open frames for src ${src}: ${timestamps.join(', ')}`);
24
24
  }
25
25
  }
26
- Log.verbose(logLevel, `[Video] Cache stats: ${count} open frames, ${totalSize} bytes`);
26
+ Internals.Log.verbose({ logLevel, tag: '@remotion/media' }, `Video cache stats: ${count} open frames, ${totalSize} bytes`);
27
27
  };
28
28
  const getCacheStats = async () => {
29
29
  let count = 0;
@@ -64,7 +64,7 @@ export const makeKeyframeManager = () => {
64
64
  if (mostInThePastBank) {
65
65
  await mostInThePastBank.prepareForDeletion();
66
66
  delete sources[mostInThePastSrc][mostInThePastBank.startTimestampInSeconds];
67
- Log.verbose(logLevel, `[Video] Deleted frames for src ${mostInThePastSrc} from ${mostInThePastBank.startTimestampInSeconds}sec to ${mostInThePastBank.endTimestampInSeconds}sec to free up memory.`);
67
+ Internals.Log.verbose({ logLevel, tag: '@remotion/media' }, `Deleted frames for src ${mostInThePastSrc} from ${mostInThePastBank.startTimestampInSeconds}sec to ${mostInThePastBank.endTimestampInSeconds}sec to free up memory.`);
68
68
  }
69
69
  };
70
70
  const ensureToStayUnderMaxCacheSize = async (logLevel) => {
@@ -86,7 +86,7 @@ export const makeKeyframeManager = () => {
86
86
  const { endTimestampInSeconds, startTimestampInSeconds } = bank;
87
87
  if (endTimestampInSeconds < threshold) {
88
88
  await bank.prepareForDeletion();
89
- Log.verbose(logLevel, `[Video] Cleared frames for src ${src} from ${startTimestampInSeconds}sec to ${endTimestampInSeconds}sec`);
89
+ Internals.Log.verbose({ logLevel, tag: '@remotion/media' }, `[Video] Cleared frames for src ${src} from ${startTimestampInSeconds}sec to ${endTimestampInSeconds}sec`);
90
90
  delete sources[src][startTimeInSeconds];
91
91
  }
92
92
  else {
@@ -122,7 +122,7 @@ export const makeKeyframeManager = () => {
122
122
  if (await (await existingBank).hasTimestampInSecond(timestamp)) {
123
123
  return existingBank;
124
124
  }
125
- Log.verbose(logLevel, `[Video] Bank exists but frames have already been evicted!`);
125
+ Internals.Log.verbose({ logLevel, tag: '@remotion/media' }, `Keyframe bank exists but frames have already been evicted!`);
126
126
  // Bank exists but frames have already been evicted!
127
127
  // First delete it entirely
128
128
  await (await existingBank).prepareForDeletion();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/media",
3
- "version": "4.0.352",
3
+ "version": "4.0.354",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "module": "dist/esm/index.mjs",
@@ -15,7 +15,7 @@
15
15
  "dependencies": {
16
16
  "mediabunny": "1.17.0",
17
17
  "webdriverio": "9.19.2",
18
- "remotion": "4.0.352"
18
+ "remotion": "4.0.354"
19
19
  },
20
20
  "peerDependencies": {
21
21
  "react": ">=16.8.0",
@@ -27,7 +27,7 @@
27
27
  "react": "19.0.0",
28
28
  "react-dom": "19.0.0",
29
29
  "vitest": "3.2.4",
30
- "@remotion/eslint-config-internal": "4.0.352"
30
+ "@remotion/eslint-config-internal": "4.0.354"
31
31
  },
32
32
  "keywords": [],
33
33
  "publishConfig": {