fix(audio-share): Show button only when supported by browser.

Show the audio share button only when its supported. For example, mobile browsers do not support getDisplayMedia yet.
This commit is contained in:
Jaya Allamsetty 2021-04-21 16:21:33 -04:00 committed by Jaya Allamsetty
parent d014a52ab3
commit 477d94497b
1 changed files with 4 additions and 1 deletions

View File

@ -972,6 +972,7 @@ class Toolbox extends Component<Props> {
*/
_renderOverflowMenuContent(additionalButtons: Array<React$Element<any>>) {
const {
_desktopSharingEnabled,
_feedbackConfigured,
_fullScreen,
_isMobile,
@ -1036,7 +1037,9 @@ class Toolbox extends Component<Props> {
&& <SharedVideoButton
key = 'sharedvideo'
showLabel = { true } />,
this._shouldShowButton('shareaudio') && isScreenAudioSupported()
this._shouldShowButton('shareaudio')
&& _desktopSharingEnabled
&& isScreenAudioSupported()
&& <OverflowMenuItem
accessibilityLabel = { t('toolbar.accessibilityLabel.shareaudio') }
icon = { IconShareAudio }