Merge pull request #7640 from KDSBrowne/issue-7185
Hide fullscreen buttons from iPhones
This commit is contained in:
commit
b281174b22
@ -13,7 +13,8 @@ export default withTracker((props) => {
|
||||
const handleToggleFullscreen = () => toggleFullScreen();
|
||||
const BROWSER_RESULTS = browser();
|
||||
const isSafari = BROWSER_RESULTS.name === 'safari';
|
||||
const noIOSFullscreen = isSafari && BROWSER_RESULTS.versionNumber < 12;
|
||||
const isIphone = navigator.userAgent.match(/iPhone/i);
|
||||
const noIOSFullscreen = (isSafari && BROWSER_RESULTS.versionNumber < 12) || isIphone;
|
||||
return {
|
||||
amIModerator: props.amIModerator,
|
||||
handleToggleFullscreen,
|
||||
|
@ -36,7 +36,10 @@ const FullscreenButtonComponent = ({
|
||||
className,
|
||||
fullscreenRef,
|
||||
handleToggleFullScreen,
|
||||
isIphone,
|
||||
}) => {
|
||||
if (isIphone) return null;
|
||||
|
||||
const formattedLabel = intl.formatMessage(
|
||||
intlMessages.fullscreenButton,
|
||||
({ 0: elementName || '' }),
|
||||
|
@ -6,7 +6,8 @@ const FullscreenButtonContainer = props => <FullscreenButtonComponent {...props}
|
||||
|
||||
export default (props) => {
|
||||
const handleToggleFullScreen = ref => toggleFullScreen(ref);
|
||||
const isIphone = navigator.userAgent.match(/iPhone/i);
|
||||
return (
|
||||
<FullscreenButtonContainer {...props} {...{ handleToggleFullScreen }} />
|
||||
<FullscreenButtonContainer {...props} {...{ handleToggleFullScreen, isIphone }} />
|
||||
);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user