2021-11-30 20:08:25 +00:00
|
|
|
// @flow
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Indicates if the audio mute button is disabled or not.
|
|
|
|
*
|
|
|
|
* @param {Object} state - The state from the Redux store.
|
|
|
|
* @returns {boolean}
|
|
|
|
*/
|
|
|
|
export function isAudioMuteButtonDisabled(state: Object) {
|
2021-12-07 21:48:12 +00:00
|
|
|
const { available, muted, unmuteBlocked } = state['features/base/media'].audio;
|
2021-11-30 20:08:25 +00:00
|
|
|
|
2021-12-07 21:48:12 +00:00
|
|
|
return !available || (muted && unmuteBlocked);
|
2021-11-30 20:08:25 +00:00
|
|
|
}
|