@remotion/media 4.0.483 → 4.0.484

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 (2) hide show
  1. package/dist/esm/index.mjs +8 -21
  2. package/package.json +4 -3
@@ -4968,32 +4968,19 @@ var VideoForPreviewAssertedShowing = ({
4968
4968
  };
4969
4969
  }, [_experimentalInitiallyDrawCachedFrame, src]);
4970
4970
  useEffect2(() => {
4971
- if (!sharedAudioContext)
4972
- return;
4973
- if (!sharedAudioContext.audioContext)
4974
- return;
4975
- const {
4976
- audioContext,
4977
- gainNode,
4978
- audioSyncAnchor,
4979
- scheduleAudioNode,
4980
- unscheduleAudioNode
4981
- } = sharedAudioContext;
4982
- if (!gainNode) {
4983
- return;
4984
- }
4971
+ const sharedAudioContextForMediaPlayer = sharedAudioContext?.audioContext && sharedAudioContext.gainNode ? {
4972
+ audioContext: sharedAudioContext.audioContext,
4973
+ gainNode: sharedAudioContext.gainNode,
4974
+ audioSyncAnchor: sharedAudioContext.audioSyncAnchor,
4975
+ scheduleAudioNode: sharedAudioContext.scheduleAudioNode,
4976
+ unscheduleAudioNode: sharedAudioContext.unscheduleAudioNode
4977
+ } : null;
4985
4978
  try {
4986
4979
  const player = new MediaPlayer({
4987
4980
  canvas: canvasRef.current,
4988
4981
  src: preloadedSrc,
4989
4982
  logLevel,
4990
- sharedAudioContext: {
4991
- audioContext,
4992
- gainNode,
4993
- audioSyncAnchor,
4994
- scheduleAudioNode,
4995
- unscheduleAudioNode
4996
- },
4983
+ sharedAudioContext: sharedAudioContextForMediaPlayer,
4997
4984
  loop,
4998
4985
  trimAfter: initialTrimAfterRef.current,
4999
4986
  trimBefore: initialTrimBeforeRef.current,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/media",
3
- "version": "4.0.483",
3
+ "version": "4.0.484",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "module": "dist/esm/index.mjs",
@@ -23,7 +23,7 @@
23
23
  },
24
24
  "dependencies": {
25
25
  "mediabunny": "1.47.0",
26
- "remotion": "4.0.483",
26
+ "remotion": "4.0.484",
27
27
  "zod": "4.3.6"
28
28
  },
29
29
  "peerDependencies": {
@@ -31,7 +31,8 @@
31
31
  "react-dom": ">=16.8.0"
32
32
  },
33
33
  "devDependencies": {
34
- "@remotion/eslint-config-internal": "4.0.483",
34
+ "@remotion/eslint-config-internal": "4.0.484",
35
+ "@remotion/player": "4.0.484",
35
36
  "@vitest/browser-webdriverio": "4.0.9",
36
37
  "eslint": "9.19.0",
37
38
  "react": "19.2.3",