Hide Mic and Camera buttons if userAgent contains bbbnative

This commit is contained in:
Gustavo Trott 2019-01-31 15:17:03 -02:00
parent db2ca3ce79
commit fe99ea889a
3 changed files with 6 additions and 2 deletions

View File

@ -265,13 +265,14 @@ class AudioModal extends Component {
forceListenOnlyAttendee,
skipCheck,
audioLocked,
isMobileNative,
} = this.props;
const showMicrophone = forceListenOnlyAttendee || audioLocked;
return (
<span className={styles.audioOptions}>
{!showMicrophone
{!showMicrophone && !isMobileNative
? (
<Button
className={styles.audioBtn}

View File

@ -62,5 +62,6 @@ export default withModalMounter(withTracker(({ mountModal }) => {
joinFullAudioEchoTest: !listenOnlyMode && !skipCheck,
forceListenOnlyAttendee: listenOnlyMode && forceListenOnly && !Service.isUserModerator(),
isIOSChrome: browser().name === 'crios',
isMobileNative: navigator.userAgent.toLowerCase().includes('bbbnative'),
});
})(AudioModalContainer));

View File

@ -15,12 +15,13 @@ const JoinVideoOptionsContainer = (props) => {
baseName,
intl,
mountModal,
isMobileNative,
...restProps
} = props;
const mountPreview = () => { mountModal(<VideoPreviewContainer />); };
return <JoinVideoButton {...{ handleJoinVideo: mountPreview, handleCloseVideo, isSharingVideo, isDisabled, ...restProps }} />;
return !isMobileNative && <JoinVideoButton {...{ handleJoinVideo: mountPreview, handleCloseVideo, isSharingVideo, isDisabled, ...restProps }} />;
};
export default withModalMounter(injectIntl(withTracker(() => ({
@ -28,4 +29,5 @@ export default withModalMounter(injectIntl(withTracker(() => ({
isSharingVideo: VideoButtonService.isSharingVideo(),
isDisabled: VideoButtonService.isDisabled(),
videoShareAllowed: VideoButtonService.videoShareAllowed(),
isMobileNative: navigator.userAgent.toLowerCase().includes('bbbnative'),
}))(JoinVideoOptionsContainer)));