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,screen-sharing) allow sharing the screen and camera on mobile (#15236)

Saúl Ibarra Corretgé3fb968b3cbc7
diff --git a/react/features/base/media/constants.ts b/react/features/base/media/constants.ts
index f8e610def2..82c1a33fb2 100644
--- a/react/features/base/media/constants.ts
+++ b/react/features/base/media/constants.ts
@@ -56,8 +56,7 @@ export const VIDEO_MUTISM_AUTHORITY = {
AUDIO_ONLY: 1 << 0,
BACKGROUND: 1 << 1,
USER: 1 << 2,
- CAR_MODE: 1 << 3,
- SCREEN_SHARE: 1 << 4
+ CAR_MODE: 1 << 3
};
/* eslint-enable no-bitwise */
diff --git a/react/features/base/tracks/actions.native.ts b/react/features/base/tracks/actions.native.ts
index ec0174840b..5f07a64a55 100644
--- a/react/features/base/tracks/actions.native.ts
+++ b/react/features/base/tracks/actions.native.ts
@@ -5,11 +5,7 @@ import { NOTIFICATION_TIMEOUT_TYPE } from '../../notifications/constants';
import { PIP_WHILE_SCREEN_SHARING_ENABLED } from '../flags/constants';
import { getFeatureFlag } from '../flags/functions';
import JitsiMeetJS from '../lib-jitsi-meet';
-import {
- setScreenshareMuted,
- setVideoMuted
-} from '../media/actions';
-import { VIDEO_MUTISM_AUTHORITY } from '../media/constants';
+import { setScreenshareMuted } from '../media/actions';
import { addLocalTrack, replaceLocalTrack } from './actions.any';
import { getLocalDesktopTrack, getTrackState, isLocalVideoTrackDesktop } from './functions.native';
@@ -37,7 +33,6 @@ export function toggleScreensharing(enabled: boolean, _ignore1?: boolean, _ignor
}
} else {
dispatch(setScreenshareMuted(true));
- dispatch(setVideoMuted(false, VIDEO_MUTISM_AUTHORITY.SCREEN_SHARE));
setPictureInPictureEnabled(true);
}
};
@@ -72,8 +67,6 @@ async function _startScreenSharing(dispatch: IStore['dispatch'], state: IReduxSt
dispatch(addLocalTrack(track));
}
- dispatch(setVideoMuted(true, VIDEO_MUTISM_AUTHORITY.SCREEN_SHARE));
-
const { enabled: audioOnly } = state['features/base/audio-only'];
if (audioOnly) {
diff --git a/react/features/toolbox/functions.native.ts b/react/features/toolbox/functions.native.ts
index a200614941..7fb75582d6 100644
--- a/react/features/toolbox/functions.native.ts
+++ b/react/features/toolbox/functions.native.ts
@@ -1,11 +1,11 @@
import { IReduxState } from '../app/types';
import { IStateful } from '../base/app/types';
-import { hasAvailableDevices } from '../base/devices/functions';
+import { hasAvailableDevices } from '../base/devices/functions.native';
import { TOOLBOX_ALWAYS_VISIBLE, TOOLBOX_ENABLED } from '../base/flags/constants';
import { getFeatureFlag } from '../base/flags/functions';
import { getParticipantCountWithFake } from '../base/participants/functions';
import { toState } from '../base/redux/functions';
-import { isLocalVideoTrackDesktop } from '../base/tracks/functions';
+import { isLocalVideoTrackDesktop } from '../base/tracks/functions.native';
export * from './functions.any';
@@ -97,6 +97,5 @@ export function isVideoMuteButtonDisabled(state: IReduxState) {
const { muted, unmuteBlocked } = state['features/base/media'].video;
return !hasAvailableDevices(state, 'videoInput')
- || (unmuteBlocked && Boolean(muted))
- || isLocalVideoTrackDesktop(state);
+ || (unmuteBlocked && Boolean(muted));
}