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
settings: enable settings buttons on permission grant
vp8x884714ba3bd4c
diff --git a/css/_audio-preview.css b/css/_audio-preview.cssindex c6a31e5b46..e33cbbf7a2 100644--- a/css/_audio-preview.css+++ b/css/_audio-preview.css@@ -13,6 +13,7 @@padding: 16px;&-icon {+ color: #A4B8D1;display: inline-block;}@@ -66,6 +67,10 @@.audio-preview-test-button {display: inline-block;}++ .audio-preview-entry-text {+ max-width: 196px;+ }}.audio-preview-entry-text {diff --git a/css/_video-preview.css b/css/_video-preview.cssindex 084714dbb7..e770d20c39 100644--- a/css/_video-preview.css+++ b/css/_video-preview.css@@ -1,4 +1,5 @@.video-preview {+ background: none;max-height: 290px;overflow: auto;diff --git a/react/features/overlay/functions.js b/react/features/overlay/functions.jsindex 704aada972..ea1fb1f8a4 100644--- a/react/features/overlay/functions.js+++ b/react/features/overlay/functions.js@@ -21,3 +21,13 @@ export function getOverlayToRender(state: Object) {return undefined;}++/**+ * Returns the visibility of the media permissions prompt.+ *+ * @param {Object} state - The Redux state.+ * @returns {boolean}+ */+export function getMediaPermissionPromptVisibility(state: Object) {+ return state['features/overlay'].isMediaPermissionPromptVisible;+}diff --git a/react/features/settings/actionTypes.js b/react/features/settings/actionTypes.jsindex 58ed9c3c84..6766a437be 100644--- a/react/features/settings/actionTypes.js+++ b/react/features/settings/actionTypes.js@@ -1,4 +1,6 @@-// The type of (redux) action which sets the visibility of the audio settings popup.+/**+ * The type of (redux) action which sets the visibility of the audio settings popup.+ */export const SET_AUDIO_SETTINGS_VISIBILITY = 'SET_AUDIO_SETTINGS_VISIBILITY';/**@@ -12,5 +14,7 @@ export const SET_AUDIO_SETTINGS_VISIBILITY = 'SET_AUDIO_SETTINGS_VISIBILITY';*/export const SET_SETTINGS_VIEW_VISIBLE = 'SET_SETTINGS_VIEW_VISIBLE';-// The type of (redux) action which sets the visibility of the video settings popup.+/**+ * The type of (redux) action which sets the visibility of the video settings popup.+ */export const SET_VIDEO_SETTINGS_VISIBILITY = 'SET_VIDEO_SETTINGS_VISIBILITY';diff --git a/react/features/settings/components/web/audio/AudioSettingsHeader.js b/react/features/settings/components/web/audio/AudioSettingsHeader.jsindex 105853ae95..7119e7ed1d 100644--- a/react/features/settings/components/web/audio/AudioSettingsHeader.js+++ b/react/features/settings/components/web/audio/AudioSettingsHeader.js@@ -29,7 +29,6 @@ export default function AudioSettingsHeader({ IconComponent, text }: Props) {<div className = 'audio-preview-header'><div className = 'audio-preview-header-icon'>{ <Icon- color = '#A4B8D1'size = { 24 }src = { IconComponent } />}</div>diff --git a/react/features/settings/components/web/audio/MicrophoneEntry.js b/react/features/settings/components/web/audio/MicrophoneEntry.jsindex 5b4f548248..56b6891319 100644--- a/react/features/settings/components/web/audio/MicrophoneEntry.js+++ b/react/features/settings/components/web/audio/MicrophoneEntry.js@@ -107,9 +107,7 @@ export default class MicrophoneEntry extends Component<Props, State> {* @returns {void}*/_stopListening(jitsiTrack) {- jitsiTrack && jitsiTrack.off(- JitsiTrackEvents.TRACK_AUDIO_LEVEL_CHANGED,- this._updateLevel);+ jitsiTrack && jitsiTrack.off(JitsiTrackEvents.TRACK_AUDIO_LEVEL_CHANGED, this._updateLevel);this.setState({level: -1});diff --git a/react/features/toolbox/components/web/AudioSettingsButton.js b/react/features/toolbox/components/web/AudioSettingsButton.jsindex 4c29f804e4..291e0cc915 100644--- a/react/features/toolbox/components/web/AudioSettingsButton.js+++ b/react/features/toolbox/components/web/AudioSettingsButton.js@@ -8,7 +8,7 @@ import { IconArrowDown } from '../../../base/icons';import JitsiMeetJS from '../../../base/lib-jitsi-meet/_';import { ToolboxButtonWithIcon } from '../../../base/toolbox';import { connect } from '../../../base/redux';-+import { getMediaPermissionPromptVisibility } from '../../../overlay';import { AudioSettingsPopup, toggleAudioSettings } from '../../../settings';type Props = {@@ -18,6 +18,12 @@ type Props = {*/onAudioOptionsClick: Function,+ /**+ * Whether the permission prompt is visible or not.+ * Useful for enabling the button on permission grant.+ */+ permissionPromptVisibility: boolean,+/*** If the user has audio input or audio output devices.*/@@ -81,6 +87,17 @@ class AudioSettingsButton extends Component<Props, State> {this._updatePermissions();}+ /**+ * Implements React's {@link Component#componentDidUpdate}.+ *+ * @inheritdoc+ */+ componentDidUpdate(prevProps) {+ if (this.props.permissionPromptVisibility !== prevProps.permissionPromptVisibility) {+ this._updatePermissions();+ }+ }+/*** Implements React's {@link Component#render}.*@@ -113,7 +130,8 @@ function mapStateToProps(state) {return {hasDevices:hasAvailableDevices(state, 'audioInput')- || hasAvailableDevices(state, 'audioOutput')+ || hasAvailableDevices(state, 'audioOutput'),+ permissionPromptVisibility: getMediaPermissionPromptVisibility(state)};}diff --git a/react/features/toolbox/components/web/VideoSettingsButton.js b/react/features/toolbox/components/web/VideoSettingsButton.jsindex b6b4941066..ed105f3007 100644--- a/react/features/toolbox/components/web/VideoSettingsButton.js+++ b/react/features/toolbox/components/web/VideoSettingsButton.js@@ -9,6 +9,7 @@ import { hasAvailableDevices } from '../../../base/devices';import { IconArrowDown } from '../../../base/icons';import { connect } from '../../../base/redux';import { ToolboxButtonWithIcon } from '../../../base/toolbox';+import { getMediaPermissionPromptVisibility } from '../../../overlay';type Props = {@@ -17,6 +18,12 @@ type Props = {*/onVideoOptionsClick: Function,+ /**+ * Whether the permission prompt is visible or not.+ * Useful for enabling the button on initial permission grant.+ */+ permissionPromptVisibility: boolean,+/*** If the user has any video devices.*/@@ -80,6 +87,17 @@ class VideoSettingsButton extends Component<Props, State> {this._updatePermissions();}+ /**+ * Implements React's {@link Component#componentDidUpdate}.+ *+ * @inheritdoc+ */+ componentDidUpdate(prevProps) {+ if (this.props.permissionPromptVisibility !== prevProps.permissionPromptVisibility) {+ this._updatePermissions();+ }+ }+/*** Implements React's {@link Component#render}.*@@ -110,7 +128,8 @@ class VideoSettingsButton extends Component<Props, State> {*/function mapStateToProps(state) {return {- hasDevices: hasAvailableDevices(state, 'videoInput')+ hasDevices: hasAvailableDevices(state, 'videoInput'),+ permissionPromptVisibility: getMediaPermissionPromptVisibility(state)};}