task(rn): hide screen share button when audioOnly mode

This commit is contained in:
tmoldovan8x8
2021-05-26 11:43:24 +03:00
committed by GitHub
parent 8d25950d98
commit 06110d1dfb
3 changed files with 53 additions and 2 deletions

View File

@@ -11,6 +11,11 @@ import { toggleScreensharing, isLocalVideoTrackDesktop } from '../../../base/tra
*/
type Props = AbstractButtonProps & {
/**
* True if the button needs to be disabled.
*/
_disabled: boolean,
/**
* Whether video is currently muted or not.
*/
@@ -44,6 +49,16 @@ class ScreenSharingAndroidButton extends AbstractButton<Props, *> {
this.props.dispatch(toggleScreensharing(enable));
}
/**
* Returns a boolean value indicating if this button is disabled or not.
*
* @protected
* @returns {boolean}
*/
_isDisabled() {
return this.props._disabled;
}
/**
* Indicates whether this button is in toggled state or not.
*
@@ -63,7 +78,6 @@ class ScreenSharingAndroidButton extends AbstractButton<Props, *> {
* @param {Object} state - The Redux state.
* @private
* @returns {{
* _disabled: boolean,
* _screensharing: boolean
* }}
*/