From aa4a2fae2c072f7e4a29f882b5eaa1ee04581e88 Mon Sep 17 00:00:00 2001 From: raviteja83 Date: Wed, 25 Oct 2023 16:05:12 +0530 Subject: [PATCH] fix: add permission check --- .../src/Prebuilt/components/Leave/LeaveRoom.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/roomkit-react/src/Prebuilt/components/Leave/LeaveRoom.tsx b/packages/roomkit-react/src/Prebuilt/components/Leave/LeaveRoom.tsx index 0a5a0fe9bf..8b55762c07 100644 --- a/packages/roomkit-react/src/Prebuilt/components/Leave/LeaveRoom.tsx +++ b/packages/roomkit-react/src/Prebuilt/components/Leave/LeaveRoom.tsx @@ -36,8 +36,10 @@ export const LeaveRoom = ({ screenType }: { screenType: keyof ConferencingScreen const stopStream = async () => { try { - console.log('Stopping HLS stream'); - await hmsActions.stopHLSStreaming(); + if (permissions?.hlsStreaming) { + console.log('Stopping HLS stream'); + await hmsActions.stopHLSStreaming(); + } ToastManager.addToast({ title: 'Stopping the stream' }); } catch (e) { console.error('Error stopping stream', e);