Skip to content

Commit

Permalink
feat(overlay) drop permissions overlay
Browse files Browse the repository at this point in the history
It covers the entire meeting and it's not helpful. A different version
of the same concept might be implemented using less intrusive UX, like a
modal.
  • Loading branch information
saghul authored and damencho committed Dec 13, 2024
1 parent cd6419d commit 3745c19
Show file tree
Hide file tree
Showing 9 changed files with 1 addition and 244 deletions.
19 changes: 0 additions & 19 deletions conference.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@ import {
NOTIFICATION_TIMEOUT_TYPE
} from './react/features/notifications/constants';
import { isModerationNotificationDisplayed } from './react/features/notifications/functions';
import { mediaPermissionPromptVisibilityChanged } from './react/features/overlay/actions';
import { suspendDetected } from './react/features/power-monitor/actions';
import { initPrejoin, isPrejoinPageVisible } from './react/features/prejoin/functions';
import { disableReceiver, stopReceiver } from './react/features/remote-control/actions';
Expand Down Expand Up @@ -435,15 +434,6 @@ export default {
requestedVideo = true;
}

if (!config.disableInitialGUM) {
JitsiMeetJS.mediaDevices.addEventListener(
JitsiMediaDevicesEvents.PERMISSION_PROMPT_IS_SHOWN,
browserName =>
APP.store.dispatch(
mediaPermissionPromptVisibilityChanged(true, browserName))
);
}

let tryCreateLocalTracks = Promise.resolve([]);

// On Electron there is no permission prompt for granting permissions. That's why we don't need to
Expand Down Expand Up @@ -497,15 +487,6 @@ export default {
});
}

// Hide the permissions prompt/overlay as soon as the tracks are created. Don't wait for the connection to
// be established, as in some cases like when auth is required, connection won't be established until the user
// inputs their credentials, but the dialog would be overshadowed by the overlay.
tryCreateLocalTracks.then(tracks => {
APP.store.dispatch(mediaPermissionPromptVisibilityChanged(false));

return tracks;
});

return {
tryCreateLocalTracks,
errors
Expand Down
1 change: 0 additions & 1 deletion react/features/app/reducers.any.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ import '../jaas/reducer';
import '../large-video/reducer';
import '../lobby/reducer';
import '../notifications/reducer';
import '../overlay/reducer';
import '../participants-pane/reducer';
import '../polls/reducer';
import '../polls-history/reducer';
Expand Down
2 changes: 0 additions & 2 deletions react/features/app/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ import { INoAudioSignalState } from '../no-audio-signal/reducer';
import { INoiseDetectionState } from '../noise-detection/reducer';
import { INoiseSuppressionState } from '../noise-suppression/reducer';
import { INotificationsState } from '../notifications/reducer';
import { IOverlayState } from '../overlay/reducer';
import { IParticipantsPaneState } from '../participants-pane/reducer';
import { IPollsState } from '../polls/reducer';
import { IPollsHistoryState } from '../polls-history/reducer';
Expand Down Expand Up @@ -147,7 +146,6 @@ export interface IReduxState {
'features/noise-detection': INoiseDetectionState;
'features/noise-suppression': INoiseSuppressionState;
'features/notifications': INotificationsState;
'features/overlay': IOverlayState;
'features/participants-pane': IParticipantsPaneState;
'features/polls': IPollsState;
'features/polls-history': IPollsHistoryState;
Expand Down
13 changes: 0 additions & 13 deletions react/features/overlay/actionTypes.ts

This file was deleted.

17 changes: 0 additions & 17 deletions react/features/overlay/actions.native.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,6 @@ import { openDialog } from '../base/dialog/actions';
import PageReloadDialog from '../base/dialog/components/native/PageReloadDialog';


/**
* Signals that the prompt for media permission is visible or not.
*
* @param {boolean} _isVisible - If the value is true - the prompt for media
* permission is visible otherwise the value is false/undefined.
* @param {string} _browser - The name of the current browser.
* @public
* @returns {{
* type: MEDIA_PERMISSION_PROMPT_VISIBILITY_CHANGED,
* browser: {string},
* isVisible: {boolean}
* }}
*/
export function mediaPermissionPromptVisibilityChanged(_isVisible: boolean, _browser: string) {
// Dummy.
}

/**
* Opens {@link PageReloadDialog}.
*
Expand Down
23 changes: 0 additions & 23 deletions react/features/overlay/actions.web.ts
Original file line number Diff line number Diff line change
@@ -1,26 +1,3 @@
import { MEDIA_PERMISSION_PROMPT_VISIBILITY_CHANGED } from './actionTypes';


/**
* Signals that the prompt for media permission is visible or not.
*
* @param {boolean} isVisible - If the value is true - the prompt for media
* permission is visible otherwise the value is false/undefined.
* @param {string} browser - The name of the current browser.
* @public
* @returns {{
* type: MEDIA_PERMISSION_PROMPT_VISIBILITY_CHANGED,
* browser: {string},
* isVisible: {boolean}
* }}
*/
export function mediaPermissionPromptVisibilityChanged(isVisible: boolean, browser: string) {
return {
type: MEDIA_PERMISSION_PROMPT_VISIBILITY_CHANGED,
browser,
isVisible
};
}

/**
* Opens {@link PageReloadDialog}.
Expand Down
123 changes: 0 additions & 123 deletions react/features/overlay/components/web/UserMediaPermissionsOverlay.tsx

This file was deleted.

4 changes: 1 addition & 3 deletions react/features/overlay/functions.web.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { IReduxState } from '../app/types';

import PageReloadOverlay from './components/web/PageReloadOverlay';
import SuspendedOverlay from './components/web/SuspendedOverlay';
import UserMediaPermissionsOverlay from './components/web/UserMediaPermissionsOverlay';

/**
* Returns the overlay to be currently rendered.
Expand All @@ -13,8 +12,7 @@ import UserMediaPermissionsOverlay from './components/web/UserMediaPermissionsOv
export function getOverlayToRender(state: IReduxState) {
const overlays = [
PageReloadOverlay,
SuspendedOverlay,
UserMediaPermissionsOverlay
SuspendedOverlay
];

for (const overlay of overlays) {
Expand Down
43 changes: 0 additions & 43 deletions react/features/overlay/reducer.ts

This file was deleted.

0 comments on commit 3745c19

Please sign in to comment.