Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Jul 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions react-native-sdk/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -54,6 +55,7 @@ interface IAppProps {

export interface JitsiRefProps {
close: Function;
setAudioOnly?: (value: boolean) => void;
setAudioMuted?: (muted: boolean) => void;
setVideoMuted?: (muted: boolean) => void;
getRoomsInfo?: () => IRoomsInfo;
Expand Down Expand Up @@ -83,6 +85,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;

Expand Down