From ca07eed85f7ae2034a219ade7466a0978908a252 Mon Sep 17 00:00:00 2001 From: kychen Date: Tue, 30 Jul 2024 20:59:49 +0800 Subject: [PATCH] feat(react-native-sdk): added setAudioOnly to the ref props --- react-native-sdk/index.tsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/react-native-sdk/index.tsx b/react-native-sdk/index.tsx index cf5585dc55..6923d91751 100644 --- a/react-native-sdk/index.tsx +++ b/react-native-sdk/index.tsx @@ -17,6 +17,7 @@ import type { IRoomsInfo } from '../react/features/breakout-rooms/types'; import { appNavigate } from './react/features/app/actions.native'; import { App } from './react/features/app/components/App.native'; +import { setAudioOnly } from './react/features/base/audio-only/actions'; import { setAudioMuted, setVideoMuted } from './react/features/base/media/actions'; import { getRoomsInfo } from './react/features/breakout-rooms/functions'; @@ -55,6 +56,7 @@ interface IAppProps { export interface JitsiRefProps { close: Function; + setAudioOnly?: (value: boolean) => void; setAudioMuted?: (muted: boolean) => void; setVideoMuted?: (muted: boolean) => void; getRoomsInfo?: () => IRoomsInfo; @@ -84,6 +86,11 @@ export const JitsiMeeting = forwardRef((props, ref) => dispatch(appNavigate(undefined)); }, + setAudioOnly: value => { + const dispatch = app.current.state.store.dispatch; + + dispatch(setAudioOnly(value)); + }, setAudioMuted: muted => { const dispatch = app.current.state.store.dispatch;