Skip to content

Commit

Permalink
fix: drop permission requests component (#1005)
Browse files Browse the repository at this point in the history
  • Loading branch information
vishalnarkhede authored Aug 29, 2023
1 parent 764daef commit 0f65717
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions packages/react-native-sdk/src/providers/StreamCall.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { StreamCallProvider } from '@stream-io/video-react-bindings';
import React, { PropsWithChildren } from 'react';
import { Call } from '@stream-io/video-client';
import { useAndroidKeepCallAliveEffect, usePermissionRequest } from '../hooks';
import { useAndroidKeepCallAliveEffect } from '../hooks';
import { useIosCallkeepWithCallingStateEffect } from '../hooks/push/useIosCallkeepWithCallingStateEffect';
import {
MediaDevicesInitialState,
Expand Down Expand Up @@ -34,7 +34,6 @@ export const StreamCall = ({
return (
<StreamCallProvider call={call}>
<MediaStreamManagement {...mediaDeviceInitialState}>
<PermissionRequest />
<AndroidKeepCallAlive />
<IosInformCallkeepCallEnd />
{children}
Expand All @@ -43,15 +42,6 @@ export const StreamCall = ({
);
};

/**
* This is a renderless component that is used to handler the permission requests using the usePermissionRequest hook.
* usePermissionRequest needs to be called as a child of StreamCallProvider.
*/
const PermissionRequest = () => {
usePermissionRequest();
return null;
};

/**
* This is a renderless component is used to keep the call alive on Android device using useAndroidKeepCallAliveEffect.
* useAndroidKeepCallAliveEffect needs to called inside a child of StreamCallProvider.
Expand Down

0 comments on commit 0f65717

Please sign in to comment.