@azure/communication-react 1.14.0-beta.1 → 1.14.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/communication-react.d.ts +78 -0
- package/dist/dist-cjs/communication-react/index.js +29 -12
- package/dist/dist-cjs/communication-react/index.js.map +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.d.ts +39 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js +6 -4
- package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.d.ts +8 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js +9 -4
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.d.ts +39 -0
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js +13 -3
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js.map +1 -1
- package/package.json +1 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"telemetryVersion.js","sourceRoot":"","sources":["../../../../preprocess-dist/acs-ui-common/src/telemetryVersion.js"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;AAElC,wCAAwC;AAExC,MAAM,CAAC,OAAO,GAAG,eAAe,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n// GENERATED FILE. DO NOT EDIT MANUALLY.\n\nmodule.exports = '1.14.0-beta.
|
1
|
+
{"version":3,"file":"telemetryVersion.js","sourceRoot":"","sources":["../../../../preprocess-dist/acs-ui-common/src/telemetryVersion.js"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;AAElC,wCAAwC;AAExC,MAAM,CAAC,OAAO,GAAG,eAAe,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n// GENERATED FILE. DO NOT EDIT MANUALLY.\n\nmodule.exports = '1.14.0-beta.2';\n"]}
|
@@ -172,6 +172,45 @@ export type CallCompositeOptions = {
|
|
172
172
|
*/
|
173
173
|
layout?: VideoGalleryLayout;
|
174
174
|
};
|
175
|
+
/**
|
176
|
+
* Options for setting additional customizations related to personalized branding.
|
177
|
+
*/
|
178
|
+
branding?: {
|
179
|
+
/**
|
180
|
+
* Logo displayed on the configuration page.
|
181
|
+
*/
|
182
|
+
logo?: {
|
183
|
+
/**
|
184
|
+
* URL for the logo image.
|
185
|
+
*
|
186
|
+
* @remarks
|
187
|
+
* Recommended size is 80x80 pixels.
|
188
|
+
*/
|
189
|
+
url: string;
|
190
|
+
/**
|
191
|
+
* Alt text for the logo image.
|
192
|
+
*/
|
193
|
+
alt?: string;
|
194
|
+
/**
|
195
|
+
* The logo can be displayed as a circle.
|
196
|
+
*
|
197
|
+
* @defaultValue 'unset'
|
198
|
+
*/
|
199
|
+
shape?: 'unset' | 'circle';
|
200
|
+
};
|
201
|
+
/**
|
202
|
+
* Background image displayed on the configuration page.
|
203
|
+
*/
|
204
|
+
backgroundImage?: {
|
205
|
+
/**
|
206
|
+
* URL for the background image.
|
207
|
+
*
|
208
|
+
* @remarks
|
209
|
+
* Background image should be larger than 576x567 pixels and smaller than 2048x2048 pixels pixels.
|
210
|
+
*/
|
211
|
+
url: string;
|
212
|
+
};
|
213
|
+
};
|
175
214
|
};
|
176
215
|
/**
|
177
216
|
* A customizable UI composite for calling experience.
|
@@ -43,7 +43,7 @@ const isShowing = (overrideSidePane) => {
|
|
43
43
|
return !!(overrideSidePane === null || overrideSidePane === void 0 ? void 0 : overrideSidePane.isActive);
|
44
44
|
};
|
45
45
|
const MainScreen = (props) => {
|
46
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
46
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
47
47
|
const adapter = useAdapter();
|
48
48
|
const { camerasCount, microphonesCount } = useSelector(deviceCountSelector);
|
49
49
|
const hasCameras = camerasCount > 0;
|
@@ -133,7 +133,9 @@ const MainScreen = (props) => {
|
|
133
133
|
/* @conditional-compile-remove(call-readiness) */ deviceChecks: (_d = props.options) === null || _d === void 0 ? void 0 : _d.deviceChecks,
|
134
134
|
/* @conditional-compile-remove(call-readiness) */ onPermissionsTroubleshootingClick: (_e = props.options) === null || _e === void 0 ? void 0 : _e.onPermissionsTroubleshootingClick,
|
135
135
|
/* @conditional-compile-remove(call-readiness) */ onNetworkingTroubleShootingClick: (_f = props.options) === null || _f === void 0 ? void 0 : _f.onNetworkingTroubleShootingClick,
|
136
|
-
/* @conditional-compile-remove(capabilities) */ capabilitiesChangedNotificationBarProps: capabilitiesChangedNotificationBarProps
|
136
|
+
/* @conditional-compile-remove(capabilities) */ capabilitiesChangedNotificationBarProps: capabilitiesChangedNotificationBarProps,
|
137
|
+
/* @conditional-compile-remove(custom-branding) */ logo: (_h = (_g = props.options) === null || _g === void 0 ? void 0 : _g.branding) === null || _h === void 0 ? void 0 : _h.logo,
|
138
|
+
/* @conditional-compile-remove(custom-branding) */ backgroundImage: (_k = (_j = props.options) === null || _j === void 0 ? void 0 : _j.branding) === null || _k === void 0 ? void 0 : _k.backgroundImage });
|
137
139
|
break;
|
138
140
|
case 'accessDeniedTeamsMeeting':
|
139
141
|
pageElement = React.createElement(NoticePage, { iconName: "NoticePageAccessDeniedTeamsMeeting", title: locale.strings.call.failedToJoinTeamsMeetingReasonAccessDeniedTitle, moreDetails: locale.strings.call.failedToJoinTeamsMeetingReasonAccessDeniedMoreDetails, dataUiId: 'access-denied-teams-meeting-page' });
|
@@ -145,7 +147,7 @@ const MainScreen = (props) => {
|
|
145
147
|
pageElement = React.createElement(NoticePage, { iconName: "NoticePageJoinCallFailedDueToNoNetwork", title: locale.strings.call.failedToJoinCallDueToNoNetworkTitle, moreDetails: locale.strings.call.failedToJoinCallDueToNoNetworkMoreDetails, dataUiId: 'join-call-failed-due-to-no-network-page' });
|
146
148
|
break;
|
147
149
|
case 'leaving':
|
148
|
-
pageElement = React.createElement(NoticePage, { title: (
|
150
|
+
pageElement = React.createElement(NoticePage, { title: (_l = locale.strings.call.leavingCallTitle) !== null && _l !== void 0 ? _l : 'Leaving...', dataUiId: 'leaving-page', pageStyle: leavePageStyle, disableStartCallButton: true });
|
149
151
|
break;
|
150
152
|
case 'leftCall':
|
151
153
|
{
|
@@ -180,7 +182,7 @@ const MainScreen = (props) => {
|
|
180
182
|
/* @conditional-compile-remove(unsupported-browser) */
|
181
183
|
switch (page) {
|
182
184
|
case 'unsupportedEnvironment':
|
183
|
-
pageElement = React.createElement(React.Fragment, null, /* @conditional-compile-remove(unsupported-browser) */ React.createElement(UnsupportedBrowserPage, { onTroubleshootingClick: (
|
185
|
+
pageElement = React.createElement(React.Fragment, null, /* @conditional-compile-remove(unsupported-browser) */ React.createElement(UnsupportedBrowserPage, { onTroubleshootingClick: (_m = props.options) === null || _m === void 0 ? void 0 : _m.onEnvironmentInfoTroubleshootingClick, environmentInfo: adapter.getState().environmentInfo }));
|
184
186
|
break;
|
185
187
|
}
|
186
188
|
if (!pageElement) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"CallComposite.js","sourceRoot":"","sources":["../../../../../../preprocess-dist/react-composites/src/composites/CallComposite/CallComposite.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAGlC,OAAO,EAAsB,QAAQ,EAAgC,QAAQ,EAAE,yCAAmC;AAClH,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjF,OAAO,EAAE,YAAY,EAAsB,MAA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C1D,CACT,CACX,CAAC;AACX,CAAC,CAAC;AACF,MAAM,eAAe,GAAG,CAAC,OAExB,EAAyB,EAAE;IAC1B,wCAAwC;IACxC,IAAI,OAAO,CAAC,IAAI,KAAK,UAAU,EAAE,CAAC;QAChC,OAAO;YACL,KAAK,EAAE,KAAK;YACZ,KAAK,EAAE,IAAI;SACZ,CAAC;IACJ,CAAC;IACD,OAAO;QACL,KAAK,EAAE,IAAI;QACX,KAAK,EAAE,IAAI;KACZ,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { _isInCall } from '@internal/calling-component-bindings';\nimport { ActiveErrorMessage, ErrorBar, ParticipantMenuItemsCallback, useTheme } from '@internal/react-components';\nimport React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport { AvatarPersonaDataCallback } from '../common/AvatarPersona';\nimport { BaseProvider, BaseCompositeProps } from '../common/BaseComposite';\nimport { CallCompositeIcons } from '../common/icons';\nimport { useLocale } from '../localization';\nimport { CommonCallAdapter, StartCallIdentifier } from './adapter/CallAdapter';\nimport { CallAdapterProvider, useAdapter } from './adapter/CallAdapterProvider';\nimport { CallPage } from './pages/CallPage';\nimport { ConfigurationPage } from './pages/ConfigurationPage';\nimport { NoticePage } from './pages/NoticePage';\nimport { useSelector } from './hooks/useSelector';\nimport { getEndedCall, getPage, getTargetCallees } from './selectors/baseSelectors';\nimport { LobbyPage } from './pages/LobbyPage';\n/* @conditional-compile-remove(call-transfer) */\nimport { TransferPage } from './pages/TransferPage';\nimport { leavingPageStyle, mainScreenContainerStyleDesktop, mainScreenContainerStyleMobile } from './styles/CallComposite.styles';\nimport { CallControlOptions } from './types/CallControlOptions';\nimport { LayerHost, mergeStyles } from '@fluentui/react';\nimport { modalLayerHostStyle } from '../common/styles/ModalLocalAndRemotePIP.styles';\nimport { useId } from '@fluentui/react-hooks';\n/* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(PSTN-calls) */\nimport { HoldPage } from './pages/HoldPage';\n/* @conditional-compile-remove(unsupported-browser) */\nimport { UnsupportedBrowserPage } from './pages/UnsupportedBrowser';\nimport { PermissionConstraints } from '@azure/communication-calling';\n/* @conditional-compile-remove(rooms) */\nimport { ParticipantRole } from '@azure/communication-calling';\nimport { MobileChatSidePaneTabHeaderProps } from '../common/TabHeader';\nimport { InjectedSidePaneProps, SidePaneProvider, SidePaneRenderer } from './components/SidePane/SidePaneProvider';\nimport { filterLatestErrors, getEndedCallPageProps, trackErrorAsDismissed, updateTrackedErrorsWithActiveErrors } from './utils';\nimport { TrackedErrors } from './types/ErrorTracking';\nimport { usePropsFor } from './hooks/usePropsFor';\nimport { deviceCountSelector } from './selectors/deviceCountSelector';\n/* @conditional-compile-remove(gallery-layouts) */\nimport { VideoGalleryLayout } from '@internal/react-components';\n/* @conditional-compile-remove(capabilities) */\nimport { capabilitiesChangedInfoAndRoleSelector } from './selectors/capabilitiesChangedInfoAndRoleSelector';\n/* @conditional-compile-remove(capabilities) */\nimport { useTrackedCapabilityChangedNotifications } from './utils/TrackCapabilityChangedNotifications';\nimport { useEndedCallConsoleErrors } from './utils/useConsoleErrors';\n/**\n * Props for {@link CallComposite}.\n *\n * @public\n */\nexport interface CallCompositeProps extends BaseCompositeProps<CallCompositeIcons> {\n /**\n * An adapter provides logic and data to the composite.\n * Composite can also be controlled using the adapter.\n */\n adapter: CommonCallAdapter;\n /**\n * Optimizes the composite form factor for either desktop or mobile.\n * @remarks `mobile` is currently only optimized for Portrait mode on mobile devices and does not support landscape.\n * @defaultValue 'desktop'\n */\n formFactor?: 'desktop' | 'mobile';\n /**\n * URL to invite new participants to the current call. If this is supplied, a button appears in the Participants\n * Button flyout menu.\n */\n callInvitationUrl?: string;\n /**\n * Flags to enable/disable or customize UI elements of the {@link CallComposite}.\n */\n options?: CallCompositeOptions;\n}\n\n/* @conditional-compile-remove(call-readiness) */\n/**\n * Device Checks.\n * Choose whether or not to block starting a call depending on camera and microphone permission options.\n *\n * @beta\n */\nexport interface DeviceCheckOptions {\n /**\n * Camera Permission prompts for your call.\n * 'required' - requires the permission to be allowed before permitting the user join the call.\n * 'optional' - permission can be disallowed and the user is still permitted to join the call.\n * 'doNotPrompt' - permission is not required and the user is not prompted to allow the permission.\n */\n camera: 'required' | 'optional' | 'doNotPrompt';\n /**\n * Microphone permission prompts for your call.\n * 'required' - requires the permission to be allowed before permitting the user join the call.\n * 'optional' - permission can be disallowed and the user is still permitted to join the call.\n * 'doNotPrompt' - permission is not required and the user is not prompted to allow the permission.\n */\n microphone: 'required' | 'optional' | 'doNotPrompt';\n}\n\n/**\n * Menu options for remote video tiles in {@link VideoGallery}.\n *\n * @public\n */\nexport interface RemoteVideoTileMenuOptions {\n /**\n * If set to true, remote video tiles in the VideoGallery will not have menu options\n *\n * @defaultValue false\n */\n isHidden?: boolean;\n}\n\n/* @conditional-compile-remove(click-to-call) */ /* @conditional-compile-remove(rooms) */ /* @conditional-compile-remove(vertical-gallery) */\n/**\n * Options for the local video tile in the Call composite.\n *\n * @public\n */\nexport interface LocalVideoTileOptions {\n /**\n * Position of the local video tile. If unset will render the local tile in the floating local position.\n *\n * @defaultValue 'floating'\n * @remarks 'grid' - local video tile will be rendered in the grid view of the videoGallery.\n * 'floating' - local video tile will be rendered in the floating position and will observe overflow gallery\n * local video tile rules and be docked in the bottom corner.\n * This does not affect the Configuration screen or the side pane Picture in Picture in Picture view.\n */\n position?: 'grid' | 'floating';\n}\n/**\n * Optional features of the {@link CallComposite}.\n *\n * @public\n */\nexport type CallCompositeOptions = {\n /**\n * Surface Azure Communication Services backend errors in the UI with {@link @azure/communication-react#ErrorBar}.\n * Hide or show the error bar.\n * @defaultValue true\n */\n errorBar?: boolean;\n /**\n * Hide or Customize the control bar element.\n * Can be customized by providing an object of type {@link @azure/communication-react#CallControlOptions}.\n * @defaultValue true\n */\n callControls?: boolean | CallControlOptions;\n /* @conditional-compile-remove(call-readiness) */\n /**\n * Device permissions check options for your call.\n * Here you can choose what device permissions you prompt the user for,\n * as well as what device permissions must be accepted before starting a call.\n */\n deviceChecks?: DeviceCheckOptions;\n /* @conditional-compile-remove(call-readiness) */\n /**\n * Callback you may provide to supply users with further steps to troubleshoot why they have been\n * unable to grant your site the required permissions for the call.\n *\n * @example\n * ```ts\n * onPermissionsTroubleshootingClick: () =>\n * window.open('https://contoso.com/permissions-troubleshooting', '_blank');\n * ```\n *\n * @remarks\n * if this is not supplied, the composite will not show a 'further troubleshooting' link.\n */\n onPermissionsTroubleshootingClick?: (permissionsState: {\n camera: PermissionState;\n microphone: PermissionState;\n }) => void;\n /* @conditional-compile-remove(call-readiness) */\n /**\n * Callback you may provide to supply users with further steps to troubleshoot why they have been\n * having network issues when connecting to the call.\n *\n * @example\n * ```ts\n * onNetworkingTroubleShootingClick?: () =>\n * window.open('https://contoso.com/network-troubleshooting', '_blank');\n * ```\n *\n * @remarks\n * if this is not supplied, the composite will not show a 'network troubleshooting' link.\n */\n onNetworkingTroubleShootingClick?: () => void;\n /* @conditional-compile-remove(unsupported-browser) */\n /**\n * Callback you may provide to supply users with a provided page to showcase supported browsers by ACS.\n *\n * @example\n * ```ts\n * onBrowserTroubleShootingClick?: () =>\n * window.open('https://contoso.com/browser-troubleshooting', '_blank');\n * ```\n *\n * @remarks\n * if this is not supplied, the composite will not show a unsupported browser page.\n */\n onEnvironmentInfoTroubleshootingClick?: () => void;\n /**\n * Remote participant video tile menu options\n */\n remoteVideoTileMenuOptions?: RemoteVideoTileMenuOptions;\n /* @conditional-compile-remove(click-to-call) */\n /**\n * Options for controlling the local video tile.\n *\n * @remarks if 'false' the local video tile will not be rendered.\n */\n localVideoTile?: boolean | LocalVideoTileOptions;\n /* @conditional-compile-remove(gallery-layouts) */\n /**\n * Options for controlling the starting layout of the composite's video gallery\n */\n galleryOptions?: {\n /**\n * Layout for the gallery when the call starts\n */\n layout?: VideoGalleryLayout;\n };\n};\ntype MainScreenProps = {\n mobileView: boolean;\n modalLayerHostId: string;\n callInvitationUrl?: string;\n onFetchAvatarPersonaData?: AvatarPersonaDataCallback;\n onFetchParticipantMenuItems?: ParticipantMenuItemsCallback;\n options?: CallCompositeOptions;\n overrideSidePane?: InjectedSidePaneProps;\n onSidePaneIdChange?: (sidePaneId: string | undefined) => void;\n mobileChatTabHeader?: MobileChatSidePaneTabHeaderProps;\n onCloseChatPane?: () => void;\n};\nconst isShowing = (overrideSidePane?: InjectedSidePaneProps): boolean => {\n return !!overrideSidePane?.isActive;\n};\nconst MainScreen = (props: MainScreenProps): JSX.Element => {\n const adapter = useAdapter();\n const {\n camerasCount,\n microphonesCount\n } = useSelector(deviceCountSelector);\n const hasCameras = camerasCount > 0;\n const hasMicrophones = microphonesCount > 0;\n useEffect(() => {\n (async () => {\n const constrain = getQueryOptions({\n /* @conditional-compile-remove(rooms) */role: adapter.getState().call?.role\n });\n await adapter.askDevicePermission(constrain);\n adapter.queryCameras();\n adapter.queryMicrophones();\n adapter.querySpeakers();\n })();\n }, [adapter,\n // Ensure we re-ask for permissions if the number of devices goes from 0 -> n during a call\n // as we cannot request permissions when there are no devices.\n hasCameras, hasMicrophones]);\n const {\n callInvitationUrl,\n onFetchAvatarPersonaData,\n onFetchParticipantMenuItems\n } = props;\n const page = useSelector(getPage);\n const endedCall = useSelector(getEndedCall);\n const [sidePaneRenderer, setSidePaneRenderer] = React.useState<SidePaneRenderer | undefined>();\n const [injectedSidePaneProps, setInjectedSidePaneProps] = React.useState<InjectedSidePaneProps>();\n /* @conditional-compile-remove(gallery-layouts) */\n const [userSetGalleryLayout, setUserSetGalleryLayout] = useState<VideoGalleryLayout>(props.options?.galleryOptions?.layout ?? 'floatingLocalVideo');\n /* @conditional-compile-remove(gallery-layouts) */\n const [userSetOverflowGalleryPosition, setUserSetOverflowGalleryPosition] = useState<'Responsive' | 'horizontalTop'>('Responsive');\n const overridePropsRef = useRef<InjectedSidePaneProps | undefined>(props.overrideSidePane);\n useEffect(() => {\n setInjectedSidePaneProps(props.overrideSidePane);\n // When the injected side pane is opened, clear the previous side pane active state.\n // this ensures when the injected side pane is \"closed\", the previous side pane is not \"re-opened\".\n if (!isShowing(overridePropsRef.current) && isShowing(props.overrideSidePane)) {\n setSidePaneRenderer(undefined);\n }\n overridePropsRef.current = props.overrideSidePane;\n }, [props.overrideSidePane]);\n const onSidePaneIdChange = props.onSidePaneIdChange;\n useEffect(() => {\n onSidePaneIdChange?.(sidePaneRenderer?.id);\n }, [sidePaneRenderer?.id, onSidePaneIdChange]);\n\n // When the call ends ensure the side pane is set to closed to prevent the side pane being open if the call is re-joined.\n useEffect(() => {\n const closeSidePane = (): void => {\n setSidePaneRenderer(undefined);\n };\n adapter.on('callEnded', closeSidePane);\n return () => {\n adapter.off('callEnded', closeSidePane);\n };\n }, [adapter]);\n\n /* @conditional-compile-remove(capabilities) */\n const capabilitiesChangedInfoAndRole = useSelector(capabilitiesChangedInfoAndRoleSelector);\n\n /* @conditional-compile-remove(capabilities) */\n const capabilitiesChangedNotificationBarProps = useTrackedCapabilityChangedNotifications(capabilitiesChangedInfoAndRole);\n\n // Track the last dismissed errors of any error kind to prevent errors from re-appearing on subsequent page navigation\n // This works by tracking the most recent timestamp of any active error type.\n // And then tracking when that error type was last dismissed.\n const activeErrors = usePropsFor(ErrorBar).activeErrorMessages;\n const [trackedErrors, setTrackedErrors] = useState<TrackedErrors>(({} as TrackedErrors));\n useEffect(() => {\n setTrackedErrors(prev => updateTrackedErrorsWithActiveErrors(prev, activeErrors));\n }, [activeErrors]);\n const onDismissError = useCallback((error: ActiveErrorMessage) => {\n setTrackedErrors(prev => trackErrorAsDismissed(error.type, prev));\n }, []);\n const latestErrors = useMemo(() => filterLatestErrors(activeErrors, trackedErrors), [activeErrors, trackedErrors]);\n const callees = (useSelector(getTargetCallees) as StartCallIdentifier[]);\n const locale = useLocale();\n const palette = useTheme().palette;\n const leavePageStyle = useMemo(() => leavingPageStyle(palette), [palette]);\n let pageElement: JSX.Element | undefined;\n switch (page) {\n case 'configuration':\n pageElement = <ConfigurationPage mobileView={props.mobileView} startCallHandler={(): void => {\n if (callees) {\n adapter.startCall(callees);\n } else {\n adapter.joinCall({\n microphoneOn: 'keep',\n cameraOn: 'keep'\n });\n }\n }} updateSidePaneRenderer={setSidePaneRenderer} latestErrors={latestErrors} onDismissError={onDismissError} modalLayerHostId={props.modalLayerHostId}\n /* @conditional-compile-remove(call-readiness) */ deviceChecks={props.options?.deviceChecks}\n /* @conditional-compile-remove(call-readiness) */ onPermissionsTroubleshootingClick={props.options?.onPermissionsTroubleshootingClick}\n /* @conditional-compile-remove(call-readiness) */ onNetworkingTroubleShootingClick={props.options?.onNetworkingTroubleShootingClick}\n /* @conditional-compile-remove(capabilities) */ capabilitiesChangedNotificationBarProps={capabilitiesChangedNotificationBarProps} />;\n break;\n case 'accessDeniedTeamsMeeting':\n pageElement = <NoticePage iconName=\"NoticePageAccessDeniedTeamsMeeting\" title={locale.strings.call.failedToJoinTeamsMeetingReasonAccessDeniedTitle} moreDetails={locale.strings.call.failedToJoinTeamsMeetingReasonAccessDeniedMoreDetails} dataUiId={'access-denied-teams-meeting-page'} />;\n break;\n case 'removedFromCall':\n pageElement = <NoticePage iconName=\"NoticePageRemovedFromCall\" title={locale.strings.call.removedFromCallTitle} moreDetails={locale.strings.call.removedFromCallMoreDetails} dataUiId={'removed-from-call-page'} />;\n break;\n case 'joinCallFailedDueToNoNetwork':\n pageElement = <NoticePage iconName=\"NoticePageJoinCallFailedDueToNoNetwork\" title={locale.strings.call.failedToJoinCallDueToNoNetworkTitle} moreDetails={locale.strings.call.failedToJoinCallDueToNoNetworkMoreDetails} dataUiId={'join-call-failed-due-to-no-network-page'} />;\n break;\n case 'leaving':\n pageElement = <NoticePage title={locale.strings.call.leavingCallTitle ?? 'Leaving...'} dataUiId={'leaving-page'} pageStyle={leavePageStyle} disableStartCallButton={true} />;\n break;\n case 'leftCall':\n {\n const {\n title,\n moreDetails,\n disableStartCallButton,\n iconName\n } = getEndedCallPageProps(locale, endedCall);\n pageElement = <NoticePage iconName={iconName} title={title} moreDetails={callees ? '' : moreDetails} dataUiId={'left-call-page'} disableStartCallButton={disableStartCallButton} />;\n break;\n }\n case 'lobby':\n pageElement = <LobbyPage mobileView={props.mobileView} modalLayerHostId={props.modalLayerHostId} options={props.options} updateSidePaneRenderer={setSidePaneRenderer} mobileChatTabHeader={props.mobileChatTabHeader} latestErrors={latestErrors} onDismissError={onDismissError}\n /* @conditional-compile-remove(capabilities) */ capabilitiesChangedNotificationBarProps={capabilitiesChangedNotificationBarProps} />;\n break;\n /* @conditional-compile-remove(call-transfer) */\n case 'transferring':\n pageElement = <TransferPage mobileView={props.mobileView} modalLayerHostId={props.modalLayerHostId} options={props.options} updateSidePaneRenderer={setSidePaneRenderer} mobileChatTabHeader={props.mobileChatTabHeader} onFetchAvatarPersonaData={onFetchAvatarPersonaData} latestErrors={latestErrors} onDismissError={onDismissError}\n /* @conditional-compile-remove(capabilities) */ capabilitiesChangedNotificationBarProps={capabilitiesChangedNotificationBarProps} />;\n break;\n case 'call':\n pageElement = <CallPage callInvitationURL={callInvitationUrl} onFetchAvatarPersonaData={onFetchAvatarPersonaData} onFetchParticipantMenuItems={onFetchParticipantMenuItems} mobileView={props.mobileView} modalLayerHostId={props.modalLayerHostId} options={props.options} updateSidePaneRenderer={setSidePaneRenderer} mobileChatTabHeader={props.mobileChatTabHeader} onCloseChatPane={props.onCloseChatPane} latestErrors={latestErrors} onDismissError={onDismissError}\n /* @conditional-compile-remove(gallery-layouts) */ galleryLayout={userSetGalleryLayout}\n /* @conditional-compile-remove(gallery-layouts) */ onUserSetGalleryLayoutChange={setUserSetGalleryLayout}\n /* @conditional-compile-remove(gallery-layouts) */ onSetUserSetOverflowGalleryPosition={setUserSetOverflowGalleryPosition}\n /* @conditional-compile-remove(gallery-layouts) */ userSetOverflowGalleryPosition={userSetOverflowGalleryPosition}\n /* @conditional-compile-remove(capabilities) */ capabilitiesChangedNotificationBarProps={capabilitiesChangedNotificationBarProps} />;\n break;\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n case 'hold':\n pageElement = <>\n {<HoldPage mobileView={props.mobileView} modalLayerHostId={props.modalLayerHostId} options={props.options} updateSidePaneRenderer={setSidePaneRenderer} mobileChatTabHeader={props.mobileChatTabHeader} latestErrors={latestErrors} onDismissError={onDismissError}\n /* @conditional-compile-remove(capabilities) */ capabilitiesChangedNotificationBarProps={capabilitiesChangedNotificationBarProps} />}\n </>;\n break;\n }\n useEndedCallConsoleErrors(endedCall);\n\n /* @conditional-compile-remove(unsupported-browser) */\n switch (page) {\n case 'unsupportedEnvironment':\n pageElement = <>\n {/* @conditional-compile-remove(unsupported-browser) */\n <UnsupportedBrowserPage onTroubleshootingClick={props.options?.onEnvironmentInfoTroubleshootingClick} environmentInfo={adapter.getState().environmentInfo} />}\n </>;\n break;\n }\n if (!pageElement) {\n throw new Error('Invalid call composite page');\n }\n return <SidePaneProvider sidePaneRenderer={sidePaneRenderer} overrideSidePane={injectedSidePaneProps}>\n {pageElement}\n </SidePaneProvider>;\n};\n\n/**\n * A customizable UI composite for calling experience.\n *\n * @remarks Call composite min width/height are as follow:\n * - mobile: 17.5rem x 21rem (280px x 336px, with default rem at 16px)\n * - desktop: 30rem x 22rem (480px x 352px, with default rem at 16px)\n *\n * @public\n */\nexport const CallComposite = (props: CallCompositeProps): JSX.Element => <CallCompositeInner {...props} />;\n\n/**\n * @private\n */\nexport interface InternalCallCompositeProps {\n overrideSidePane?: InjectedSidePaneProps;\n onSidePaneIdChange?: (sidePaneId: string | undefined) => void;\n onCloseChatPane?: () => void;\n // legacy property to avoid breaking change\n mobileChatTabHeader?: MobileChatSidePaneTabHeaderProps;\n}\n\n/** @private */\nexport const CallCompositeInner = (props: CallCompositeProps & InternalCallCompositeProps): JSX.Element => {\n const {\n adapter,\n callInvitationUrl,\n onFetchAvatarPersonaData,\n onFetchParticipantMenuItems,\n options,\n formFactor = 'desktop'\n } = props;\n const mobileView = formFactor === 'mobile';\n const modalLayerHostId = useId('modalLayerhost');\n const mainScreenContainerClassName = useMemo(() => {\n return mobileView ? mainScreenContainerStyleMobile : mainScreenContainerStyleDesktop;\n }, [mobileView]);\n return <div className={mainScreenContainerClassName}>\n <BaseProvider {...props}>\n <CallAdapterProvider adapter={adapter}>\n <MainScreen callInvitationUrl={callInvitationUrl} onFetchAvatarPersonaData={onFetchAvatarPersonaData} onFetchParticipantMenuItems={onFetchParticipantMenuItems} mobileView={mobileView} modalLayerHostId={modalLayerHostId} options={options} onSidePaneIdChange={props.onSidePaneIdChange} overrideSidePane={props.overrideSidePane} mobileChatTabHeader={props.mobileChatTabHeader} onCloseChatPane={props.onCloseChatPane} />\n {\n // This layer host is for ModalLocalAndRemotePIP in SidePane. This LayerHost cannot be inside the SidePane\n // because when the SidePane is hidden, ie. style property display is 'none', it takes up no space. This causes problems when dragging\n // the Modal because the draggable bounds thinks it has no space and will always return to its initial position after dragging.\n // Additionally, this layer host cannot be in the Call Arrangement as it needs to be rendered before useMinMaxDragPosition() in\n // common/utils useRef is called.\n // Warning: this is fragile and works because the call arrangement page is only rendered after the call has connected and thus this\n // LayerHost will be guaranteed to have rendered (and subsequently mounted in the DOM). This ensures the DOM element will be available\n // before the call to `document.getElementById(modalLayerHostId)` is made.\n <LayerHost id={modalLayerHostId} className={mergeStyles(modalLayerHostStyle)} />}\n </CallAdapterProvider>\n </BaseProvider>\n </div>;\n};\nconst getQueryOptions = (options: {\n /* @conditional-compile-remove(rooms) */role?: ParticipantRole;\n}): PermissionConstraints => {\n /* @conditional-compile-remove(rooms) */\n if (options.role === 'Consumer') {\n return {\n video: false,\n audio: true\n };\n }\n return {\n video: true,\n audio: true\n };\n};"]}
|
1
|
+
{"version":3,"file":"CallComposite.js","sourceRoot":"","sources":["../../../../../../preprocess-dist/react-composites/src/composites/CallComposite/CallComposite.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAGlC,OAAO,EAAsB,QAAQ,EAAgC,QAAQ,EAAE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AAE,KAAK,CAAC,gBAAgB,EAAE,mBAAmB,EAAE,KAAK,CAAC,mBAAmB,EAAE,eAAe,EAAE,KAAK,CAAC,eAAe,GAAI;gBAEla,0GAA0G;gBAC1G,sIAAsI;gBACtI,+HAA+H;gBAC/H,+HAA+H;gBAC/H,iCAAiC;gBACjC,mIAAmI;gBACnI,sIAAsI;gBACtI,0EAA0E;gBAC1E,oBAAC,SAAS,IAAC,EAAE,EAAE,gBAAgB,EAAE,SAAS,EAAE,WAAW,CAAC,mBAAmB,CAAC,GAAI,CAC1D,CACT,CACX,CAAC;AACX,CAAC,CAAC;AACF,MAAM,eAAe,GAAG,CAAC,OAExB,EAAyB,EAAE;IAC1B,wCAAwC;IACxC,IAAI,OAAO,CAAC,IAAI,KAAK,UAAU,EAAE,CAAC;QAChC,OAAO;YACL,KAAK,EAAE,KAAK;YACZ,KAAK,EAAE,IAAI;SACZ,CAAC;IACJ,CAAC;IACD,OAAO;QACL,KAAK,EAAE,IAAI;QACX,KAAK,EAAE,IAAI;KACZ,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { _isInCall } from '@internal/calling-component-bindings';\nimport { ActiveErrorMessage, ErrorBar, ParticipantMenuItemsCallback, useTheme } from '@internal/react-components';\nimport React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport { AvatarPersonaDataCallback } from '../common/AvatarPersona';\nimport { BaseProvider, BaseCompositeProps } from '../common/BaseComposite';\nimport { CallCompositeIcons } from '../common/icons';\nimport { useLocale } from '../localization';\nimport { CommonCallAdapter, StartCallIdentifier } from './adapter/CallAdapter';\nimport { CallAdapterProvider, useAdapter } from './adapter/CallAdapterProvider';\nimport { CallPage } from './pages/CallPage';\nimport { ConfigurationPage } from './pages/ConfigurationPage';\nimport { NoticePage } from './pages/NoticePage';\nimport { useSelector } from './hooks/useSelector';\nimport { getEndedCall, getPage, getTargetCallees } from './selectors/baseSelectors';\nimport { LobbyPage } from './pages/LobbyPage';\n/* @conditional-compile-remove(call-transfer) */\nimport { TransferPage } from './pages/TransferPage';\nimport { leavingPageStyle, mainScreenContainerStyleDesktop, mainScreenContainerStyleMobile } from './styles/CallComposite.styles';\nimport { CallControlOptions } from './types/CallControlOptions';\nimport { LayerHost, mergeStyles } from '@fluentui/react';\nimport { modalLayerHostStyle } from '../common/styles/ModalLocalAndRemotePIP.styles';\nimport { useId } from '@fluentui/react-hooks';\n/* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(PSTN-calls) */\nimport { HoldPage } from './pages/HoldPage';\n/* @conditional-compile-remove(unsupported-browser) */\nimport { UnsupportedBrowserPage } from './pages/UnsupportedBrowser';\nimport { PermissionConstraints } from '@azure/communication-calling';\n/* @conditional-compile-remove(rooms) */\nimport { ParticipantRole } from '@azure/communication-calling';\nimport { MobileChatSidePaneTabHeaderProps } from '../common/TabHeader';\nimport { InjectedSidePaneProps, SidePaneProvider, SidePaneRenderer } from './components/SidePane/SidePaneProvider';\nimport { filterLatestErrors, getEndedCallPageProps, trackErrorAsDismissed, updateTrackedErrorsWithActiveErrors } from './utils';\nimport { TrackedErrors } from './types/ErrorTracking';\nimport { usePropsFor } from './hooks/usePropsFor';\nimport { deviceCountSelector } from './selectors/deviceCountSelector';\n/* @conditional-compile-remove(gallery-layouts) */\nimport { VideoGalleryLayout } from '@internal/react-components';\n/* @conditional-compile-remove(capabilities) */\nimport { capabilitiesChangedInfoAndRoleSelector } from './selectors/capabilitiesChangedInfoAndRoleSelector';\n/* @conditional-compile-remove(capabilities) */\nimport { useTrackedCapabilityChangedNotifications } from './utils/TrackCapabilityChangedNotifications';\nimport { useEndedCallConsoleErrors } from './utils/useConsoleErrors';\n/**\n * Props for {@link CallComposite}.\n *\n * @public\n */\nexport interface CallCompositeProps extends BaseCompositeProps<CallCompositeIcons> {\n /**\n * An adapter provides logic and data to the composite.\n * Composite can also be controlled using the adapter.\n */\n adapter: CommonCallAdapter;\n /**\n * Optimizes the composite form factor for either desktop or mobile.\n * @remarks `mobile` is currently only optimized for Portrait mode on mobile devices and does not support landscape.\n * @defaultValue 'desktop'\n */\n formFactor?: 'desktop' | 'mobile';\n /**\n * URL to invite new participants to the current call. If this is supplied, a button appears in the Participants\n * Button flyout menu.\n */\n callInvitationUrl?: string;\n /**\n * Flags to enable/disable or customize UI elements of the {@link CallComposite}.\n */\n options?: CallCompositeOptions;\n}\n\n/* @conditional-compile-remove(call-readiness) */\n/**\n * Device Checks.\n * Choose whether or not to block starting a call depending on camera and microphone permission options.\n *\n * @beta\n */\nexport interface DeviceCheckOptions {\n /**\n * Camera Permission prompts for your call.\n * 'required' - requires the permission to be allowed before permitting the user join the call.\n * 'optional' - permission can be disallowed and the user is still permitted to join the call.\n * 'doNotPrompt' - permission is not required and the user is not prompted to allow the permission.\n */\n camera: 'required' | 'optional' | 'doNotPrompt';\n /**\n * Microphone permission prompts for your call.\n * 'required' - requires the permission to be allowed before permitting the user join the call.\n * 'optional' - permission can be disallowed and the user is still permitted to join the call.\n * 'doNotPrompt' - permission is not required and the user is not prompted to allow the permission.\n */\n microphone: 'required' | 'optional' | 'doNotPrompt';\n}\n\n/**\n * Menu options for remote video tiles in {@link VideoGallery}.\n *\n * @public\n */\nexport interface RemoteVideoTileMenuOptions {\n /**\n * If set to true, remote video tiles in the VideoGallery will not have menu options\n *\n * @defaultValue false\n */\n isHidden?: boolean;\n}\n\n/* @conditional-compile-remove(click-to-call) */ /* @conditional-compile-remove(rooms) */ /* @conditional-compile-remove(vertical-gallery) */\n/**\n * Options for the local video tile in the Call composite.\n *\n * @public\n */\nexport interface LocalVideoTileOptions {\n /**\n * Position of the local video tile. If unset will render the local tile in the floating local position.\n *\n * @defaultValue 'floating'\n * @remarks 'grid' - local video tile will be rendered in the grid view of the videoGallery.\n * 'floating' - local video tile will be rendered in the floating position and will observe overflow gallery\n * local video tile rules and be docked in the bottom corner.\n * This does not affect the Configuration screen or the side pane Picture in Picture in Picture view.\n */\n position?: 'grid' | 'floating';\n}\n/**\n * Optional features of the {@link CallComposite}.\n *\n * @public\n */\nexport type CallCompositeOptions = {\n /**\n * Surface Azure Communication Services backend errors in the UI with {@link @azure/communication-react#ErrorBar}.\n * Hide or show the error bar.\n * @defaultValue true\n */\n errorBar?: boolean;\n /**\n * Hide or Customize the control bar element.\n * Can be customized by providing an object of type {@link @azure/communication-react#CallControlOptions}.\n * @defaultValue true\n */\n callControls?: boolean | CallControlOptions;\n /* @conditional-compile-remove(call-readiness) */\n /**\n * Device permissions check options for your call.\n * Here you can choose what device permissions you prompt the user for,\n * as well as what device permissions must be accepted before starting a call.\n */\n deviceChecks?: DeviceCheckOptions;\n /* @conditional-compile-remove(call-readiness) */\n /**\n * Callback you may provide to supply users with further steps to troubleshoot why they have been\n * unable to grant your site the required permissions for the call.\n *\n * @example\n * ```ts\n * onPermissionsTroubleshootingClick: () =>\n * window.open('https://contoso.com/permissions-troubleshooting', '_blank');\n * ```\n *\n * @remarks\n * if this is not supplied, the composite will not show a 'further troubleshooting' link.\n */\n onPermissionsTroubleshootingClick?: (permissionsState: {\n camera: PermissionState;\n microphone: PermissionState;\n }) => void;\n /* @conditional-compile-remove(call-readiness) */\n /**\n * Callback you may provide to supply users with further steps to troubleshoot why they have been\n * having network issues when connecting to the call.\n *\n * @example\n * ```ts\n * onNetworkingTroubleShootingClick?: () =>\n * window.open('https://contoso.com/network-troubleshooting', '_blank');\n * ```\n *\n * @remarks\n * if this is not supplied, the composite will not show a 'network troubleshooting' link.\n */\n onNetworkingTroubleShootingClick?: () => void;\n /* @conditional-compile-remove(unsupported-browser) */\n /**\n * Callback you may provide to supply users with a provided page to showcase supported browsers by ACS.\n *\n * @example\n * ```ts\n * onBrowserTroubleShootingClick?: () =>\n * window.open('https://contoso.com/browser-troubleshooting', '_blank');\n * ```\n *\n * @remarks\n * if this is not supplied, the composite will not show a unsupported browser page.\n */\n onEnvironmentInfoTroubleshootingClick?: () => void;\n /**\n * Remote participant video tile menu options\n */\n remoteVideoTileMenuOptions?: RemoteVideoTileMenuOptions;\n /* @conditional-compile-remove(click-to-call) */\n /**\n * Options for controlling the local video tile.\n *\n * @remarks if 'false' the local video tile will not be rendered.\n */\n localVideoTile?: boolean | LocalVideoTileOptions;\n /* @conditional-compile-remove(gallery-layouts) */\n /**\n * Options for controlling the starting layout of the composite's video gallery\n */\n galleryOptions?: {\n /**\n * Layout for the gallery when the call starts\n */\n layout?: VideoGalleryLayout;\n };\n /* @conditional-compile-remove(custom-branding) */\n /**\n * Options for setting additional customizations related to personalized branding.\n */\n branding?: {\n /**\n * Logo displayed on the configuration page.\n */\n logo?: {\n /**\n * URL for the logo image.\n *\n * @remarks\n * Recommended size is 80x80 pixels.\n */\n url: string;\n /**\n * Alt text for the logo image.\n */\n alt?: string;\n /**\n * The logo can be displayed as a circle.\n *\n * @defaultValue 'unset'\n */\n shape?: 'unset' | 'circle';\n };\n /* @conditional-compile-remove(custom-branding) */\n /**\n * Background image displayed on the configuration page.\n */\n backgroundImage?: {\n /**\n * URL for the background image.\n *\n * @remarks\n * Background image should be larger than 576x567 pixels and smaller than 2048x2048 pixels pixels.\n */\n url: string;\n };\n };\n};\ntype MainScreenProps = {\n mobileView: boolean;\n modalLayerHostId: string;\n callInvitationUrl?: string;\n onFetchAvatarPersonaData?: AvatarPersonaDataCallback;\n onFetchParticipantMenuItems?: ParticipantMenuItemsCallback;\n options?: CallCompositeOptions;\n overrideSidePane?: InjectedSidePaneProps;\n onSidePaneIdChange?: (sidePaneId: string | undefined) => void;\n mobileChatTabHeader?: MobileChatSidePaneTabHeaderProps;\n onCloseChatPane?: () => void;\n};\nconst isShowing = (overrideSidePane?: InjectedSidePaneProps): boolean => {\n return !!overrideSidePane?.isActive;\n};\nconst MainScreen = (props: MainScreenProps): JSX.Element => {\n const adapter = useAdapter();\n const {\n camerasCount,\n microphonesCount\n } = useSelector(deviceCountSelector);\n const hasCameras = camerasCount > 0;\n const hasMicrophones = microphonesCount > 0;\n useEffect(() => {\n (async () => {\n const constrain = getQueryOptions({\n /* @conditional-compile-remove(rooms) */role: adapter.getState().call?.role\n });\n await adapter.askDevicePermission(constrain);\n adapter.queryCameras();\n adapter.queryMicrophones();\n adapter.querySpeakers();\n })();\n }, [adapter,\n // Ensure we re-ask for permissions if the number of devices goes from 0 -> n during a call\n // as we cannot request permissions when there are no devices.\n hasCameras, hasMicrophones]);\n const {\n callInvitationUrl,\n onFetchAvatarPersonaData,\n onFetchParticipantMenuItems\n } = props;\n const page = useSelector(getPage);\n const endedCall = useSelector(getEndedCall);\n const [sidePaneRenderer, setSidePaneRenderer] = React.useState<SidePaneRenderer | undefined>();\n const [injectedSidePaneProps, setInjectedSidePaneProps] = React.useState<InjectedSidePaneProps>();\n /* @conditional-compile-remove(gallery-layouts) */\n const [userSetGalleryLayout, setUserSetGalleryLayout] = useState<VideoGalleryLayout>(props.options?.galleryOptions?.layout ?? 'floatingLocalVideo');\n /* @conditional-compile-remove(gallery-layouts) */\n const [userSetOverflowGalleryPosition, setUserSetOverflowGalleryPosition] = useState<'Responsive' | 'horizontalTop'>('Responsive');\n const overridePropsRef = useRef<InjectedSidePaneProps | undefined>(props.overrideSidePane);\n useEffect(() => {\n setInjectedSidePaneProps(props.overrideSidePane);\n // When the injected side pane is opened, clear the previous side pane active state.\n // this ensures when the injected side pane is \"closed\", the previous side pane is not \"re-opened\".\n if (!isShowing(overridePropsRef.current) && isShowing(props.overrideSidePane)) {\n setSidePaneRenderer(undefined);\n }\n overridePropsRef.current = props.overrideSidePane;\n }, [props.overrideSidePane]);\n const onSidePaneIdChange = props.onSidePaneIdChange;\n useEffect(() => {\n onSidePaneIdChange?.(sidePaneRenderer?.id);\n }, [sidePaneRenderer?.id, onSidePaneIdChange]);\n\n // When the call ends ensure the side pane is set to closed to prevent the side pane being open if the call is re-joined.\n useEffect(() => {\n const closeSidePane = (): void => {\n setSidePaneRenderer(undefined);\n };\n adapter.on('callEnded', closeSidePane);\n return () => {\n adapter.off('callEnded', closeSidePane);\n };\n }, [adapter]);\n\n /* @conditional-compile-remove(capabilities) */\n const capabilitiesChangedInfoAndRole = useSelector(capabilitiesChangedInfoAndRoleSelector);\n\n /* @conditional-compile-remove(capabilities) */\n const capabilitiesChangedNotificationBarProps = useTrackedCapabilityChangedNotifications(capabilitiesChangedInfoAndRole);\n\n // Track the last dismissed errors of any error kind to prevent errors from re-appearing on subsequent page navigation\n // This works by tracking the most recent timestamp of any active error type.\n // And then tracking when that error type was last dismissed.\n const activeErrors = usePropsFor(ErrorBar).activeErrorMessages;\n const [trackedErrors, setTrackedErrors] = useState<TrackedErrors>(({} as TrackedErrors));\n useEffect(() => {\n setTrackedErrors(prev => updateTrackedErrorsWithActiveErrors(prev, activeErrors));\n }, [activeErrors]);\n const onDismissError = useCallback((error: ActiveErrorMessage) => {\n setTrackedErrors(prev => trackErrorAsDismissed(error.type, prev));\n }, []);\n const latestErrors = useMemo(() => filterLatestErrors(activeErrors, trackedErrors), [activeErrors, trackedErrors]);\n const callees = (useSelector(getTargetCallees) as StartCallIdentifier[]);\n const locale = useLocale();\n const palette = useTheme().palette;\n const leavePageStyle = useMemo(() => leavingPageStyle(palette), [palette]);\n let pageElement: JSX.Element | undefined;\n switch (page) {\n case 'configuration':\n pageElement = <ConfigurationPage mobileView={props.mobileView} startCallHandler={(): void => {\n if (callees) {\n adapter.startCall(callees);\n } else {\n adapter.joinCall({\n microphoneOn: 'keep',\n cameraOn: 'keep'\n });\n }\n }} updateSidePaneRenderer={setSidePaneRenderer} latestErrors={latestErrors} onDismissError={onDismissError} modalLayerHostId={props.modalLayerHostId}\n /* @conditional-compile-remove(call-readiness) */ deviceChecks={props.options?.deviceChecks}\n /* @conditional-compile-remove(call-readiness) */ onPermissionsTroubleshootingClick={props.options?.onPermissionsTroubleshootingClick}\n /* @conditional-compile-remove(call-readiness) */ onNetworkingTroubleShootingClick={props.options?.onNetworkingTroubleShootingClick}\n /* @conditional-compile-remove(capabilities) */ capabilitiesChangedNotificationBarProps={capabilitiesChangedNotificationBarProps}\n /* @conditional-compile-remove(custom-branding) */ logo={props.options?.branding?.logo}\n /* @conditional-compile-remove(custom-branding) */ backgroundImage={props.options?.branding?.backgroundImage} />;\n break;\n case 'accessDeniedTeamsMeeting':\n pageElement = <NoticePage iconName=\"NoticePageAccessDeniedTeamsMeeting\" title={locale.strings.call.failedToJoinTeamsMeetingReasonAccessDeniedTitle} moreDetails={locale.strings.call.failedToJoinTeamsMeetingReasonAccessDeniedMoreDetails} dataUiId={'access-denied-teams-meeting-page'} />;\n break;\n case 'removedFromCall':\n pageElement = <NoticePage iconName=\"NoticePageRemovedFromCall\" title={locale.strings.call.removedFromCallTitle} moreDetails={locale.strings.call.removedFromCallMoreDetails} dataUiId={'removed-from-call-page'} />;\n break;\n case 'joinCallFailedDueToNoNetwork':\n pageElement = <NoticePage iconName=\"NoticePageJoinCallFailedDueToNoNetwork\" title={locale.strings.call.failedToJoinCallDueToNoNetworkTitle} moreDetails={locale.strings.call.failedToJoinCallDueToNoNetworkMoreDetails} dataUiId={'join-call-failed-due-to-no-network-page'} />;\n break;\n case 'leaving':\n pageElement = <NoticePage title={locale.strings.call.leavingCallTitle ?? 'Leaving...'} dataUiId={'leaving-page'} pageStyle={leavePageStyle} disableStartCallButton={true} />;\n break;\n case 'leftCall':\n {\n const {\n title,\n moreDetails,\n disableStartCallButton,\n iconName\n } = getEndedCallPageProps(locale, endedCall);\n pageElement = <NoticePage iconName={iconName} title={title} moreDetails={callees ? '' : moreDetails} dataUiId={'left-call-page'} disableStartCallButton={disableStartCallButton} />;\n break;\n }\n case 'lobby':\n pageElement = <LobbyPage mobileView={props.mobileView} modalLayerHostId={props.modalLayerHostId} options={props.options} updateSidePaneRenderer={setSidePaneRenderer} mobileChatTabHeader={props.mobileChatTabHeader} latestErrors={latestErrors} onDismissError={onDismissError}\n /* @conditional-compile-remove(capabilities) */ capabilitiesChangedNotificationBarProps={capabilitiesChangedNotificationBarProps} />;\n break;\n /* @conditional-compile-remove(call-transfer) */\n case 'transferring':\n pageElement = <TransferPage mobileView={props.mobileView} modalLayerHostId={props.modalLayerHostId} options={props.options} updateSidePaneRenderer={setSidePaneRenderer} mobileChatTabHeader={props.mobileChatTabHeader} onFetchAvatarPersonaData={onFetchAvatarPersonaData} latestErrors={latestErrors} onDismissError={onDismissError}\n /* @conditional-compile-remove(capabilities) */ capabilitiesChangedNotificationBarProps={capabilitiesChangedNotificationBarProps} />;\n break;\n case 'call':\n pageElement = <CallPage callInvitationURL={callInvitationUrl} onFetchAvatarPersonaData={onFetchAvatarPersonaData} onFetchParticipantMenuItems={onFetchParticipantMenuItems} mobileView={props.mobileView} modalLayerHostId={props.modalLayerHostId} options={props.options} updateSidePaneRenderer={setSidePaneRenderer} mobileChatTabHeader={props.mobileChatTabHeader} onCloseChatPane={props.onCloseChatPane} latestErrors={latestErrors} onDismissError={onDismissError}\n /* @conditional-compile-remove(gallery-layouts) */ galleryLayout={userSetGalleryLayout}\n /* @conditional-compile-remove(gallery-layouts) */ onUserSetGalleryLayoutChange={setUserSetGalleryLayout}\n /* @conditional-compile-remove(gallery-layouts) */ onSetUserSetOverflowGalleryPosition={setUserSetOverflowGalleryPosition}\n /* @conditional-compile-remove(gallery-layouts) */ userSetOverflowGalleryPosition={userSetOverflowGalleryPosition}\n /* @conditional-compile-remove(capabilities) */ capabilitiesChangedNotificationBarProps={capabilitiesChangedNotificationBarProps} />;\n break;\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n case 'hold':\n pageElement = <>\n {<HoldPage mobileView={props.mobileView} modalLayerHostId={props.modalLayerHostId} options={props.options} updateSidePaneRenderer={setSidePaneRenderer} mobileChatTabHeader={props.mobileChatTabHeader} latestErrors={latestErrors} onDismissError={onDismissError}\n /* @conditional-compile-remove(capabilities) */ capabilitiesChangedNotificationBarProps={capabilitiesChangedNotificationBarProps} />}\n </>;\n break;\n }\n useEndedCallConsoleErrors(endedCall);\n\n /* @conditional-compile-remove(unsupported-browser) */\n switch (page) {\n case 'unsupportedEnvironment':\n pageElement = <>\n {/* @conditional-compile-remove(unsupported-browser) */\n <UnsupportedBrowserPage onTroubleshootingClick={props.options?.onEnvironmentInfoTroubleshootingClick} environmentInfo={adapter.getState().environmentInfo} />}\n </>;\n break;\n }\n if (!pageElement) {\n throw new Error('Invalid call composite page');\n }\n return <SidePaneProvider sidePaneRenderer={sidePaneRenderer} overrideSidePane={injectedSidePaneProps}>\n {pageElement}\n </SidePaneProvider>;\n};\n\n/**\n * A customizable UI composite for calling experience.\n *\n * @remarks Call composite min width/height are as follow:\n * - mobile: 17.5rem x 21rem (280px x 336px, with default rem at 16px)\n * - desktop: 30rem x 22rem (480px x 352px, with default rem at 16px)\n *\n * @public\n */\nexport const CallComposite = (props: CallCompositeProps): JSX.Element => <CallCompositeInner {...props} />;\n\n/**\n * @private\n */\nexport interface InternalCallCompositeProps {\n overrideSidePane?: InjectedSidePaneProps;\n onSidePaneIdChange?: (sidePaneId: string | undefined) => void;\n onCloseChatPane?: () => void;\n // legacy property to avoid breaking change\n mobileChatTabHeader?: MobileChatSidePaneTabHeaderProps;\n}\n\n/** @private */\nexport const CallCompositeInner = (props: CallCompositeProps & InternalCallCompositeProps): JSX.Element => {\n const {\n adapter,\n callInvitationUrl,\n onFetchAvatarPersonaData,\n onFetchParticipantMenuItems,\n options,\n formFactor = 'desktop'\n } = props;\n const mobileView = formFactor === 'mobile';\n const modalLayerHostId = useId('modalLayerhost');\n const mainScreenContainerClassName = useMemo(() => {\n return mobileView ? mainScreenContainerStyleMobile : mainScreenContainerStyleDesktop;\n }, [mobileView]);\n return <div className={mainScreenContainerClassName}>\n <BaseProvider {...props}>\n <CallAdapterProvider adapter={adapter}>\n <MainScreen callInvitationUrl={callInvitationUrl} onFetchAvatarPersonaData={onFetchAvatarPersonaData} onFetchParticipantMenuItems={onFetchParticipantMenuItems} mobileView={mobileView} modalLayerHostId={modalLayerHostId} options={options} onSidePaneIdChange={props.onSidePaneIdChange} overrideSidePane={props.overrideSidePane} mobileChatTabHeader={props.mobileChatTabHeader} onCloseChatPane={props.onCloseChatPane} />\n {\n // This layer host is for ModalLocalAndRemotePIP in SidePane. This LayerHost cannot be inside the SidePane\n // because when the SidePane is hidden, ie. style property display is 'none', it takes up no space. This causes problems when dragging\n // the Modal because the draggable bounds thinks it has no space and will always return to its initial position after dragging.\n // Additionally, this layer host cannot be in the Call Arrangement as it needs to be rendered before useMinMaxDragPosition() in\n // common/utils useRef is called.\n // Warning: this is fragile and works because the call arrangement page is only rendered after the call has connected and thus this\n // LayerHost will be guaranteed to have rendered (and subsequently mounted in the DOM). This ensures the DOM element will be available\n // before the call to `document.getElementById(modalLayerHostId)` is made.\n <LayerHost id={modalLayerHostId} className={mergeStyles(modalLayerHostStyle)} />}\n </CallAdapterProvider>\n </BaseProvider>\n </div>;\n};\nconst getQueryOptions = (options: {\n /* @conditional-compile-remove(rooms) */role?: ParticipantRole;\n}): PermissionConstraints => {\n /* @conditional-compile-remove(rooms) */\n if (options.role === 'Consumer') {\n return {\n video: false,\n audio: true\n };\n }\n return {\n video: true,\n audio: true\n };\n};"]}
|
package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.d.ts
CHANGED
@@ -20,6 +20,14 @@ export interface ConfigurationPageProps {
|
|
20
20
|
}) => void;
|
21
21
|
onNetworkingTroubleShootingClick?: () => void;
|
22
22
|
capabilitiesChangedNotificationBarProps?: CapabilitiesChangeNotificationBarProps;
|
23
|
+
logo?: {
|
24
|
+
url: string;
|
25
|
+
alt?: string;
|
26
|
+
shape?: 'unset' | 'circle';
|
27
|
+
};
|
28
|
+
backgroundImage?: {
|
29
|
+
url: string;
|
30
|
+
};
|
23
31
|
}
|
24
32
|
/**
|
25
33
|
* @private
|
package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js
CHANGED
@@ -45,7 +45,7 @@ import { SvgWithWordWrapping } from '../components/SvgWithWordWrapping';
|
|
45
45
|
* @private
|
46
46
|
*/
|
47
47
|
export const ConfigurationPage = (props) => {
|
48
|
-
var _a, _b, _c;
|
48
|
+
var _a, _b, _c, _d;
|
49
49
|
const { startCallHandler, mobileView, modalLayerHostId,
|
50
50
|
/* @conditional-compile-remove(call-readiness) */ deviceChecks,
|
51
51
|
/* @conditional-compile-remove(call-readiness) */ onPermissionsTroubleshootingClick,
|
@@ -135,7 +135,10 @@ export const ConfigurationPage = (props) => {
|
|
135
135
|
hostId: modalLayerHostId
|
136
136
|
}), [modalLayerHostId]);
|
137
137
|
const filteredErrorBarProps = useMemo(() => (Object.assign(Object.assign({}, errorBarProps), { activeErrorMessages: filteredLatestErrors })), [errorBarProps, filteredLatestErrors]);
|
138
|
-
const containerStyles = useMemo(() =>
|
138
|
+
const containerStyles = useMemo(() => {
|
139
|
+
var _a;
|
140
|
+
return configurationContainerStyle(!mobileView, /* @conditional-compile-remove(custom-branding) */ (_a = props.backgroundImage) === null || _a === void 0 ? void 0 : _a.url);
|
141
|
+
}, [mobileView, /* @conditional-compile-remove(custom-branding) */ (_d = props.backgroundImage) === null || _d === void 0 ? void 0 : _d.url]);
|
139
142
|
return React.createElement(Stack, { styles: containerStyles },
|
140
143
|
React.createElement(Stack, { styles: bannerNotificationStyles },
|
141
144
|
React.createElement(ConfigurationPageErrorBar
|
@@ -157,9 +160,11 @@ export const ConfigurationPage = (props) => {
|
|
157
160
|
/* @conditional-compile-remove(call-readiness) */ modalLayerHostId: modalLayerHostId, mobileView: mobileView, checkPermissionModalShowing: forceShowingCheckPermissions, permissionsState: permissionsState, isPermissionsModalDismissed: isPermissionsModalDismissed,
|
158
161
|
/* @conditional-compile-remove(unsupported-browser) */ environmentInfo: environmentInfo, setIsPermissionsModalDismissed: setIsPermissionsModalDismissed, onPermissionsTroubleshootingClick: onPermissionsTroubleshootingClick }),
|
159
162
|
React.createElement(Stack, { verticalFill: true, grow: true, horizontal: true, className: fillWidth },
|
160
|
-
React.createElement(Stack, { className: configurationCenteredContent(mobileWithPreview), verticalAlign: "center", verticalFill: mobileWithPreview, tokens: mobileWithPreview ? configurationStackTokensMobile : configurationStackTokensDesktop },
|
163
|
+
React.createElement(Stack, { className: configurationCenteredContent(mobileWithPreview, /* @conditional-compile-remove(custom-branding) */ !!props.logo), verticalAlign: "center", verticalFill: mobileWithPreview, tokens: mobileWithPreview ? configurationStackTokensMobile : configurationStackTokensDesktop },
|
161
164
|
React.createElement(Stack.Item, { styles: callDetailsContainerStyles },
|
162
|
-
React.createElement(Logo
|
165
|
+
React.createElement(Logo
|
166
|
+
/* @conditional-compile-remove(custom-branding) */ , {
|
167
|
+
/* @conditional-compile-remove(custom-branding) */ logo: props.logo }),
|
163
168
|
title,
|
164
169
|
callDescription),
|
165
170
|
React.createElement(Stack, { horizontal: !mobileWithPreview, horizontalAlign: mobileWithPreview ? 'stretch' : 'center', verticalFill: mobileWithPreview, tokens: deviceConfigurationStackTokens },
|
package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ConfigurationPage.js","sourceRoot":"","sources":["../../../../../../../preprocess-dist/react-composites/src/composites/CallComposite/pages/ConfigurationPage.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAElC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACpD,iDAAiD;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,wBAAwB,EAAE,MAAM,uCAAuC,CAAC;AACjF,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EA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AC,IAAI,CAAC,KAAK,CAAC,EAAE,GAAG,EAAE,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,CAAC,IAAI,CAAC,GAAG,GAAI,CAAC;AACnG,CAAC,CAAC;AACF,MAAM,oCAAoC,GAAG,CAAC,eAAiC,EAAuB,EAAE;IACtG,sDAAsD;IACtD,OAAO,eAAe,IAAI,CAAA,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAE,WAAW,CAAC,OAAO,CAAC,WAAW,EAAE,MAAK,QAAQ,CAAC;IAC1F,OAAO,KAAK,CAAC;AACf,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React, { useCallback, useMemo } from 'react';\n/* @conditional-compile-remove(call-readiness) */\nimport { useState } from 'react';\nimport { useAdaptedSelector } from '../hooks/useAdaptedSelector';\nimport { useHandlers } from '../hooks/useHandlers';\nimport { LocalDeviceSettings } from '../components/LocalDeviceSettings';\nimport { StartCallButton } from '../components/StartCallButton';\nimport { devicePermissionSelector } from '../selectors/devicePermissionSelector';\nimport { useSelector } from '../hooks/useSelector';\nimport { ActiveErrorMessage, DevicesButton, ErrorBar, useTheme } from '@internal/react-components';\nimport { getCallingSelector } from '@internal/calling-component-bindings';\nimport { Image, Panel, PanelType, Stack } from '@fluentui/react';\nimport { callDetailsContainerStyles, configurationCenteredContent, configurationSectionStyle, deviceConfigurationStackTokens, fillWidth, logoStyles, panelFocusProps, panelStyles, startCallButtonStyleDesktop } from '../styles/CallConfiguration.styles';\nimport { LocalPreview } from '../components/LocalPreview';\nimport { callDetailsStyleDesktop, callDetailsStyleMobile, configurationStackTokensDesktop, configurationStackTokensMobile, configurationContainerStyle, selectionContainerStyle, startCallButtonContainerStyleDesktop, startCallButtonContainerStyleMobile, startCallButtonStyleMobile, titleContainerStyleDesktop, titleContainerStyleMobile } from '../styles/CallConfiguration.styles';\nimport { useLocale } from '../../localization';\nimport { bannerNotificationStyles } from '../styles/CallPage.styles';\nimport { usePropsFor } from '../hooks/usePropsFor';\nimport { useAdapter } from '../adapter/CallAdapterProvider';\n/* @conditional-compile-remove(call-readiness) */\nimport { DeviceCheckOptions } from '../CallComposite';\nimport { ConfigurationPageErrorBar } from '../components/ConfigurationPageErrorBar';\n/* @conditional-compile-remove(call-readiness) */\nimport { getDevicePermissionState } from '../utils';\n/* @conditional-compile-remove(call-readiness) */\nimport { CallReadinessModal, CallReadinessModalFallBack } from '../components/CallReadinessModal';\n/* @conditional-compile-remove(video-background-effects) */\nimport { VIDEO_EFFECTS_SIDE_PANE_WIDTH_REM, useVideoEffectsPane } from '../components/SidePane/useVideoEffectsPane';\nimport { SidePane } from '../components/SidePane/SidePane';\nimport { SidePaneRenderer } from '../components/SidePane/SidePaneProvider';\n/* @conditional-compile-remove(video-background-effects) */\nimport { useIsParticularSidePaneOpen } from '../components/SidePane/SidePaneProvider';\n/* @conditional-compile-remove(video-background-effects) */\nimport { localVideoSelector } from '../../CallComposite/selectors/localVideoStreamSelector';\n/* @conditional-compile-remove(capabilities) */\nimport { CapabilitiesChangeNotificationBarProps } from '../components/CapabilitiesChangedNotificationBar';\nimport { SvgWithWordWrapping } from '../components/SvgWithWordWrapping';\nimport { EnvironmentInfo } from '@azure/communication-calling';\n\n/**\n * @private\n */\nexport interface ConfigurationPageProps {\n mobileView: boolean;\n startCallHandler(): void;\n updateSidePaneRenderer: (renderer: SidePaneRenderer | undefined) => void;\n latestErrors: ActiveErrorMessage[];\n onDismissError: (error: ActiveErrorMessage) => void;\n modalLayerHostId: string;\n /* @conditional-compile-remove(call-readiness) */\n deviceChecks?: DeviceCheckOptions;\n /* @conditional-compile-remove(call-readiness) */\n onPermissionsTroubleshootingClick?: (permissionsState: {\n camera: PermissionState;\n microphone: PermissionState;\n }) => void;\n /* @conditional-compile-remove(call-readiness) */\n onNetworkingTroubleShootingClick?: () => void;\n /* @conditional-compile-remove(capabilities) */\n capabilitiesChangedNotificationBarProps?: CapabilitiesChangeNotificationBarProps;\n}\n\n/**\n * @private\n */\nexport const ConfigurationPage = (props: ConfigurationPageProps): JSX.Element => {\n const {\n startCallHandler,\n mobileView,\n modalLayerHostId,\n /* @conditional-compile-remove(call-readiness) */deviceChecks,\n /* @conditional-compile-remove(call-readiness) */onPermissionsTroubleshootingClick,\n /* @conditional-compile-remove(call-readiness) */onNetworkingTroubleShootingClick\n } = props;\n const theme = useTheme();\n const options = useAdaptedSelector(getCallingSelector(DevicesButton));\n const localDeviceSettingsHandlers = useHandlers(LocalDeviceSettings);\n const {\n video: cameraPermissionGranted,\n audio: microphonePermissionGranted\n } = useSelector(devicePermissionSelector);\n /* @conditional-compile-remove(call-readiness) */\n // use permission API to get video and audio permission state\n const [videoState, setVideoState] = useState<PermissionState | 'unsupported' | undefined>(undefined);\n /* @conditional-compile-remove(call-readiness) */\n const [audioState, setAudioState] = useState<PermissionState | 'unsupported' | undefined>(undefined);\n /* @conditional-compile-remove(call-readiness) */\n getDevicePermissionState(setVideoState, setAudioState);\n const errorBarProps = usePropsFor(ErrorBar);\n const adapter = useAdapter();\n const deviceState = adapter.getState().devices;\n /* @conditional-compile-remove(unsupported-browser) */\n const environmentInfo = adapter.getState().environmentInfo;\n let disableStartCallButton = !microphonePermissionGranted || deviceState.microphones?.length === 0;\n /* @conditional-compile-remove(rooms) */\n const role = adapter.getState().call?.role;\n\n /* @conditional-compile-remove(video-background-effects) */\n const isCameraOn = useSelector(localVideoSelector).isAvailable;\n let filteredLatestErrors: ActiveErrorMessage[] = props.latestErrors;\n\n /* @conditional-compile-remove(rooms) */\n // TODO: move this logic to the error bar selector once role is plumbed from the headless SDK\n if (role !== 'Consumer') {\n filteredLatestErrors = filteredLatestErrors.filter(e => e.type !== 'callCameraAccessDenied' && e.type !== 'callCameraAccessDeniedSafari');\n }\n\n /* @conditional-compile-remove(video-background-effects) */\n if ((useIsParticularSidePaneOpen('videoeffects') || !isCameraOn) && errorBarProps) {\n filteredLatestErrors = filteredLatestErrors.filter(e => e.type !== 'unableToStartVideoEffect');\n }\n\n /* @conditional-compile-remove(rooms) */\n if (role === 'Consumer') {\n // If user's role permissions do not allow access to the microphone button then DO NOT disable the start call button\n // because microphone device permission is not needed for the user's role\n disableStartCallButton = false;\n }\n\n /* @conditional-compile-remove(call-readiness) */\n // Overrides role permissions if CallCompositeOptions deviceChecks are set\n if (deviceChecks) {\n if (['doNotPrompt', 'optional'].includes(deviceChecks.camera) && ['doNotPrompt', 'optional'].includes(deviceChecks.microphone)) {\n disableStartCallButton = false;\n } else if (deviceChecks.camera === 'required') {\n disableStartCallButton = !cameraPermissionGranted || deviceState.cameras?.length === 0;\n }\n }\n const locale = useLocale();\n const title = locale.strings.call.configurationPageTitle.length > 0 ? <Stack.Item className={mobileView ? titleContainerStyleMobile(theme) : titleContainerStyleDesktop(theme)}>\n <SvgWithWordWrapping width={mobileView ? 325 : 445} lineHeightPx={16 * 1.5} bufferHeightPx={16} text={locale.strings.call.configurationPageTitle} />\n </Stack.Item> : <></>;\n const callDescription = locale.strings.call.configurationPageCallDetails && <Stack.Item className={mobileView ? callDetailsStyleMobile(theme) : callDetailsStyleDesktop(theme)}>\n {locale.strings.call.configurationPageCallDetails}\n </Stack.Item>;\n let mobileWithPreview = mobileView;\n /* @conditional-compile-remove(rooms) */\n mobileWithPreview = mobileWithPreview && role !== 'Consumer';\n\n /* @conditional-compile-remove(call-readiness) */\n const permissionsState: {\n camera: PermissionState;\n microphone: PermissionState;\n } = {\n // fall back to using cameraPermissionGranted and microphonePermissionGranted if permission API is not supported\n camera: videoState && videoState !== 'unsupported' ? cameraPermissionGranted !== false ? videoState : 'denied' : cameraPermissionGranted !== false ? cameraPermissionGranted ? 'granted' : 'prompt' : 'denied',\n microphone: audioState && audioState !== 'unsupported' ? microphonePermissionGranted !== false ? audioState : 'denied' : microphonePermissionGranted !== false ? microphonePermissionGranted ? 'granted' : 'prompt' : 'denied'\n };\n /* @conditional-compile-remove(call-readiness) */\n const networkErrors = errorBarProps.activeErrorMessages.filter(message => message.type === 'callNetworkQualityLow');\n\n /* @conditional-compile-remove(call-readiness) */\n const [isPermissionsModalDismissed, setIsPermissionsModalDismissed] = useState(true);\n\n // When permission API is not available, we want to show screen saying checking for access (disappears on its own)\n // then based on permission setting, we show permission denied or nothing\n /* @conditional-compile-remove(call-readiness) */\n const [minimumFallbackTimerElapsed, setMinimumFallbackTimerElapsed] = useState(false);\n /* @conditional-compile-remove(call-readiness) */\n setTimeout(() => {\n setMinimumFallbackTimerElapsed(true);\n }, 2000);\n /* @conditional-compile-remove(call-readiness) */\n const forceShowingCheckPermissions = !minimumFallbackTimerElapsed;\n\n /* @conditional-compile-remove(video-background-effects) */\n const {\n toggleVideoEffectsPane,\n closeVideoEffectsPane,\n isVideoEffectsPaneOpen\n } = useVideoEffectsPane(props.updateSidePaneRenderer, mobileView, props.latestErrors, props.onDismissError);\n const startCall = useCallback(async () => {\n /* @conditional-compile-remove(video-background-effects) */\n closeVideoEffectsPane();\n startCallHandler();\n }, [startCallHandler, /* @conditional-compile-remove(video-background-effects) */closeVideoEffectsPane]);\n const panelLayerProps = useMemo(() => ({\n hostId: modalLayerHostId\n }), [modalLayerHostId]);\n const filteredErrorBarProps = useMemo(() => ({\n ...errorBarProps,\n activeErrorMessages: filteredLatestErrors\n }), [errorBarProps, filteredLatestErrors]);\n const containerStyles = useMemo(() => configurationContainerStyle(!mobileView), [mobileView]);\n return <Stack styles={containerStyles}>\n <Stack styles={bannerNotificationStyles}>\n <ConfigurationPageErrorBar\n /* @conditional-compile-remove(call-readiness) */\n // show trouble shooting error bar when encountering network error/ permission error\n showTroubleShootingErrorBar={!cameraPermissionGranted || !microphonePermissionGranted || networkErrors.length > 0}\n /* @conditional-compile-remove(call-readiness) */ permissionsState={permissionsState}\n /* @conditional-compile-remove(call-readiness) */ onNetworkingTroubleShootingClick={onNetworkingTroubleShootingClick}\n /* @conditional-compile-remove(call-readiness) */ onPermissionsTroubleshootingClick={onPermissionsTroubleshootingClick} errorBarProps={filteredErrorBarProps} onDismissError={props.onDismissError} />\n </Stack>\n {/* @conditional-compile-remove(call-readiness) */\n // show the following screen if permission API is availible (not unsupported) and videoState, audioState is assigned values\n videoState && videoState !== 'unsupported' && audioState && audioState !== 'unsupported' && <CallReadinessModal modalLayerHostId={modalLayerHostId} mobileView={mobileView}\n /* @conditional-compile-remove(unsupported-browser) */ environmentInfo={environmentInfo} permissionsState={permissionsState} isPermissionsModalDismissed={isPermissionsModalDismissed} setIsPermissionsModalDismissed={setIsPermissionsModalDismissed} onPermissionsTroubleshootingClick={onPermissionsTroubleshootingClick} />}\n\n {/* @conditional-compile-remove(call-readiness) */\n // show the following screen if permission API is not availible (unsupported) and videoState, audioState is assigned values\n videoState && audioState && (videoState === 'unsupported' || audioState === 'unsupported') && <CallReadinessModalFallBack\n /* @conditional-compile-remove(call-readiness) */ modalLayerHostId={modalLayerHostId} mobileView={mobileView} checkPermissionModalShowing={forceShowingCheckPermissions} permissionsState={permissionsState} isPermissionsModalDismissed={isPermissionsModalDismissed}\n /* @conditional-compile-remove(unsupported-browser) */ environmentInfo={environmentInfo} setIsPermissionsModalDismissed={setIsPermissionsModalDismissed} onPermissionsTroubleshootingClick={onPermissionsTroubleshootingClick} />}\n\n <Stack verticalFill grow horizontal className={fillWidth}>\n <Stack className={configurationCenteredContent(mobileWithPreview)} verticalAlign=\"center\" verticalFill={mobileWithPreview} tokens={mobileWithPreview ? configurationStackTokensMobile : configurationStackTokensDesktop}>\n <Stack.Item styles={callDetailsContainerStyles}>\n <Logo />\n {title}\n {callDescription}\n </Stack.Item>\n <Stack horizontal={!mobileWithPreview} horizontalAlign={mobileWithPreview ? 'stretch' : 'center'} verticalFill={mobileWithPreview} tokens={deviceConfigurationStackTokens}>\n {localPreviewTrampoline(mobileWithPreview, /* @conditional-compile-remove(rooms) */!!(role === 'Consumer'))}\n <Stack styles={mobileView ? undefined : configurationSectionStyle}>\n {!mobileWithPreview && <Stack className={mobileView ? undefined : selectionContainerStyle(theme, isSafariBrowserEnvironmentTrampoline( /* @conditional-compile-remove(unsupported-browser) */environmentInfo))}>\n <LocalDeviceSettings {...options} {...localDeviceSettingsHandlers} cameraPermissionGranted={cameraPermissionGrantedTrampoline(cameraPermissionGranted, /* @conditional-compile-remove(call-readiness) */videoState)} microphonePermissionGranted={micPermissionGrantedTrampoline(microphonePermissionGranted, /* @conditional-compile-remove(call-readiness) */audioState)}\n /* @conditional-compile-remove(call-readiness) */ onClickEnableDevicePermission={() => {\n setIsPermissionsModalDismissed(true);\n }}\n /* @conditional-compile-remove(video-background-effects) */ onClickVideoEffects={toggleVideoEffectsPane} />\n </Stack>}\n <Stack styles={mobileWithPreview ? startCallButtonContainerStyleMobile : startCallButtonContainerStyleDesktop} horizontalAlign={mobileWithPreview ? 'stretch' : 'end'}>\n <StartCallButton className={mobileWithPreview ? startCallButtonStyleMobile : startCallButtonStyleDesktop} onClick={startCall} disabled={disableStartCallButton} hideIcon={true} />\n </Stack>\n </Stack>\n </Stack>\n </Stack>\n <Panel\n /* @conditional-compile-remove(video-background-effects) */ isOpen={isVideoEffectsPaneOpen} hasCloseButton={false} isBlocking={false} isHiddenOnDismiss={false} styles={panelStyles} focusTrapZoneProps={panelFocusProps} layerProps={panelLayerProps} type={PanelType.custom}\n /* @conditional-compile-remove(video-background-effects) */ customWidth={`${VIDEO_EFFECTS_SIDE_PANE_WIDTH_REM}rem`}>\n <SidePane mobileView={props.mobileView} updateSidePaneRenderer={props.updateSidePaneRenderer} maxWidth={`${VIDEO_EFFECTS_SIDE_PANE_WIDTH_REM}rem`} minWidth={`${VIDEO_EFFECTS_SIDE_PANE_WIDTH_REM}rem`} />\n </Panel>\n </Stack>\n </Stack>;\n};\nconst localPreviewTrampoline = (mobileView: boolean, doNotShow?: boolean): JSX.Element | undefined => {\n /* @conditional-compile-remove(rooms) */\n if (doNotShow) {\n return undefined;\n }\n return <LocalPreview mobileView={mobileView} showDevicesButton={mobileView} />;\n};\nconst cameraPermissionGrantedTrampoline = (cameraPermissionGranted: boolean | undefined, videoState?: PermissionState | 'unsupported' | undefined): boolean | undefined => {\n /* @conditional-compile-remove(call-readiness) */\n return videoState && videoState !== 'unsupported' ? videoState === 'granted' : cameraPermissionGranted;\n return cameraPermissionGranted;\n};\nconst micPermissionGrantedTrampoline = (microphonePermissionGranted: boolean | undefined, audioState?: PermissionState | 'unsupported' | undefined): boolean | undefined => {\n /* @conditional-compile-remove(call-readiness) */\n return audioState && audioState !== 'unsupported' ? audioState === 'granted' : microphonePermissionGranted;\n return microphonePermissionGranted;\n};\nconst Logo = (props: {\n logo?: {\n url: string;\n alt?: string;\n shape?: 'unset' | 'circle';\n };\n}): JSX.Element => {\n if (!props.logo) {\n return <></>;\n }\n return <Image styles={logoStyles(props.logo.shape)} src={props.logo.url} alt={props.logo.alt} />;\n};\nconst isSafariBrowserEnvironmentTrampoline = (environmentInfo?: EnvironmentInfo): boolean | undefined => {\n /* @conditional-compile-remove(unsupported-browser) */\n return environmentInfo && environmentInfo?.environment.browser.toLowerCase() === 'safari';\n return false;\n};"]}
|
1
|
+
{"version":3,"file":"ConfigurationPage.js","sourceRoot":"","sources":["../../../../../../../preprocess-dist/react-composites/src/composites/CallComposite/pages/ConfigurationPage.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAElC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACpD,iDAAiD;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,wBAAwB,EAAE,MAAM,uCAAuC,CAAC;AACjF,OAAO,EAAE,WAAW,EAAE,MAAM,sBA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,SAAS,CAAC,CAAC,CAAC,2BAA2B,CAAC;IAC3G,OAAO,2BAA2B,CAAC;AACrC,CAAC,CAAC;AACF,MAAM,IAAI,GAAG,CAAC,KAMb,EAAe,EAAE;IAChB,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;QAChB,OAAO,yCAAK,CAAC;IACf,CAAC;IACD,OAAO,oBAAC,KAAK,IAAC,MAAM,EAAE,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,GAAG,EAAE,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,CAAC,IAAI,CAAC,GAAG,GAAI,CAAC;AACnG,CAAC,CAAC;AACF,MAAM,oCAAoC,GAAG,CAAC,eAAiC,EAAuB,EAAE;IACtG,sDAAsD;IACtD,OAAO,eAAe,IAAI,CAAA,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAE,WAAW,CAAC,OAAO,CAAC,WAAW,EAAE,MAAK,QAAQ,CAAC;IAC1F,OAAO,KAAK,CAAC;AACf,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React, { useCallback, useMemo } from 'react';\n/* @conditional-compile-remove(call-readiness) */\nimport { useState } from 'react';\nimport { useAdaptedSelector } from '../hooks/useAdaptedSelector';\nimport { useHandlers } from '../hooks/useHandlers';\nimport { LocalDeviceSettings } from '../components/LocalDeviceSettings';\nimport { StartCallButton } from '../components/StartCallButton';\nimport { devicePermissionSelector } from '../selectors/devicePermissionSelector';\nimport { useSelector } from '../hooks/useSelector';\nimport { ActiveErrorMessage, DevicesButton, ErrorBar, useTheme } from '@internal/react-components';\nimport { getCallingSelector } from '@internal/calling-component-bindings';\nimport { Image, Panel, PanelType, Stack } from '@fluentui/react';\nimport { callDetailsContainerStyles, configurationCenteredContent, configurationSectionStyle, deviceConfigurationStackTokens, fillWidth, logoStyles, panelFocusProps, panelStyles, startCallButtonStyleDesktop } from '../styles/CallConfiguration.styles';\nimport { LocalPreview } from '../components/LocalPreview';\nimport { callDetailsStyleDesktop, callDetailsStyleMobile, configurationStackTokensDesktop, configurationStackTokensMobile, configurationContainerStyle, selectionContainerStyle, startCallButtonContainerStyleDesktop, startCallButtonContainerStyleMobile, startCallButtonStyleMobile, titleContainerStyleDesktop, titleContainerStyleMobile } from '../styles/CallConfiguration.styles';\nimport { useLocale } from '../../localization';\nimport { bannerNotificationStyles } from '../styles/CallPage.styles';\nimport { usePropsFor } from '../hooks/usePropsFor';\nimport { useAdapter } from '../adapter/CallAdapterProvider';\n/* @conditional-compile-remove(call-readiness) */\nimport { DeviceCheckOptions } from '../CallComposite';\nimport { ConfigurationPageErrorBar } from '../components/ConfigurationPageErrorBar';\n/* @conditional-compile-remove(call-readiness) */\nimport { getDevicePermissionState } from '../utils';\n/* @conditional-compile-remove(call-readiness) */\nimport { CallReadinessModal, CallReadinessModalFallBack } from '../components/CallReadinessModal';\n/* @conditional-compile-remove(video-background-effects) */\nimport { VIDEO_EFFECTS_SIDE_PANE_WIDTH_REM, useVideoEffectsPane } from '../components/SidePane/useVideoEffectsPane';\nimport { SidePane } from '../components/SidePane/SidePane';\nimport { SidePaneRenderer } from '../components/SidePane/SidePaneProvider';\n/* @conditional-compile-remove(video-background-effects) */\nimport { useIsParticularSidePaneOpen } from '../components/SidePane/SidePaneProvider';\n/* @conditional-compile-remove(video-background-effects) */\nimport { localVideoSelector } from '../../CallComposite/selectors/localVideoStreamSelector';\n/* @conditional-compile-remove(capabilities) */\nimport { CapabilitiesChangeNotificationBarProps } from '../components/CapabilitiesChangedNotificationBar';\nimport { SvgWithWordWrapping } from '../components/SvgWithWordWrapping';\nimport { EnvironmentInfo } from '@azure/communication-calling';\n\n/**\n * @private\n */\nexport interface ConfigurationPageProps {\n mobileView: boolean;\n startCallHandler(): void;\n updateSidePaneRenderer: (renderer: SidePaneRenderer | undefined) => void;\n latestErrors: ActiveErrorMessage[];\n onDismissError: (error: ActiveErrorMessage) => void;\n modalLayerHostId: string;\n /* @conditional-compile-remove(call-readiness) */\n deviceChecks?: DeviceCheckOptions;\n /* @conditional-compile-remove(call-readiness) */\n onPermissionsTroubleshootingClick?: (permissionsState: {\n camera: PermissionState;\n microphone: PermissionState;\n }) => void;\n /* @conditional-compile-remove(call-readiness) */\n onNetworkingTroubleShootingClick?: () => void;\n /* @conditional-compile-remove(capabilities) */\n capabilitiesChangedNotificationBarProps?: CapabilitiesChangeNotificationBarProps;\n /* @conditional-compile-remove(custom-branding) */\n logo?: {\n url: string;\n alt?: string;\n shape?: 'unset' | 'circle';\n };\n /* @conditional-compile-remove(custom-branding) */\n backgroundImage?: {\n url: string;\n };\n}\n\n/**\n * @private\n */\nexport const ConfigurationPage = (props: ConfigurationPageProps): JSX.Element => {\n const {\n startCallHandler,\n mobileView,\n modalLayerHostId,\n /* @conditional-compile-remove(call-readiness) */deviceChecks,\n /* @conditional-compile-remove(call-readiness) */onPermissionsTroubleshootingClick,\n /* @conditional-compile-remove(call-readiness) */onNetworkingTroubleShootingClick\n } = props;\n const theme = useTheme();\n const options = useAdaptedSelector(getCallingSelector(DevicesButton));\n const localDeviceSettingsHandlers = useHandlers(LocalDeviceSettings);\n const {\n video: cameraPermissionGranted,\n audio: microphonePermissionGranted\n } = useSelector(devicePermissionSelector);\n /* @conditional-compile-remove(call-readiness) */\n // use permission API to get video and audio permission state\n const [videoState, setVideoState] = useState<PermissionState | 'unsupported' | undefined>(undefined);\n /* @conditional-compile-remove(call-readiness) */\n const [audioState, setAudioState] = useState<PermissionState | 'unsupported' | undefined>(undefined);\n /* @conditional-compile-remove(call-readiness) */\n getDevicePermissionState(setVideoState, setAudioState);\n const errorBarProps = usePropsFor(ErrorBar);\n const adapter = useAdapter();\n const deviceState = adapter.getState().devices;\n /* @conditional-compile-remove(unsupported-browser) */\n const environmentInfo = adapter.getState().environmentInfo;\n let disableStartCallButton = !microphonePermissionGranted || deviceState.microphones?.length === 0;\n /* @conditional-compile-remove(rooms) */\n const role = adapter.getState().call?.role;\n\n /* @conditional-compile-remove(video-background-effects) */\n const isCameraOn = useSelector(localVideoSelector).isAvailable;\n let filteredLatestErrors: ActiveErrorMessage[] = props.latestErrors;\n\n /* @conditional-compile-remove(rooms) */\n // TODO: move this logic to the error bar selector once role is plumbed from the headless SDK\n if (role !== 'Consumer') {\n filteredLatestErrors = filteredLatestErrors.filter(e => e.type !== 'callCameraAccessDenied' && e.type !== 'callCameraAccessDeniedSafari');\n }\n\n /* @conditional-compile-remove(video-background-effects) */\n if ((useIsParticularSidePaneOpen('videoeffects') || !isCameraOn) && errorBarProps) {\n filteredLatestErrors = filteredLatestErrors.filter(e => e.type !== 'unableToStartVideoEffect');\n }\n\n /* @conditional-compile-remove(rooms) */\n if (role === 'Consumer') {\n // If user's role permissions do not allow access to the microphone button then DO NOT disable the start call button\n // because microphone device permission is not needed for the user's role\n disableStartCallButton = false;\n }\n\n /* @conditional-compile-remove(call-readiness) */\n // Overrides role permissions if CallCompositeOptions deviceChecks are set\n if (deviceChecks) {\n if (['doNotPrompt', 'optional'].includes(deviceChecks.camera) && ['doNotPrompt', 'optional'].includes(deviceChecks.microphone)) {\n disableStartCallButton = false;\n } else if (deviceChecks.camera === 'required') {\n disableStartCallButton = !cameraPermissionGranted || deviceState.cameras?.length === 0;\n }\n }\n const locale = useLocale();\n const title = locale.strings.call.configurationPageTitle.length > 0 ? <Stack.Item className={mobileView ? titleContainerStyleMobile(theme) : titleContainerStyleDesktop(theme)}>\n <SvgWithWordWrapping width={mobileView ? 325 : 445} lineHeightPx={16 * 1.5} bufferHeightPx={16} text={locale.strings.call.configurationPageTitle} />\n </Stack.Item> : <></>;\n const callDescription = locale.strings.call.configurationPageCallDetails && <Stack.Item className={mobileView ? callDetailsStyleMobile(theme) : callDetailsStyleDesktop(theme)}>\n {locale.strings.call.configurationPageCallDetails}\n </Stack.Item>;\n let mobileWithPreview = mobileView;\n /* @conditional-compile-remove(rooms) */\n mobileWithPreview = mobileWithPreview && role !== 'Consumer';\n\n /* @conditional-compile-remove(call-readiness) */\n const permissionsState: {\n camera: PermissionState;\n microphone: PermissionState;\n } = {\n // fall back to using cameraPermissionGranted and microphonePermissionGranted if permission API is not supported\n camera: videoState && videoState !== 'unsupported' ? cameraPermissionGranted !== false ? videoState : 'denied' : cameraPermissionGranted !== false ? cameraPermissionGranted ? 'granted' : 'prompt' : 'denied',\n microphone: audioState && audioState !== 'unsupported' ? microphonePermissionGranted !== false ? audioState : 'denied' : microphonePermissionGranted !== false ? microphonePermissionGranted ? 'granted' : 'prompt' : 'denied'\n };\n /* @conditional-compile-remove(call-readiness) */\n const networkErrors = errorBarProps.activeErrorMessages.filter(message => message.type === 'callNetworkQualityLow');\n\n /* @conditional-compile-remove(call-readiness) */\n const [isPermissionsModalDismissed, setIsPermissionsModalDismissed] = useState(true);\n\n // When permission API is not available, we want to show screen saying checking for access (disappears on its own)\n // then based on permission setting, we show permission denied or nothing\n /* @conditional-compile-remove(call-readiness) */\n const [minimumFallbackTimerElapsed, setMinimumFallbackTimerElapsed] = useState(false);\n /* @conditional-compile-remove(call-readiness) */\n setTimeout(() => {\n setMinimumFallbackTimerElapsed(true);\n }, 2000);\n /* @conditional-compile-remove(call-readiness) */\n const forceShowingCheckPermissions = !minimumFallbackTimerElapsed;\n\n /* @conditional-compile-remove(video-background-effects) */\n const {\n toggleVideoEffectsPane,\n closeVideoEffectsPane,\n isVideoEffectsPaneOpen\n } = useVideoEffectsPane(props.updateSidePaneRenderer, mobileView, props.latestErrors, props.onDismissError);\n const startCall = useCallback(async () => {\n /* @conditional-compile-remove(video-background-effects) */\n closeVideoEffectsPane();\n startCallHandler();\n }, [startCallHandler, /* @conditional-compile-remove(video-background-effects) */closeVideoEffectsPane]);\n const panelLayerProps = useMemo(() => ({\n hostId: modalLayerHostId\n }), [modalLayerHostId]);\n const filteredErrorBarProps = useMemo(() => ({\n ...errorBarProps,\n activeErrorMessages: filteredLatestErrors\n }), [errorBarProps, filteredLatestErrors]);\n const containerStyles = useMemo(() => configurationContainerStyle(!mobileView, /* @conditional-compile-remove(custom-branding) */\n props.backgroundImage?.url), [mobileView, /* @conditional-compile-remove(custom-branding) */props.backgroundImage?.url]);\n return <Stack styles={containerStyles}>\n <Stack styles={bannerNotificationStyles}>\n <ConfigurationPageErrorBar\n /* @conditional-compile-remove(call-readiness) */\n // show trouble shooting error bar when encountering network error/ permission error\n showTroubleShootingErrorBar={!cameraPermissionGranted || !microphonePermissionGranted || networkErrors.length > 0}\n /* @conditional-compile-remove(call-readiness) */ permissionsState={permissionsState}\n /* @conditional-compile-remove(call-readiness) */ onNetworkingTroubleShootingClick={onNetworkingTroubleShootingClick}\n /* @conditional-compile-remove(call-readiness) */ onPermissionsTroubleshootingClick={onPermissionsTroubleshootingClick} errorBarProps={filteredErrorBarProps} onDismissError={props.onDismissError} />\n </Stack>\n {/* @conditional-compile-remove(call-readiness) */\n // show the following screen if permission API is availible (not unsupported) and videoState, audioState is assigned values\n videoState && videoState !== 'unsupported' && audioState && audioState !== 'unsupported' && <CallReadinessModal modalLayerHostId={modalLayerHostId} mobileView={mobileView}\n /* @conditional-compile-remove(unsupported-browser) */ environmentInfo={environmentInfo} permissionsState={permissionsState} isPermissionsModalDismissed={isPermissionsModalDismissed} setIsPermissionsModalDismissed={setIsPermissionsModalDismissed} onPermissionsTroubleshootingClick={onPermissionsTroubleshootingClick} />}\n\n {/* @conditional-compile-remove(call-readiness) */\n // show the following screen if permission API is not availible (unsupported) and videoState, audioState is assigned values\n videoState && audioState && (videoState === 'unsupported' || audioState === 'unsupported') && <CallReadinessModalFallBack\n /* @conditional-compile-remove(call-readiness) */ modalLayerHostId={modalLayerHostId} mobileView={mobileView} checkPermissionModalShowing={forceShowingCheckPermissions} permissionsState={permissionsState} isPermissionsModalDismissed={isPermissionsModalDismissed}\n /* @conditional-compile-remove(unsupported-browser) */ environmentInfo={environmentInfo} setIsPermissionsModalDismissed={setIsPermissionsModalDismissed} onPermissionsTroubleshootingClick={onPermissionsTroubleshootingClick} />}\n\n <Stack verticalFill grow horizontal className={fillWidth}>\n <Stack className={configurationCenteredContent(mobileWithPreview, /* @conditional-compile-remove(custom-branding) */\n !!props.logo)} verticalAlign=\"center\" verticalFill={mobileWithPreview} tokens={mobileWithPreview ? configurationStackTokensMobile : configurationStackTokensDesktop}>\n <Stack.Item styles={callDetailsContainerStyles}>\n <Logo\n /* @conditional-compile-remove(custom-branding) */ logo={props.logo} />\n {title}\n {callDescription}\n </Stack.Item>\n <Stack horizontal={!mobileWithPreview} horizontalAlign={mobileWithPreview ? 'stretch' : 'center'} verticalFill={mobileWithPreview} tokens={deviceConfigurationStackTokens}>\n {localPreviewTrampoline(mobileWithPreview, /* @conditional-compile-remove(rooms) */!!(role === 'Consumer'))}\n <Stack styles={mobileView ? undefined : configurationSectionStyle}>\n {!mobileWithPreview && <Stack className={mobileView ? undefined : selectionContainerStyle(theme, isSafariBrowserEnvironmentTrampoline( /* @conditional-compile-remove(unsupported-browser) */environmentInfo))}>\n <LocalDeviceSettings {...options} {...localDeviceSettingsHandlers} cameraPermissionGranted={cameraPermissionGrantedTrampoline(cameraPermissionGranted, /* @conditional-compile-remove(call-readiness) */videoState)} microphonePermissionGranted={micPermissionGrantedTrampoline(microphonePermissionGranted, /* @conditional-compile-remove(call-readiness) */audioState)}\n /* @conditional-compile-remove(call-readiness) */ onClickEnableDevicePermission={() => {\n setIsPermissionsModalDismissed(true);\n }}\n /* @conditional-compile-remove(video-background-effects) */ onClickVideoEffects={toggleVideoEffectsPane} />\n </Stack>}\n <Stack styles={mobileWithPreview ? startCallButtonContainerStyleMobile : startCallButtonContainerStyleDesktop} horizontalAlign={mobileWithPreview ? 'stretch' : 'end'}>\n <StartCallButton className={mobileWithPreview ? startCallButtonStyleMobile : startCallButtonStyleDesktop} onClick={startCall} disabled={disableStartCallButton} hideIcon={true} />\n </Stack>\n </Stack>\n </Stack>\n </Stack>\n <Panel\n /* @conditional-compile-remove(video-background-effects) */ isOpen={isVideoEffectsPaneOpen} hasCloseButton={false} isBlocking={false} isHiddenOnDismiss={false} styles={panelStyles} focusTrapZoneProps={panelFocusProps} layerProps={panelLayerProps} type={PanelType.custom}\n /* @conditional-compile-remove(video-background-effects) */ customWidth={`${VIDEO_EFFECTS_SIDE_PANE_WIDTH_REM}rem`}>\n <SidePane mobileView={props.mobileView} updateSidePaneRenderer={props.updateSidePaneRenderer} maxWidth={`${VIDEO_EFFECTS_SIDE_PANE_WIDTH_REM}rem`} minWidth={`${VIDEO_EFFECTS_SIDE_PANE_WIDTH_REM}rem`} />\n </Panel>\n </Stack>\n </Stack>;\n};\nconst localPreviewTrampoline = (mobileView: boolean, doNotShow?: boolean): JSX.Element | undefined => {\n /* @conditional-compile-remove(rooms) */\n if (doNotShow) {\n return undefined;\n }\n return <LocalPreview mobileView={mobileView} showDevicesButton={mobileView} />;\n};\nconst cameraPermissionGrantedTrampoline = (cameraPermissionGranted: boolean | undefined, videoState?: PermissionState | 'unsupported' | undefined): boolean | undefined => {\n /* @conditional-compile-remove(call-readiness) */\n return videoState && videoState !== 'unsupported' ? videoState === 'granted' : cameraPermissionGranted;\n return cameraPermissionGranted;\n};\nconst micPermissionGrantedTrampoline = (microphonePermissionGranted: boolean | undefined, audioState?: PermissionState | 'unsupported' | undefined): boolean | undefined => {\n /* @conditional-compile-remove(call-readiness) */\n return audioState && audioState !== 'unsupported' ? audioState === 'granted' : microphonePermissionGranted;\n return microphonePermissionGranted;\n};\nconst Logo = (props: {\n logo?: {\n url: string;\n alt?: string;\n shape?: 'unset' | 'circle';\n };\n}): JSX.Element => {\n if (!props.logo) {\n return <></>;\n }\n return <Image styles={logoStyles(props.logo.shape)} src={props.logo.url} alt={props.logo.alt} />;\n};\nconst isSafariBrowserEnvironmentTrampoline = (environmentInfo?: EnvironmentInfo): boolean | undefined => {\n /* @conditional-compile-remove(unsupported-browser) */\n return environmentInfo && environmentInfo?.environment.browser.toLowerCase() === 'safari';\n return false;\n};"]}
|
@@ -137,6 +137,45 @@ export type CallWithChatCompositeOptions = {
|
|
137
137
|
*/
|
138
138
|
layout?: VideoGalleryLayout;
|
139
139
|
};
|
140
|
+
/**
|
141
|
+
* Options for setting additional customizations related to personalized branding.
|
142
|
+
*/
|
143
|
+
branding?: {
|
144
|
+
/**
|
145
|
+
* Logo displayed on the configuration page.
|
146
|
+
*/
|
147
|
+
logo?: {
|
148
|
+
/**
|
149
|
+
* URL for the logo image.
|
150
|
+
*
|
151
|
+
* @remarks
|
152
|
+
* Recommended size is 80x80 pixels.
|
153
|
+
*/
|
154
|
+
url: string;
|
155
|
+
/**
|
156
|
+
* Alt text for the logo image.
|
157
|
+
*/
|
158
|
+
alt?: string;
|
159
|
+
/**
|
160
|
+
* The logo can be displayed as a circle.
|
161
|
+
*
|
162
|
+
* @defaultValue 'unset'
|
163
|
+
*/
|
164
|
+
shape?: 'unset' | 'circle';
|
165
|
+
};
|
166
|
+
/**
|
167
|
+
* Background image displayed on the configuration page.
|
168
|
+
*/
|
169
|
+
backgroundImage?: {
|
170
|
+
/**
|
171
|
+
* URL for the background image.
|
172
|
+
*
|
173
|
+
* @remarks
|
174
|
+
* Background image should be larger than 576x567 pixels and smaller than 2048x2048 pixels pixels.
|
175
|
+
*/
|
176
|
+
url: string;
|
177
|
+
};
|
178
|
+
};
|
140
179
|
};
|
141
180
|
/**
|
142
181
|
* CallWithChatComposite brings together key components to provide a full call with chat experience out of the box.
|
package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js
CHANGED
@@ -117,14 +117,21 @@ const CallWithChatScreen = (props) => {
|
|
117
117
|
/* @conditional-compile-remove(gallery-layouts) */
|
118
118
|
galleryOptions: props.galleryOptions,
|
119
119
|
/* @conditional-compile-remove(click-to-call) */
|
120
|
-
localVideoTile: props.localVideoTile
|
120
|
+
localVideoTile: props.localVideoTile,
|
121
|
+
/* @conditional-compile-remove(custom-branding) */
|
122
|
+
branding: {
|
123
|
+
logo: props.logo,
|
124
|
+
backgroundImage: props.backgroundImage
|
125
|
+
}
|
121
126
|
}), [props.callControls, callControlOptionsFromProps, showChatButton, customChatButton, injectedCustomButtonsFromProps, /* @conditional-compile-remove(call-readiness) */
|
122
127
|
props.deviceChecks, /* @conditional-compile-remove(unsupported-browser) */
|
123
128
|
props.onEnvironmentInfoTroubleshootingClick, /* @conditional-compile-remove(call-readiness) */
|
124
129
|
props.onNetworkingTroubleShootingClick, /* @conditional-compile-remove(call-readiness) */
|
125
130
|
props.onPermissionsTroubleshootingClick, /* @conditional-compile-remove(gallery-layouts) */
|
126
131
|
props.galleryOptions, /* @conditional-compile-remove(click-to-call) */
|
127
|
-
props.localVideoTile, props.remoteVideoTileMenuOptions
|
132
|
+
props.localVideoTile, props.remoteVideoTileMenuOptions, /* @conditional-compile-remove(custom-branding) */
|
133
|
+
props.logo, /* @conditional-compile-remove(custom-branding) */
|
134
|
+
props.backgroundImage]);
|
128
135
|
const onRenderChatContent = useCallback(() => React.createElement(ChatComposite, { adapter: chatAdapter, fluentTheme: theme, options: {
|
129
136
|
topic: false,
|
130
137
|
/* @conditional-compile-remove(chat-composite-participant-pane) */
|
@@ -169,13 +176,16 @@ const CallWithChatScreen = (props) => {
|
|
169
176
|
* @public
|
170
177
|
*/
|
171
178
|
export const CallWithChatComposite = (props) => {
|
179
|
+
var _a, _b;
|
172
180
|
const { adapter, fluentTheme, rtl, formFactor, joinInvitationURL, options } = props;
|
173
181
|
return React.createElement(BaseProvider, { fluentTheme: fluentTheme, rtl: rtl, locale: props.locale, icons: props.icons },
|
174
182
|
React.createElement(CallWithChatScreen, Object.assign({}, props, {
|
175
183
|
/* @conditional-compile-remove(call-readiness) */ deviceChecks: options === null || options === void 0 ? void 0 : options.deviceChecks, callWithChatAdapter: adapter, formFactor: formFactor, callControls: options === null || options === void 0 ? void 0 : options.callControls, joinInvitationURL: joinInvitationURL, fluentTheme: fluentTheme, remoteVideoTileMenuOptions: options === null || options === void 0 ? void 0 : options.remoteVideoTileMenuOptions,
|
176
184
|
/* @conditional-compile-remove(file-sharing) */ fileSharing: options === null || options === void 0 ? void 0 : options.fileSharing,
|
177
185
|
/* @conditional-compile-remove(click-to-call) */ localVideoTile: options === null || options === void 0 ? void 0 : options.localVideoTile,
|
178
|
-
/* @conditional-compile-remove(gallery-layouts) */ galleryOptions: options === null || options === void 0 ? void 0 : options.galleryOptions
|
186
|
+
/* @conditional-compile-remove(gallery-layouts) */ galleryOptions: options === null || options === void 0 ? void 0 : options.galleryOptions,
|
187
|
+
/* @conditional-compile-remove(custom-branding) */ logo: (_a = options === null || options === void 0 ? void 0 : options.branding) === null || _a === void 0 ? void 0 : _a.logo,
|
188
|
+
/* @conditional-compile-remove(custom-branding) */ backgroundImage: (_b = options === null || options === void 0 ? void 0 : options.branding) === null || _b === void 0 ? void 0 : _b.backgroundImage })));
|
179
189
|
};
|
180
190
|
const hasJoinedCallFn = (page, callStatus) => {
|
181
191
|
/* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(one-to-n-calling) */
|