2022-10-20 09:11:27 +00:00
|
|
|
import { IReduxState, IStore } from '../../app/types';
|
2022-09-14 12:48:09 +00:00
|
|
|
import StateListenerRegistry from '../redux/StateListenerRegistry';
|
|
|
|
|
|
|
|
|
|
|
|
declare let APP: any;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Notifies when the local audio mute state changes.
|
|
|
|
*/
|
|
|
|
StateListenerRegistry.register(
|
2022-10-20 09:11:27 +00:00
|
|
|
/* selector */ (state: IReduxState) => state['features/base/media'].audio.muted,
|
2022-09-14 12:48:09 +00:00
|
|
|
/* listener */ (muted: boolean, store: IStore, previousMuted: boolean) => {
|
|
|
|
if (typeof APP !== 'object') {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (muted !== previousMuted) {
|
|
|
|
APP.API.notifyAudioMutedStatusChanged(muted);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
);
|