|
1 | 1 | // Copyright (c) Microsoft Corporation. |
2 | 2 | // Licensed under the MIT License. |
3 | 3 |
|
4 | | -import { CommonCallAdapter, CallComposite, CallAdapterLocator } from '@azure/communication-react'; |
5 | | -/* @conditional-compile-remove(call-readiness) */ |
6 | | -import { CallCompositeOptions } from '@azure/communication-react'; |
| 4 | +import { GroupCallLocator, TeamsMeetingLinkLocator } from '@azure/communication-calling'; |
| 5 | +import { CallAdapterLocator, CallComposite, CallCompositeOptions, CommonCallAdapter } from '@azure/communication-react'; |
7 | 6 | import { Spinner } from '@fluentui/react'; |
| 7 | +import React, { useEffect, useMemo } from 'react'; |
8 | 8 | import { useSwitchableFluentTheme } from '../theming/SwitchableFluentThemeProvider'; |
9 | 9 | import { useIsMobile } from '../utils/useIsMobile'; |
10 | | -import React, { useEffect } from 'react'; |
11 | | -/* @conditional-compile-remove(call-readiness) */ |
12 | | -import { useMemo } from 'react'; |
| 10 | +import { isIOS } from '../utils/utils'; |
13 | 11 | import { CallScreenProps } from './CallScreen'; |
14 | | -import { GroupCallLocator, TeamsMeetingLinkLocator } from '@azure/communication-calling'; |
15 | 12 |
|
16 | 13 | export type CallCompositeContainerProps = CallScreenProps & { adapter?: CommonCallAdapter }; |
17 | 14 |
|
18 | 15 | export const CallCompositeContainer = (props: CallCompositeContainerProps): JSX.Element => { |
19 | 16 | const { adapter } = props; |
20 | 17 | const { currentTheme, currentRtl } = useSwitchableFluentTheme(); |
21 | 18 | const isMobileSession = useIsMobile(); |
| 19 | + const shouldDisableScreenShare = isIOS(); |
22 | 20 |
|
23 | | - /* @conditional-compile-remove(call-readiness) */ |
24 | 21 | const options: CallCompositeOptions = useMemo( |
25 | 22 | () => ({ |
26 | | - onPermissionsTroubleshootingClick, |
27 | | - onNetworkingTroubleShootingClick, |
| 23 | + /* @conditional-compile-remove(call-readiness) */ onPermissionsTroubleshootingClick, |
| 24 | + /* @conditional-compile-remove(call-readiness) */ onNetworkingTroubleShootingClick, |
28 | 25 | callControls: { |
29 | | - legacyControlBarExperience: false |
| 26 | + screenShareButton: !shouldDisableScreenShare |
30 | 27 | } |
31 | 28 | }), |
32 | | - [] |
| 29 | + [shouldDisableScreenShare] |
33 | 30 | ); |
34 | 31 |
|
35 | 32 | // Dispose of the adapter in the window's before unload event. |
@@ -58,7 +55,6 @@ export const CallCompositeContainer = (props: CallCompositeContainerProps): JSX. |
58 | 55 | rtl={currentRtl} |
59 | 56 | callInvitationUrl={callInvitationUrl} |
60 | 57 | formFactor={isMobileSession ? 'mobile' : 'desktop'} |
61 | | - /* @conditional-compile-remove(call-readiness) */ |
62 | 58 | options={options} |
63 | 59 | /> |
64 | 60 | ); |
|
0 commit comments