Skip to content

🎥 Make videos programmatically with React

docs(core): explain playing subscription split

Noah Lindnere42ac516e156
diff --git a/packages/core/src/use-playing.ts b/packages/core/src/use-playing.ts
index f13c915300..5fae1838ba 100644
--- a/packages/core/src/use-playing.ts
+++ b/packages/core/src/use-playing.ts
@@ -5,5 +5,6 @@ import {SetTimelineContext} from './TimelineContext.js';
export const usePlaying = () => {
const {isPlaying} = useTimelineContext();
const {subscribePlaying} = useContext(SetTimelineContext);
+ // Read the local Freeze override, but subscribe to the shared playing store.
return useSyncExternalStore(subscribePlaying, isPlaying, isPlaying);
};