Files
jitsi-meet/react/features/toolbox/functions.any.js
Jaya Allamsetty b19e4d76b5 fix(media) dispatch the unmute blocked action irrepective of the muted state.
This fixes an issue where the user muted by focus is able to unmute themselves even when the sender limit has been reached.
2021-12-07 17:13:29 -06:00

14 lines
357 B
JavaScript

// @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) {
const { available, muted, unmuteBlocked } = state['features/base/media'].audio;
return !available || (muted && unmuteBlocked);
}