forked from jitsi/jitsi-meet
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(external-api) Fix notify audio muted/audio available
- Loading branch information
Showing
7 changed files
with
50 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { IState, IStore } from '../../app/types'; | ||
import StateListenerRegistry from '../redux/StateListenerRegistry'; | ||
|
||
|
||
declare let APP: any; | ||
|
||
/** | ||
* Notifies when the local audio mute state changes. | ||
*/ | ||
StateListenerRegistry.register( | ||
/* selector */ (state: IState) => state['features/base/media'].audio.muted, | ||
/* listener */ (muted: boolean, store: IStore, previousMuted: boolean) => { | ||
if (typeof APP !== 'object') { | ||
return; | ||
} | ||
|
||
if (muted !== previousMuted) { | ||
APP.API.notifyAudioMutedStatusChanged(muted); | ||
} | ||
} | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
react/features/toolbox/functions.any.js → react/features/toolbox/functions.any.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ import { | |
SET_FULL_SCREEN | ||
} from './actionTypes'; | ||
|
||
import './subscriber'; | ||
|
||
declare var APP: Object; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { IState, IStore } from '../app/types'; | ||
import StateListenerRegistry from '../base/redux/StateListenerRegistry'; | ||
|
||
import { isAudioMuteButtonDisabled } from './functions.any'; | ||
|
||
declare let APP: any; | ||
|
||
/** | ||
* Notifies when audio availability changes. | ||
*/ | ||
StateListenerRegistry.register( | ||
/* selector */ (state: IState) => isAudioMuteButtonDisabled(state), | ||
/* listener */ (disabled: boolean, store: IStore, previousDisabled: boolean) => { | ||
if (typeof APP !== 'object') { | ||
return; | ||
} | ||
|
||
if (disabled !== previousDisabled) { | ||
APP.API.notifyAudioAvailabilityChanged(!disabled); | ||
} | ||
} | ||
); |