You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

subscriber.ts 592B

123456789101112131415161718192021
  1. import { IReduxState, IStore } from '../../app/types';
  2. import StateListenerRegistry from '../redux/StateListenerRegistry';
  3. declare let APP: any;
  4. /**
  5. * Notifies when the local audio mute state changes.
  6. */
  7. StateListenerRegistry.register(
  8. /* selector */ (state: IReduxState) => state['features/base/media'].audio.muted,
  9. /* listener */ (muted: boolean, store: IStore, previousMuted: boolean) => {
  10. if (typeof APP !== 'object') {
  11. return;
  12. }
  13. if (muted !== previousMuted) {
  14. APP.API.notifyAudioMutedStatusChanged(muted);
  15. }
  16. }
  17. );