@remotion/media 4.0.419 → 4.0.421

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.
@@ -1571,7 +1571,7 @@ var useMediaInTimeline = ({
1571
1571
  volume: volumes,
1572
1572
  showInTimeline: true,
1573
1573
  nonce,
1574
- startMediaFrom: 0 - startsAt,
1574
+ startMediaFrom: 0 - startsAt + (trimBefore ?? 0),
1575
1575
  doesVolumeChange,
1576
1576
  loopDisplay: undefined,
1577
1577
  playbackRate,
@@ -1607,7 +1607,8 @@ var useMediaInTimeline = ({
1607
1607
  startsAt,
1608
1608
  unregisterSequence,
1609
1609
  volumes,
1610
- frame
1610
+ frame,
1611
+ trimBefore
1611
1612
  ]);
1612
1613
  return {
1613
1614
  id: mediaId
@@ -1708,13 +1709,14 @@ var AudioForPreviewAssertedShowing = ({
1708
1709
  if (!bufferingContext) {
1709
1710
  throw new Error("useMediaPlayback must be used inside a <BufferingContext>");
1710
1711
  }
1712
+ const effectiveMuted = muted || mediaMuted || userPreferredVolume <= 0;
1711
1713
  const isPlayerBuffering = Internals6.useIsPlayerBuffering(bufferingContext);
1712
1714
  const initialPlaying = useRef(playing && !isPlayerBuffering);
1713
1715
  const initialIsPremounting = useRef(isPremounting);
1714
1716
  const initialIsPostmounting = useRef(isPostmounting);
1715
1717
  const initialGlobalPlaybackRate = useRef(globalPlaybackRate);
1716
1718
  const initialPlaybackRate = useRef(playbackRate);
1717
- const initialMuted = useRef(muted);
1719
+ const initialMuted = useRef(effectiveMuted);
1718
1720
  useEffect2(() => {
1719
1721
  if (!sharedAudioContext)
1720
1722
  return;
@@ -1855,7 +1857,6 @@ var AudioForPreviewAssertedShowing = ({
1855
1857
  }
1856
1858
  mediaPlayer.setTrimAfter(trimAfter, currentTimeRef.current);
1857
1859
  }, [trimAfter, mediaPlayerReady]);
1858
- const effectiveMuted = muted || mediaMuted || userPreferredVolume <= 0;
1859
1860
  useLayoutEffect(() => {
1860
1861
  const audioPlayer = mediaPlayerRef.current;
1861
1862
  if (!audioPlayer || !mediaPlayerReady)
@@ -4165,13 +4166,14 @@ var VideoForPreviewAssertedShowing = ({
4165
4166
  if (!buffering) {
4166
4167
  throw new Error("useMediaPlayback must be used inside a <BufferingContext>");
4167
4168
  }
4169
+ const effectiveMuted = isSequenceHidden || muted || mediaMuted || userPreferredVolume <= 0;
4168
4170
  const isPlayerBuffering = Internals16.useIsPlayerBuffering(buffering);
4169
4171
  const initialPlaying = useRef2(playing && !isPlayerBuffering);
4170
4172
  const initialIsPremounting = useRef2(isPremounting);
4171
4173
  const initialIsPostmounting = useRef2(isPostmounting);
4172
4174
  const initialGlobalPlaybackRate = useRef2(globalPlaybackRate);
4173
4175
  const initialPlaybackRate = useRef2(playbackRate);
4174
- const initialMuted = useRef2(muted);
4176
+ const initialMuted = useRef2(effectiveMuted);
4175
4177
  useEffect3(() => {
4176
4178
  if (!sharedAudioContext)
4177
4179
  return;
@@ -4310,7 +4312,6 @@ var VideoForPreviewAssertedShowing = ({
4310
4312
  }
4311
4313
  mediaPlayer.setTrimAfter(trimAfter, currentTimeRef.current);
4312
4314
  }, [trimAfter, mediaPlayerReady]);
4313
- const effectiveMuted = isSequenceHidden || muted || mediaMuted || userPreferredVolume <= 0;
4314
4315
  useLayoutEffect3(() => {
4315
4316
  const mediaPlayer = mediaPlayerRef.current;
4316
4317
  if (!mediaPlayer || !mediaPlayerReady)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/media",
3
- "version": "4.0.419",
3
+ "version": "4.0.421",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "module": "dist/esm/index.mjs",
@@ -23,14 +23,14 @@
23
23
  },
24
24
  "dependencies": {
25
25
  "mediabunny": "1.29.0",
26
- "remotion": "4.0.419"
26
+ "remotion": "4.0.421"
27
27
  },
28
28
  "peerDependencies": {
29
29
  "react": ">=16.8.0",
30
30
  "react-dom": ">=16.8.0"
31
31
  },
32
32
  "devDependencies": {
33
- "@remotion/eslint-config-internal": "4.0.419",
33
+ "@remotion/eslint-config-internal": "4.0.421",
34
34
  "@vitest/browser-webdriverio": "4.0.9",
35
35
  "eslint": "9.19.0",
36
36
  "react": "19.2.3",