feat(prejoin_page): Add prejoin page
This commit is contained in:
committed by
Saúl Ibarra Corretgé
parent
5b53232964
commit
a45cbf41ef
@@ -1,5 +1,12 @@
|
||||
// @flow
|
||||
|
||||
import {
|
||||
isAudioDisabled,
|
||||
isPrejoinPageVisible,
|
||||
isPrejoinVideoDisabled
|
||||
} from '../prejoin';
|
||||
import { hasAvailableDevices } from '../base/devices';
|
||||
|
||||
declare var interfaceConfig: Object;
|
||||
|
||||
/**
|
||||
@@ -45,3 +52,32 @@ export function isToolboxVisible(state: Object) {
|
||||
return Boolean(!iAmSipGateway && (timeoutID || visible || alwaysVisible
|
||||
|| audioSettingsVisible || videoSettingsVisible));
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates if the audio settings button is disabled or not.
|
||||
*
|
||||
* @param {string} state - The state from the Redux store.
|
||||
* @returns {boolean}
|
||||
*/
|
||||
export function isAudioSettingsButtonDisabled(state: Object) {
|
||||
const devicesMissing = !hasAvailableDevices(state, 'audioInput')
|
||||
&& !hasAvailableDevices(state, 'audioOutput');
|
||||
|
||||
return isPrejoinPageVisible(state)
|
||||
? devicesMissing || isAudioDisabled(state)
|
||||
: devicesMissing;
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates if the video settings button is disabled or not.
|
||||
*
|
||||
* @param {string} state - The state from the Redux store.
|
||||
* @returns {boolean}
|
||||
*/
|
||||
export function isVideoSettingsButtonDisabled(state: Object) {
|
||||
const devicesMissing = !hasAvailableDevices(state, 'videoInput');
|
||||
|
||||
return isPrejoinPageVisible(state)
|
||||
? devicesMissing || isPrejoinVideoDisabled(state)
|
||||
: devicesMissing;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user