Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
TypeScript debiandeep-videojitsijitsi-meetscalable-video-conferencessfuvideovideo-communicationvideo-conferencingwebrtc
fix(av-moderation) Fix text on stop video dialog
robertpin21d5b7bcd6a3
diff --git a/lang/main.json b/lang/main.jsonindex 56443f5f54..ec7026da31 100644--- a/lang/main.json+++ b/lang/main.json@@ -268,12 +268,12 @@"muteEveryoneStartMuted": "Everyone starts muted from now on","muteParticipantBody": "You won't be able to unmute them, but they can unmute themselves at any time.","muteParticipantButton": "Mute",- "muteParticipantDialog": "Are you sure you want to mute this participant? You won't be able to unmute them, but they can unmute themselves at any time.","muteParticipantsVideoDialog": "Are you sure you want to turn off this participant's camera? You won't be able to turn the camera back on, but they can turn it back on at any time.",- "muteParticipantTitle": "Mute this participant?",+ "muteParticipantsVideoDialogModerationOn": "Are you sure you want to turn off this participant's camera? You won't be able to turn the camera back on and neither will they.","muteParticipantsVideoButton": "Stop video","muteParticipantsVideoTitle": "Disable camera of this participant?","muteParticipantsVideoBody": "You won't be able to turn the camera back on, but they can turn it back on at any time.",+ "muteParticipantsVideoBodyModerationOn": "You won't be able to turn the camera back on and neither will they.","noDropboxToken": "No valid Dropbox token","Ok": "OK","password": "Password",diff --git a/react/features/video-menu/components/AbstractMuteRemoteParticipantsVideoDialog.js b/react/features/video-menu/components/AbstractMuteRemoteParticipantsVideoDialog.jsindex 40b6189fcd..f26b07f350 100644--- a/react/features/video-menu/components/AbstractMuteRemoteParticipantsVideoDialog.js+++ b/react/features/video-menu/components/AbstractMuteRemoteParticipantsVideoDialog.js@@ -3,6 +3,7 @@import { Component } from 'react';import { rejectParticipantVideo } from '../../av-moderation/actions';+import { isEnabledFromState } from '../../av-moderation/functions';import { MEDIA_TYPE } from '../../base/media';import { muteRemote } from '../actions';@@ -17,6 +18,11 @@ export type Props = {*/dispatch: Function,+ /**+ * Whether or not video moderation is on.+ */+ isVideoModerationOn: boolean,+/*** The ID of the remote participant to be muted.*/@@ -65,3 +71,17 @@ export default class AbstractMuteRemoteParticipantsVideoDialog<P:Props = Props,return true;}}++/**+ * Maps (parts of) the redux state to the associated+ * {@code AbstractDialogContainer}'s props.+ *+ * @param {Object} state - The redux state.+ * @private+ * @returns {Object}+ */+export function abstractMapStateToProps(state: Object) {+ return {+ isVideoModerationOn: isEnabledFromState(MEDIA_TYPE.VIDEO, state)+ };+}diff --git a/react/features/video-menu/components/native/MuteRemoteParticipantsVideoDialog.js b/react/features/video-menu/components/native/MuteRemoteParticipantsVideoDialog.jsindex 89f7161e24..68c6c22a87 100644--- a/react/features/video-menu/components/native/MuteRemoteParticipantsVideoDialog.js+++ b/react/features/video-menu/components/native/MuteRemoteParticipantsVideoDialog.js@@ -5,8 +5,9 @@ import React from 'react';import { ConfirmDialog } from '../../../base/dialog';import { translate } from '../../../base/i18n';import { connect } from '../../../base/redux';-import AbstractMuteRemoteParticipantsVideoDialog- from '../AbstractMuteRemoteParticipantsVideoDialog';+import AbstractMuteRemoteParticipantsVideoDialog, {+ abstractMapStateToProps+} from '../AbstractMuteRemoteParticipantsVideoDialog';/*** Dialog to confirm a remote participant's video stop action.@@ -21,7 +22,10 @@ class MuteRemoteParticipantsVideoDialog extends AbstractMuteRemoteParticipantsVirender() {return (<ConfirmDialog- contentKey = 'dialog.muteParticipantsVideoDialog'+ contentKey = { this.props.isVideoModerationOn+ ? 'dialog.muteParticipantsVideoDialogModerationOn'+ : 'dialog.muteParticipantsVideoDialog'+ }onSubmit = { this._onSubmit } />);}@@ -29,4 +33,4 @@ class MuteRemoteParticipantsVideoDialog extends AbstractMuteRemoteParticipantsVi_onSubmit: () => boolean;}-export default translate(connect()(MuteRemoteParticipantsVideoDialog));+export default translate(connect(abstractMapStateToProps)(MuteRemoteParticipantsVideoDialog));diff --git a/react/features/video-menu/components/web/MuteRemoteParticipantsVideoDialog.js b/react/features/video-menu/components/web/MuteRemoteParticipantsVideoDialog.jsindex 292e456552..764ffb5ac1 100644--- a/react/features/video-menu/components/web/MuteRemoteParticipantsVideoDialog.js+++ b/react/features/video-menu/components/web/MuteRemoteParticipantsVideoDialog.js@@ -5,8 +5,9 @@ import React from 'react';import { Dialog } from '../../../base/dialog';import { translate } from '../../../base/i18n';import { connect } from '../../../base/redux';-import AbstractMuteRemoteParticipantsVideoDialog- from '../AbstractMuteRemoteParticipantsVideoDialog';+import AbstractMuteRemoteParticipantsVideoDialog, {+ abstractMapStateToProps+} from '../AbstractMuteRemoteParticipantsVideoDialog';/*** A React Component with the contents for a dialog that asks for confirmation@@ -29,7 +30,10 @@ class MuteRemoteParticipantsVideoDialog extends AbstractMuteRemoteParticipantsVititleKey = 'dialog.muteParticipantsVideoTitle'width = 'small'><div>- { this.props.t('dialog.muteParticipantsVideoBody') }+ {this.props.t(this.props.isVideoModerationOn+ ? 'dialog.muteParticipantsVideoBodyModerationOn'+ : 'dialog.muteParticipantsVideoBody'+ ) }</div></Dialog>);@@ -38,4 +42,4 @@ class MuteRemoteParticipantsVideoDialog extends AbstractMuteRemoteParticipantsVi_onSubmit: () => boolean;}-export default translate(connect()(MuteRemoteParticipantsVideoDialog));+export default translate(connect(abstractMapStateToProps)(MuteRemoteParticipantsVideoDialog));