toolbox: disable audio-mode when video-unmuting
If audio-only was engaged, use the video (un)mute button to disengage it. This should simplify the flow for getting back to video.
This commit is contained in:
parent
431a221c63
commit
4ddfcaf584
|
@ -7,6 +7,7 @@ import {
|
||||||
createToolbarEvent,
|
createToolbarEvent,
|
||||||
sendAnalytics
|
sendAnalytics
|
||||||
} from '../../analytics';
|
} from '../../analytics';
|
||||||
|
import { setAudioOnly } from '../../base/conference';
|
||||||
import { translate } from '../../base/i18n';
|
import { translate } from '../../base/i18n';
|
||||||
import {
|
import {
|
||||||
MEDIA_TYPE,
|
MEDIA_TYPE,
|
||||||
|
@ -91,17 +92,6 @@ class VideoMuteButton extends AbstractVideoMuteButton<Props, *> {
|
||||||
|| APP.keyboardshortcut.unregisterShortcut('V');
|
|| APP.keyboardshortcut.unregisterShortcut('V');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Indicates if this button should be disabled or not.
|
|
||||||
*
|
|
||||||
* @override
|
|
||||||
* @protected
|
|
||||||
* @returns {boolean}
|
|
||||||
*/
|
|
||||||
_isDisabled() {
|
|
||||||
return this.props._audioOnly;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Indicates if video is currently muted ot nor.
|
* Indicates if video is currently muted ot nor.
|
||||||
*
|
*
|
||||||
|
@ -142,11 +132,16 @@ class VideoMuteButton extends AbstractVideoMuteButton<Props, *> {
|
||||||
*/
|
*/
|
||||||
_setVideoMuted(videoMuted: boolean) {
|
_setVideoMuted(videoMuted: boolean) {
|
||||||
sendAnalytics(createToolbarEvent(VIDEO_MUTE, { enable: videoMuted }));
|
sendAnalytics(createToolbarEvent(VIDEO_MUTE, { enable: videoMuted }));
|
||||||
this.props.dispatch(
|
if (this.props._audioOnly) {
|
||||||
setVideoMuted(
|
this.props.dispatch(
|
||||||
videoMuted,
|
setAudioOnly(false, /* ensureTrack */ true));
|
||||||
VIDEO_MUTISM_AUTHORITY.USER,
|
} else {
|
||||||
/* ensureTrack */ true));
|
this.props.dispatch(
|
||||||
|
setVideoMuted(
|
||||||
|
videoMuted,
|
||||||
|
VIDEO_MUTISM_AUTHORITY.USER,
|
||||||
|
/* ensureTrack */ true));
|
||||||
|
}
|
||||||
|
|
||||||
// FIXME: The old conference logic still relies on this event being
|
// FIXME: The old conference logic still relies on this event being
|
||||||
// emitted.
|
// emitted.
|
||||||
|
|
Loading…
Reference in New Issue