fix(start-silent) Disable AOT mic and unmute notif when start silent
This commit is contained in:
parent
045bd44407
commit
8f641b7bb1
|
@ -725,6 +725,9 @@ function initCommands() {
|
|||
case 'is-sharing-screen':
|
||||
callback(Boolean(APP.conference.isSharingScreen));
|
||||
break;
|
||||
case 'is-start-silent':
|
||||
callback(Boolean(APP.store.getState()['features/base/config'].startSilent));
|
||||
break;
|
||||
case 'get-content-sharing-participants': {
|
||||
const tracks = getState()['features/base/tracks'];
|
||||
const sharingParticipantIds = tracks.filter(tr => tr.videoType === 'desktop').map(t => t.participantId);
|
||||
|
|
|
@ -978,6 +978,17 @@ export default class JitsiMeetExternalAPI extends EventEmitter {
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns wether meeting is started silent.
|
||||
*
|
||||
* @returns {Promise} - Resolves with start silent status.
|
||||
*/
|
||||
isStartSilent() {
|
||||
return this._transport.sendRequest({
|
||||
name: 'is-start-silent'
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the avatar URL of a participant.
|
||||
*
|
||||
|
|
|
@ -68,11 +68,12 @@ export default class AudioMuteButton extends Component<Props, State> {
|
|||
|
||||
Promise.all([
|
||||
api.isAudioAvailable(),
|
||||
api.isAudioMuted()
|
||||
api.isAudioMuted(),
|
||||
api.isStartSilent()
|
||||
])
|
||||
.then(([ audioAvailable, audioMuted ]) =>
|
||||
.then(([ audioAvailable, audioMuted, startSilent ]) =>
|
||||
this.setState({
|
||||
audioAvailable,
|
||||
audioAvailable: audioAvailable && !startSilent,
|
||||
audioMuted
|
||||
}))
|
||||
.catch(console.error);
|
||||
|
|
|
@ -157,7 +157,7 @@ class AudioMuteButton extends AbstractAudioMuteButton<Props, *> {
|
|||
*/
|
||||
function _mapStateToProps(state): Object {
|
||||
const _audioMuted = isLocalTrackMuted(state['features/base/tracks'], MEDIA_TYPE.AUDIO);
|
||||
const _disabled = state['features/base/config'].startSilent || isAudioMuteButtonDisabled(state);
|
||||
const _disabled = isAudioMuteButtonDisabled(state);
|
||||
const enabledFlag = getFeatureFlag(state, AUDIO_MUTE_BUTTON_ENABLED, true);
|
||||
|
||||
return {
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
*/
|
||||
export function isAudioMuteButtonDisabled(state: Object) {
|
||||
const { available, muted, unmuteBlocked } = state['features/base/media'].audio;
|
||||
const { startSilent } = state['features/base/config'];
|
||||
|
||||
return !available || (muted && unmuteBlocked);
|
||||
return !available || startSilent || (muted && unmuteBlocked);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue