feat(react-native-sdk): added setAudioOnly to the ref props

This commit is contained in:
kychen
2024-07-30 20:59:49 +08:00
committed by GitHub
parent 72779e5ba5
commit ca07eed85f

View File

@@ -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<JitsiRefProps, IAppProps>((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;