From 475b7bf98df4e3b7a331893ea42d1311df3cd71a Mon Sep 17 00:00:00 2001 From: Khushal Agarwal Date: Wed, 25 Oct 2023 17:45:17 +0530 Subject: [PATCH 1/3] fix(react-native-dogfood): live stream join on viewer's end --- .../dogfood/src/screens/LiveStream/HostLiveStream.tsx | 2 +- .../dogfood/src/screens/LiveStream/ViewLiveStream.tsx | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/sample-apps/react-native/dogfood/src/screens/LiveStream/HostLiveStream.tsx b/sample-apps/react-native/dogfood/src/screens/LiveStream/HostLiveStream.tsx index 05406578dc..b5c53a7fc4 100644 --- a/sample-apps/react-native/dogfood/src/screens/LiveStream/HostLiveStream.tsx +++ b/sample-apps/react-native/dogfood/src/screens/LiveStream/HostLiveStream.tsx @@ -59,7 +59,7 @@ export const HostLiveStreamScreen = ({ route }: HostLiveStreamScreenProps) => { return ( - + ); diff --git a/sample-apps/react-native/dogfood/src/screens/LiveStream/ViewLiveStream.tsx b/sample-apps/react-native/dogfood/src/screens/LiveStream/ViewLiveStream.tsx index d84c1b8ebd..5f19eed077 100644 --- a/sample-apps/react-native/dogfood/src/screens/LiveStream/ViewLiveStream.tsx +++ b/sample-apps/react-native/dogfood/src/screens/LiveStream/ViewLiveStream.tsx @@ -89,9 +89,11 @@ export const ViewLiveStreamChilden = ({ const { params: { callId }, } = route; - const { useIsCallBroadcastingInProgress } = useCallStateHooks(); + const { useIsCallBroadcastingInProgress, useIsCallLive } = + useCallStateHooks(); + const isCallLive = useIsCallLive(); const isCallBroadcasting = useIsCallBroadcastingInProgress(); - const liveOrBroadcasting = isCallBroadcasting; + const liveOrBroadcasting = isCallLive || isCallBroadcasting; const client = useAnonymousInitVideoClient({ callId, From b2e3dca9a2603c48eed23b8e6eb529879c31f23d Mon Sep 17 00:00:00 2001 From: Khushal Agarwal Date: Wed, 25 Oct 2023 17:53:11 +0530 Subject: [PATCH 2/3] refactor: remove hls true from Df app --- .../dogfood/src/screens/LiveStream/HostLiveStream.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sample-apps/react-native/dogfood/src/screens/LiveStream/HostLiveStream.tsx b/sample-apps/react-native/dogfood/src/screens/LiveStream/HostLiveStream.tsx index b5c53a7fc4..05406578dc 100644 --- a/sample-apps/react-native/dogfood/src/screens/LiveStream/HostLiveStream.tsx +++ b/sample-apps/react-native/dogfood/src/screens/LiveStream/HostLiveStream.tsx @@ -59,7 +59,7 @@ export const HostLiveStreamScreen = ({ route }: HostLiveStreamScreenProps) => { return ( - + ); From 4d62622be49e8bd51347a1a2704ef904ada4875c Mon Sep 17 00:00:00 2001 From: Khushal Agarwal Date: Wed, 25 Oct 2023 18:00:41 +0530 Subject: [PATCH 3/3] fix: use isCallLive since no broadcasting done --- .../dogfood/src/screens/LiveStream/ViewLiveStream.tsx | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/sample-apps/react-native/dogfood/src/screens/LiveStream/ViewLiveStream.tsx b/sample-apps/react-native/dogfood/src/screens/LiveStream/ViewLiveStream.tsx index 5f19eed077..dff7021038 100644 --- a/sample-apps/react-native/dogfood/src/screens/LiveStream/ViewLiveStream.tsx +++ b/sample-apps/react-native/dogfood/src/screens/LiveStream/ViewLiveStream.tsx @@ -89,11 +89,8 @@ export const ViewLiveStreamChilden = ({ const { params: { callId }, } = route; - const { useIsCallBroadcastingInProgress, useIsCallLive } = - useCallStateHooks(); + const { useIsCallLive } = useCallStateHooks(); const isCallLive = useIsCallLive(); - const isCallBroadcasting = useIsCallBroadcastingInProgress(); - const liveOrBroadcasting = isCallLive || isCallBroadcasting; const client = useAnonymousInitVideoClient({ callId, @@ -122,14 +119,14 @@ export const ViewLiveStreamChilden = ({ return ( <> - {(!autoJoin || !liveOrBroadcasting) && ( + {(!autoJoin || !isCallLive) && ( )} - {liveOrBroadcasting && autoJoin && ( + {isCallLive && autoJoin && (