Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

feat(rn-sdk): add getRoomsInfo ref callback

Abbas Al-Mansoori1bc50ea71c21
diff --git a/react-native-sdk/index.tsx b/react-native-sdk/index.tsx
index 6b0434186e..a800d43f74 100644
--- a/react-native-sdk/index.tsx
+++ b/react-native-sdk/index.tsx
@@ -16,6 +16,8 @@ import { View, ViewStyle } from 'react-native';
import { appNavigate } from './react/features/app/actions.native';
import { App } from './react/features/app/components/App.native';
import { setAudioMuted, setVideoMuted } from './react/features/base/media/actions';
+import { getRoomsInfo } from './react/features/breakout-rooms/functions';
+import type { IRoomsInfo } from '../react/features/breakout-rooms/types';
interface IEventListeners {
@@ -49,10 +51,17 @@ interface IAppProps {
userInfo?: IUserInfo;
}
+export interface JitsiRefProps {
+ close: Function;
+ setAudioMuted?: (muted: boolean) => void;
+ setVideoMuted?: (muted: boolean) => void;
+ getRoomsInfo?: () => IRoomsInfo;
+}
+
/**
* Main React Native SDK component that displays a Jitsi Meet conference and gets all required params as props
*/
-export const JitsiMeeting = forwardRef((props: IAppProps, ref) => {
+export const JitsiMeeting = forwardRef<JitsiRefProps, IAppProps>((props, ref) => {
const [ appProps, setAppProps ] = useState({});
const app = useRef(null);
const {
@@ -82,6 +91,11 @@ export const JitsiMeeting = forwardRef((props: IAppProps, ref) => {
const dispatch = app.current.state.store.dispatch;
dispatch(setVideoMuted(muted));
+ },
+ getRoomsInfo: () => {
+ const state = app.current.state.store.getState();
+
+ return getRoomsInfo(state);
}
}));