@remotion/player 4.0.521 → 4.0.523

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.
@@ -85,7 +85,7 @@ const usePlayback = ({ loop, playbackRate, moveToBeginningWhenEnded, inFrame, ou
85
85
  const callback = () => {
86
86
  const newState = sharedAudioContext === null || sharedAudioContext === void 0 ? void 0 : sharedAudioContext.getAudioContextState();
87
87
  if (newState && shouldForceAnchorChange(newState)) {
88
- (0, set_global_time_anchor_js_1.setGlobalTimeAnchor)({
88
+ const changed = (0, set_global_time_anchor_js_1.setGlobalTimeAnchor)({
89
89
  audioContext,
90
90
  audioSyncAnchor: sharedAudioContext.audioSyncAnchor,
91
91
  absoluteTimeInSeconds: getCurrentFrame() / config.fps,
@@ -93,6 +93,9 @@ const usePlayback = ({ loop, playbackRate, moveToBeginningWhenEnded, inFrame, ou
93
93
  logLevel,
94
94
  force: true,
95
95
  });
96
+ if (changed) {
97
+ sharedAudioContext.audioSyncAnchorEmitter.dispatch('changed');
98
+ }
96
99
  }
97
100
  };
98
101
  audioContext === null || audioContext === void 0 ? void 0 : audioContext.addEventListener('statechange', callback);
@@ -1014,7 +1014,7 @@ var usePlayback = ({
1014
1014
  const callback = () => {
1015
1015
  const newState = sharedAudioContext?.getAudioContextState();
1016
1016
  if (newState && shouldForceAnchorChange(newState)) {
1017
- setGlobalTimeAnchor({
1017
+ const changed = setGlobalTimeAnchor({
1018
1018
  audioContext,
1019
1019
  audioSyncAnchor: sharedAudioContext.audioSyncAnchor,
1020
1020
  absoluteTimeInSeconds: getCurrentFrame() / config.fps,
@@ -1022,6 +1022,9 @@ var usePlayback = ({
1022
1022
  logLevel,
1023
1023
  force: true
1024
1024
  });
1025
+ if (changed) {
1026
+ sharedAudioContext.audioSyncAnchorEmitter.dispatch("changed");
1027
+ }
1025
1028
  }
1026
1029
  };
1027
1030
  audioContext?.addEventListener("statechange", callback);
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "url": "https://github.com/remotion-dev/remotion/tree/main/packages/player"
4
4
  },
5
5
  "name": "@remotion/player",
6
- "version": "4.0.521",
6
+ "version": "4.0.523",
7
7
  "description": "React component for embedding a Remotion preview into your app",
8
8
  "main": "dist/cjs/index.js",
9
9
  "types": "dist/cjs/index.d.ts",
@@ -35,7 +35,7 @@
35
35
  ],
36
36
  "license": "SEE LICENSE IN LICENSE.md",
37
37
  "dependencies": {
38
- "remotion": "4.0.521"
38
+ "remotion": "4.0.523"
39
39
  },
40
40
  "peerDependencies": {
41
41
  "react": ">=16.8.0",
@@ -49,7 +49,7 @@
49
49
  "react-dom": "19.2.3",
50
50
  "webpack": "5.105.0",
51
51
  "zod": "4.5.4",
52
- "@remotion/eslint-config-internal": "4.0.521",
52
+ "@remotion/eslint-config-internal": "4.0.523",
53
53
  "eslint": "9.19.0",
54
54
  "@typescript/native-preview": "7.0.0-dev.20260217.1"
55
55
  },