From 50e2e1e744a73cca9c53a896fb8017aa54a7461a Mon Sep 17 00:00:00 2001 From: Oliver Lazoroski Date: Thu, 9 Apr 2026 13:33:49 +0200 Subject: [PATCH] =?UTF-8?q?Revert=20"fix(egress):=20ensure=20the=20call=20?= =?UTF-8?q?is=20joined=20before=20notifying=20readiness=20(#2=E2=80=A6"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit a3be387188f446823b17eda1ef838002b060cec6. --- .../react/egress-composite/src/hooks/useNotifyEgress.tsx | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/sample-apps/react/egress-composite/src/hooks/useNotifyEgress.tsx b/sample-apps/react/egress-composite/src/hooks/useNotifyEgress.tsx index e4a013748b..1748dd779f 100644 --- a/sample-apps/react/egress-composite/src/hooks/useNotifyEgress.tsx +++ b/sample-apps/react/egress-composite/src/hooks/useNotifyEgress.tsx @@ -6,7 +6,6 @@ import { useEffect, useState, } from 'react'; -import { CallingState, useCallStateHooks } from '@stream-io/video-react-sdk'; const EgressReadyNotificationContext = createContext((isReady: boolean) => { // no-op @@ -15,13 +14,10 @@ const EgressReadyNotificationContext = createContext((isReady: boolean) => { export const EgressReadyNotificationProvider = (props: PropsWithChildren) => { const [isReady, setIsReady] = useState(false); - const { useCallCallingState } = useCallStateHooks(); - const callingState = useCallCallingState(); useEffect(() => { - if (isReady || callingState !== CallingState.JOINED) return; + if (isReady) return; // it could happen that components won't notify us that they are ready // in that case, we start recording anyway after 4 seconds. - console.log('Egress: Started waiting for components to notify readiness'); const timeout = setTimeout(() => { if (!isReady) { console.log('Timeout: Egress is ready'); @@ -32,7 +28,7 @@ export const EgressReadyNotificationProvider = (props: PropsWithChildren) => { return () => { clearTimeout(timeout); }; - }, [callingState, isReady]); + }, [isReady]); const spyIsReady = useCallback((value: boolean) => { setIsReady((current) => {