Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

subscriber.ts 633B

1234567891011121314151617181920
  1. import { IReduxState, IStore } from '../app/types';
  2. import StateListenerRegistry from '../base/redux/StateListenerRegistry';
  3. import { isAudioMuteButtonDisabled } from './functions.any';
  4. /**
  5. * Notifies when audio availability changes.
  6. */
  7. StateListenerRegistry.register(
  8. /* selector */ (state: IReduxState) => isAudioMuteButtonDisabled(state),
  9. /* listener */ (disabled: boolean, store: IStore, previousDisabled: boolean) => {
  10. if (typeof APP !== 'object') {
  11. return;
  12. }
  13. if (disabled !== previousDisabled) {
  14. APP.API.notifyAudioAvailabilityChanged(!disabled);
  15. }
  16. }
  17. );