@azure/communication-react 1.16.0-alpha-202404260012 → 1.16.0-alpha-202405011636
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 +14 -1
- package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-BLhY8s2s.js → ChatMessageComponentAsRichTextEditBox-CNg75yjR.js} +2 -2
- package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-BLhY8s2s.js.map → ChatMessageComponentAsRichTextEditBox-CNg75yjR.js.map} +1 -1
- package/dist/dist-cjs/communication-react/{index-r7pKdpFV.js → index-CMUOoVHA.js} +60 -14
- package/dist/dist-cjs/communication-react/index-CMUOoVHA.js.map +1 -0
- package/dist/dist-cjs/communication-react/index.js +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-components/src/components/DevicesButton.d.ts +2 -1
- package/dist/dist-esm/react-components/src/components/DevicesButton.js +6 -2
- package/dist/dist-esm/react-components/src/components/DevicesButton.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js +1 -1
- package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Buttons/Table/RichTextInsertTableButton.js +1 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Buttons/Table/RichTextInsertTableButton.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Buttons/Table/RichTextInsertTablePane.d.ts +1 -2
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Buttons/Table/RichTextInsertTablePane.js +4 -2
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Buttons/Table/RichTextInsertTablePane.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js +3 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.d.ts +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CapabilitiesChangedNotificationBar.d.ts +13 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CapabilitiesChangedNotificationBar.js +13 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CapabilitiesChangedNotificationBar.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/AudioProvider.d.ts +19 -0
- package/dist/dist-esm/react-composites/src/composites/common/AudioProvider.js +25 -0
- package/dist/dist-esm/react-composites/src/composites/common/AudioProvider.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/BaseComposite.js +7 -1
- package/dist/dist-esm/react-composites/src/composites/common/BaseComposite.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/en-US/strings.json +4 -0
- package/package.json +1 -1
- package/dist/dist-cjs/communication-react/index-r7pKdpFV.js.map +0 -1
@@ -19,7 +19,7 @@ export const CapabilitiesChangedNotificationBar = (props) => {
|
|
19
19
|
})));
|
20
20
|
};
|
21
21
|
const getCapabilityChangedNotificationString = (notification, strings) => {
|
22
|
-
var _a, _b, _c, _d, _e, _f;
|
22
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
23
23
|
switch (notification.capabilityName) {
|
24
24
|
case 'turnVideoOn':
|
25
25
|
if (notification.changedReason === 'MeetingOptionOrOrganizerPolicyChanged') {
|
@@ -43,6 +43,18 @@ const getCapabilityChangedNotificationString = (notification, strings) => {
|
|
43
43
|
return (_f = strings === null || strings === void 0 ? void 0 : strings.shareScreen) === null || _f === void 0 ? void 0 : _f.lostDueToRoleChangeToAttendee;
|
44
44
|
}
|
45
45
|
break;
|
46
|
+
/* @conditional-compile-remove(hide-attendee-name) */
|
47
|
+
case 'viewAttendeeNames':
|
48
|
+
if (!notification.isPresent &&
|
49
|
+
notification.changedReason === 'MeetingOptionOrOrganizerPolicyChanged' &&
|
50
|
+
notification.role === 'Attendee') {
|
51
|
+
return (_g = strings === null || strings === void 0 ? void 0 : strings.hideAttendeeNames) === null || _g === void 0 ? void 0 : _g.hideAttendeeNameAttendee;
|
52
|
+
}
|
53
|
+
if (!notification.isPresent &&
|
54
|
+
notification.changedReason === 'MeetingOptionOrOrganizerPolicyChanged' &&
|
55
|
+
notification.role === 'Presenter') {
|
56
|
+
return (_h = strings === null || strings === void 0 ? void 0 : strings.hideAttendeeNames) === null || _h === void 0 ? void 0 : _h.hideAttendeeNamePresenter;
|
57
|
+
}
|
46
58
|
}
|
47
59
|
return undefined;
|
48
60
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"CapabilitiesChangedNotificationBar.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/components/CapabilitiesChangedNotificationBar.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAgC,UAAU,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAIlG,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAyC/C;;;GAGG;AACH,MAAM,CAAC,MAAM,kCAAkC,GAAG,CAAC,KAA6C,EAAe,EAAE;IAC/G,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IAE3B,OAAO,CACL,oBAAC,KAAK,kBAAY,6CAA6C,IAC5D,KAAK,CAAC,gCAAgC,CAAC,GAAG,CAAC,CAAC,YAAY,EAAE,EAAE;QAC3D,MAAM,OAAO,GAAG,sCAAsC,CACpD,YAAY,EACZ,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,6BAA6B,CAClD,CAAC;QACF,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,IAAI,CAAC;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,MAAM,EAAE,CAAC;KACV;IACD,OAAO,EAAE;QACP,UAAU,EAAE,SAAS;KACtB;IACD,SAAS,EAAE;QACT,MAAM,EAAE,CAAC;QACT,UAAU,EAAE,QAAQ;KACrB;CACF,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React from 'react';\n\nimport { IIconProps, IMessageBarProps, MessageBar, MessageBarType, Stack } from '@fluentui/react';\n\nimport { CapabilitiesChangedReason, ParticipantCapabilityName, ParticipantRole } from '@azure/communication-calling';\n\nimport { useLocale } from '../../localization';\n\n/**\n * @private\n */\nexport interface CapabilitiesChangeNotificationBarProps extends IMessageBarProps {\n capabilitiesChangedNotifications: CapabalityChangedNotification[];\n onDismissNotification: (notification: CapabalityChangedNotification) => void;\n}\n\n/**\n * @private\n */\nexport interface CapabalityChangedNotification {\n /**\n * Name of capability\n */\n capabilityName: ParticipantCapabilityName;\n /**\n * Is capability now available\n */\n isPresent: boolean;\n\n /**\n * Reason capability was changed\n */\n changedReason?: CapabilitiesChangedReason;\n\n /**\n * Role of participant when capability changed\n */\n role?: ParticipantRole;\n /**\n * The latest timestamp when this notification was observed.\n *\n * When available, this is used to track notifications that have already been seen and dismissed\n * by the user.\n */\n timestamp?: Date;\n}\n\n/**\n * Notification bar for capabilities changed\n * @private\n */\nexport const CapabilitiesChangedNotificationBar = (props: CapabilitiesChangeNotificationBarProps): JSX.Element => {\n const locale = useLocale();\n\n return (\n <Stack data-ui-id=\"capabilities-changed-notification-bar-stack\">\n {props.capabilitiesChangedNotifications.map((notification) => {\n const message = getCapabilityChangedNotificationString(\n notification,\n locale.strings.call.capabilityChangedNotification\n );\n if (!message) {\n return null;\n }\n const iconProps = getCustomMessageBarIconProps(notification);\n return (\n <MessageBar\n key={notification.capabilityName}\n styles={messageBarStyles}\n messageBarType={MessageBarType.warning}\n dismissIconProps={{ iconName: 'ErrorBarClear' }}\n onDismiss={() => props.onDismissNotification(notification)}\n messageBarIconProps={iconProps}\n >\n {message}\n </MessageBar>\n );\n })}\n </Stack>\n );\n};\n\nconst getCapabilityChangedNotificationString = (\n notification: CapabalityChangedNotification,\n strings?: CapabilityChangedNotificationStrings\n): string | undefined => {\n switch (notification.capabilityName) {\n case 'turnVideoOn':\n if (notification.changedReason === 'MeetingOptionOrOrganizerPolicyChanged') {\n return notification.isPresent\n ? strings?.turnVideoOn?.grantedDueToMeetingOption\n : strings?.turnVideoOn?.lostDueToMeetingOption;\n }\n break;\n case 'unmuteMic':\n if (notification.changedReason === 'MeetingOptionOrOrganizerPolicyChanged') {\n return notification.isPresent\n ? strings?.unmuteMic?.grantedDueToMeetingOption\n : strings?.unmuteMic?.lostDueToMeetingOption;\n }\n break;\n case 'shareScreen':\n if (notification.isPresent && notification.changedReason === 'RoleChanged' && notification.role === 'Presenter') {\n return strings?.shareScreen?.grantedDueToRoleChangeToPresenter;\n }\n if (!notification.isPresent && notification.changedReason === 'RoleChanged' && notification.role === 'Attendee') {\n return strings?.shareScreen?.lostDueToRoleChangeToAttendee;\n }\n break;\n }\n return undefined;\n};\n\nconst getCustomMessageBarIconProps = (notification: CapabalityChangedNotification): IIconProps | undefined => {\n let iconName: string | undefined = undefined;\n switch (notification.capabilityName) {\n case 'turnVideoOn':\n if (notification.isPresent) {\n iconName = 'ControlButtonCameraOn';\n } else {\n iconName = 'ControlButtonCameraProhibited';\n }\n break;\n case 'unmuteMic':\n if (notification.isPresent) {\n iconName = 'ControlButtonMicOn';\n } else {\n iconName = 'ControlButtonMicProhibited';\n }\n break;\n default:\n return undefined;\n }\n return { iconName, styles: { root: { '> *': { height: '1rem', width: '1rem' } } } };\n};\n\nconst messageBarStyles = {\n innerText: {\n alignSelf: 'center'\n },\n icon: {\n height: 0\n },\n content: {\n lineHeight: 'inherit'\n },\n dismissal: {\n height: 0,\n paddingTop: '0.8rem'\n }\n};\n\n/**\n * Strings for capability changed notification\n * @public\n */\nexport interface CapabilityChangedNotificationStrings {\n /**\n * Strings for 'turnVideoOn' capability\n */\n turnVideoOn?: {\n /**\n * Notification message shown to the user when capability to turn video on is lost due to a meeting option change\n */\n lostDueToMeetingOption?: string;\n /**\n * Notification message shown to the user when capability to turn video on is granted due to a meeting option change\n */\n grantedDueToMeetingOption?: string;\n };\n /**\n * Strings for 'unmuteMic' capability\n */\n unmuteMic?: {\n /**\n * Notification message shown to the user when capability to unmute mic is lost due to a meeting option change\n */\n lostDueToMeetingOption?: string;\n /**\n * Notification message shown to the user when capability to unmute mic is granted due to a meeting option change\n */\n grantedDueToMeetingOption?: string;\n };\n /**\n * Strings for 'shareScreen' capability\n */\n shareScreen?: {\n /**\n * Notification message shown to the user when capability to share screen is lost due to a role change to Attendeee\n */\n lostDueToRoleChangeToAttendee?: string;\n /**\n * Notification message shown to the user when capability to share screen is granted due to a role change to Presenter\n */\n grantedDueToRoleChangeToPresenter?: string;\n };\n}\n"]}
|
1
|
+
{"version":3,"file":"CapabilitiesChangedNotificationBar.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/components/CapabilitiesChangedNotificationBar.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAgC,UAAU,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAIlG,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAyC/C;;;GAGG;AACH,MAAM,CAAC,MAAM,kCAAkC,GAAG,CAAC,KAA6C,EAAe,EAAE;IAC/G,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IAE3B,OAAO,CACL,oBAAC,KAAK,kBAAY,6CAA6C,IAC5D,KAAK,CAAC,gCAAgC,CAAC,GAAG,CAAC,CAAC,YAAY,EAAE,EAAE;QAC3D,MAAM,OAAO,GAAG,sCAAsC,CACpD,YAAY,EACZ,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,6BAA6B,CAClD,CAAC;QACF,IAAI,CAAC,OA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AAC;YAC7C,CAAC;YACD,MAAM;QACR,KAAK,WAAW;YACd,IAAI,YAAY,CAAC,SAAS,EAAE,CAAC;gBAC3B,QAAQ,GAAG,oBAAoB,CAAC;YAClC,CAAC;iBAAM,CAAC;gBACN,QAAQ,GAAG,4BAA4B,CAAC;YAC1C,CAAC;YACD,MAAM;QACR;YACE,OAAO,SAAS,CAAC;IACrB,CAAC;IACD,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,CAAC;AACtF,CAAC,CAAC;AAEF,MAAM,gBAAgB,GAAG;IACvB,SAAS,EAAE;QACT,SAAS,EAAE,QAAQ;KACpB;IACD,IAAI,EAAE;QACJ,MAAM,EAAE,CAAC;KACV;IACD,OAAO,EAAE;QACP,UAAU,EAAE,SAAS;KACtB;IACD,SAAS,EAAE;QACT,MAAM,EAAE,CAAC;QACT,UAAU,EAAE,QAAQ;KACrB;CACF,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React from 'react';\n\nimport { IIconProps, IMessageBarProps, MessageBar, MessageBarType, Stack } from '@fluentui/react';\n\nimport { CapabilitiesChangedReason, ParticipantCapabilityName, ParticipantRole } from '@azure/communication-calling';\n\nimport { useLocale } from '../../localization';\n\n/**\n * @private\n */\nexport interface CapabilitiesChangeNotificationBarProps extends IMessageBarProps {\n capabilitiesChangedNotifications: CapabalityChangedNotification[];\n onDismissNotification: (notification: CapabalityChangedNotification) => void;\n}\n\n/**\n * @private\n */\nexport interface CapabalityChangedNotification {\n /**\n * Name of capability\n */\n capabilityName: ParticipantCapabilityName;\n /**\n * Is capability now available\n */\n isPresent: boolean;\n\n /**\n * Reason capability was changed\n */\n changedReason?: CapabilitiesChangedReason;\n\n /**\n * Role of participant when capability changed\n */\n role?: ParticipantRole;\n /**\n * The latest timestamp when this notification was observed.\n *\n * When available, this is used to track notifications that have already been seen and dismissed\n * by the user.\n */\n timestamp?: Date;\n}\n\n/**\n * Notification bar for capabilities changed\n * @private\n */\nexport const CapabilitiesChangedNotificationBar = (props: CapabilitiesChangeNotificationBarProps): JSX.Element => {\n const locale = useLocale();\n\n return (\n <Stack data-ui-id=\"capabilities-changed-notification-bar-stack\">\n {props.capabilitiesChangedNotifications.map((notification) => {\n const message = getCapabilityChangedNotificationString(\n notification,\n locale.strings.call.capabilityChangedNotification\n );\n if (!message) {\n return null;\n }\n const iconProps = getCustomMessageBarIconProps(notification);\n return (\n <MessageBar\n key={notification.capabilityName}\n styles={messageBarStyles}\n messageBarType={MessageBarType.warning}\n dismissIconProps={{ iconName: 'ErrorBarClear' }}\n onDismiss={() => props.onDismissNotification(notification)}\n messageBarIconProps={iconProps}\n >\n {message}\n </MessageBar>\n );\n })}\n </Stack>\n );\n};\n\nconst getCapabilityChangedNotificationString = (\n notification: CapabalityChangedNotification,\n strings?: CapabilityChangedNotificationStrings\n): string | undefined => {\n switch (notification.capabilityName) {\n case 'turnVideoOn':\n if (notification.changedReason === 'MeetingOptionOrOrganizerPolicyChanged') {\n return notification.isPresent\n ? strings?.turnVideoOn?.grantedDueToMeetingOption\n : strings?.turnVideoOn?.lostDueToMeetingOption;\n }\n break;\n case 'unmuteMic':\n if (notification.changedReason === 'MeetingOptionOrOrganizerPolicyChanged') {\n return notification.isPresent\n ? strings?.unmuteMic?.grantedDueToMeetingOption\n : strings?.unmuteMic?.lostDueToMeetingOption;\n }\n break;\n case 'shareScreen':\n if (notification.isPresent && notification.changedReason === 'RoleChanged' && notification.role === 'Presenter') {\n return strings?.shareScreen?.grantedDueToRoleChangeToPresenter;\n }\n if (!notification.isPresent && notification.changedReason === 'RoleChanged' && notification.role === 'Attendee') {\n return strings?.shareScreen?.lostDueToRoleChangeToAttendee;\n }\n break;\n /* @conditional-compile-remove(hide-attendee-name) */\n case 'viewAttendeeNames':\n if (\n !notification.isPresent &&\n notification.changedReason === 'MeetingOptionOrOrganizerPolicyChanged' &&\n notification.role === 'Attendee'\n ) {\n return strings?.hideAttendeeNames?.hideAttendeeNameAttendee;\n }\n if (\n !notification.isPresent &&\n notification.changedReason === 'MeetingOptionOrOrganizerPolicyChanged' &&\n notification.role === 'Presenter'\n ) {\n return strings?.hideAttendeeNames?.hideAttendeeNamePresenter;\n }\n }\n return undefined;\n};\n\nconst getCustomMessageBarIconProps = (notification: CapabalityChangedNotification): IIconProps | undefined => {\n let iconName: string | undefined = undefined;\n switch (notification.capabilityName) {\n case 'turnVideoOn':\n if (notification.isPresent) {\n iconName = 'ControlButtonCameraOn';\n } else {\n iconName = 'ControlButtonCameraProhibited';\n }\n break;\n case 'unmuteMic':\n if (notification.isPresent) {\n iconName = 'ControlButtonMicOn';\n } else {\n iconName = 'ControlButtonMicProhibited';\n }\n break;\n default:\n return undefined;\n }\n return { iconName, styles: { root: { '> *': { height: '1rem', width: '1rem' } } } };\n};\n\nconst messageBarStyles = {\n innerText: {\n alignSelf: 'center'\n },\n icon: {\n height: 0\n },\n content: {\n lineHeight: 'inherit'\n },\n dismissal: {\n height: 0,\n paddingTop: '0.8rem'\n }\n};\n\n/**\n * Strings for capability changed notification\n * @public\n */\nexport interface CapabilityChangedNotificationStrings {\n /**\n * Strings for 'turnVideoOn' capability\n */\n turnVideoOn?: {\n /**\n * Notification message shown to the user when capability to turn video on is lost due to a meeting option change\n */\n lostDueToMeetingOption?: string;\n /**\n * Notification message shown to the user when capability to turn video on is granted due to a meeting option change\n */\n grantedDueToMeetingOption?: string;\n };\n /**\n * Strings for 'unmuteMic' capability\n */\n unmuteMic?: {\n /**\n * Notification message shown to the user when capability to unmute mic is lost due to a meeting option change\n */\n lostDueToMeetingOption?: string;\n /**\n * Notification message shown to the user when capability to unmute mic is granted due to a meeting option change\n */\n grantedDueToMeetingOption?: string;\n };\n /**\n * Strings for 'shareScreen' capability\n */\n shareScreen?: {\n /**\n * Notification message shown to the user when capability to share screen is lost due to a role change to Attendeee\n */\n lostDueToRoleChangeToAttendee?: string;\n /**\n * Notification message shown to the user when capability to share screen is granted due to a role change to Presenter\n */\n grantedDueToRoleChangeToPresenter?: string;\n };\n /* @conditional-compile-remove(hide-attendee-name) */\n /**\n * Strings for hidden attendee names capability\n */\n hideAttendeeNames?: {\n /**\n * Notification message shown to the user when capability to view attendee names is lost due to a meeting option change for Attendee\n */\n hideAttendeeNameAttendee?: string;\n /**\n * Notification message shown to the user when capability to view attendee names is lost due to a meeting option change for Presenter\n */\n hideAttendeeNamePresenter?: string;\n };\n}\n"]}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
/**
|
3
|
+
* @private
|
4
|
+
*/
|
5
|
+
export interface ACSAudioProviderProps {
|
6
|
+
audioContext: AudioContext;
|
7
|
+
children: JSX.Element;
|
8
|
+
}
|
9
|
+
/**
|
10
|
+
*
|
11
|
+
* @param props
|
12
|
+
* @returns
|
13
|
+
*/
|
14
|
+
export declare const ACSAudioProvider: (props: ACSAudioProviderProps) => JSX.Element;
|
15
|
+
/**
|
16
|
+
* @private
|
17
|
+
*/
|
18
|
+
export declare const useAudio: () => AudioContext;
|
19
|
+
//# sourceMappingURL=AudioProvider.d.ts.map
|
@@ -0,0 +1,25 @@
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
2
|
+
// Licensed under the MIT License.
|
3
|
+
import React, { useContext, createContext } from 'react';
|
4
|
+
/**
|
5
|
+
*
|
6
|
+
* @param props
|
7
|
+
* @returns
|
8
|
+
*/
|
9
|
+
export const ACSAudioProvider = (props) => {
|
10
|
+
const { audioContext, children } = props;
|
11
|
+
const alreadyWrapped = useAudio();
|
12
|
+
if (alreadyWrapped) {
|
13
|
+
return React.createElement(React.Fragment, null, children);
|
14
|
+
}
|
15
|
+
return React.createElement(ACSAudioContext.Provider, { value: audioContext }, props.children);
|
16
|
+
};
|
17
|
+
/**
|
18
|
+
* @private
|
19
|
+
*/
|
20
|
+
const ACSAudioContext = createContext(new AudioContext());
|
21
|
+
/**
|
22
|
+
* @private
|
23
|
+
*/
|
24
|
+
export const useAudio = () => useContext(ACSAudioContext);
|
25
|
+
//# sourceMappingURL=AudioProvider.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"AudioProvider.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/common/AudioProvider.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAUzD;;;;GAIG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,KAA4B,EAAe,EAAE;IAC5E,MAAM,EAAE,YAAY,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IACzC,MAAM,cAAc,GAAG,QAAQ,EAAE,CAAC;IAClC,IAAI,cAAc,EAAE,CAAC;QACnB,OAAO,0CAAG,QAAQ,CAAI,CAAC;IACzB,CAAC;IACD,OAAO,oBAAC,eAAe,CAAC,QAAQ,IAAC,KAAK,EAAE,YAAY,IAAG,KAAK,CAAC,QAAQ,CAA4B,CAAC;AACpG,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,eAAe,GAAG,aAAa,CAAe,IAAI,YAAY,EAAE,CAAC,CAAC;AAExE;;GAEG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,GAAiB,EAAE,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React, { useContext, createContext } from 'react';\n\n/**\n * @private\n */\nexport interface ACSAudioProviderProps {\n audioContext: AudioContext;\n children: JSX.Element;\n}\n\n/**\n *\n * @param props\n * @returns\n */\nexport const ACSAudioProvider = (props: ACSAudioProviderProps): JSX.Element => {\n const { audioContext, children } = props;\n const alreadyWrapped = useAudio();\n if (alreadyWrapped) {\n return <>{children}</>;\n }\n return <ACSAudioContext.Provider value={audioContext}>{props.children}</ACSAudioContext.Provider>;\n};\n\n/**\n * @private\n */\nconst ACSAudioContext = createContext<AudioContext>(new AudioContext());\n\n/**\n * @private\n */\nexport const useAudio = (): AudioContext => useContext(ACSAudioContext);\n"]}
|
@@ -7,6 +7,7 @@ import { LocalizationProvider } from '../localization';
|
|
7
7
|
import { DEFAULT_COMPOSITE_ICONS } from './icons';
|
8
8
|
import { globalLayerHostStyle } from './styles/GlobalHostLayer.styles';
|
9
9
|
import { useId } from '@fluentui/react-hooks';
|
10
|
+
import { ACSAudioProvider } from './AudioProvider';
|
10
11
|
/**
|
11
12
|
* A base provider {@link React.Context} to wrap components with other required providers
|
12
13
|
* (e.g. icons, FluentThemeProvider, LocalizationProvider).
|
@@ -40,12 +41,17 @@ export const BaseProvider = (props) => {
|
|
40
41
|
* to ensure all icons render correctly.
|
41
42
|
*/
|
42
43
|
registerIcons({ icons: Object.assign(Object.assign({}, iconsToRegister), props.icons) });
|
44
|
+
/**
|
45
|
+
* We need to create one context for the AudioProvider to ensure that we only have one instance of the AudioContext.
|
46
|
+
*/
|
47
|
+
const compositeAudioContext = new AudioContext();
|
43
48
|
// we use Customizer to override default LayerHost injected to <body />
|
44
49
|
// which stop polluting global dom tree and increase compatibility with react-full-screen
|
45
50
|
const CompositeElement = (React.createElement(FluentThemeProvider, { fluentTheme: fluentTheme, rtl: rtl },
|
46
51
|
React.createElement("meta", { name: "viewport", content: "width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0" }),
|
47
52
|
React.createElement(Customizer, { scopedSettings: { Layer: { hostId: globalLayerHostId } } },
|
48
|
-
React.createElement(
|
53
|
+
React.createElement(ACSAudioProvider, { audioContext: compositeAudioContext },
|
54
|
+
React.createElement(WithBackgroundColor, null, props.children))),
|
49
55
|
React.createElement(LayerHost, { id: globalLayerHostId, className: mergeStyles(globalLayerHostStyle) })));
|
50
56
|
const localizedElement = locale ? LocalizationProvider({ locale, children: CompositeElement }) : CompositeElement;
|
51
57
|
return React.createElement(BaseContext.Provider, { value: true }, localizedElement);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"BaseComposite.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/common/BaseComposite.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EACL,UAAU,EACV,SAAS,EACT,WAAW,EAEX,aAAa,EACb,KAAK,EAEL,QAAQ,EACT,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,mBAAmB,EAAgC,yCAAmC;AAC/F,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACzD,OAAO,EAAmB,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAExE,OAAO,EAAsE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AACtH,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AA+
|
1
|
+
{"version":3,"file":"BaseComposite.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/common/BaseComposite.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EACL,UAAU,EACV,SAAS,EACT,WAAW,EAEX,aAAa,EACb,KAAK,EAEL,QAAQ,EACT,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,mBAAmB,EAAgC,yCAAmC;AAC/F,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACzD,OAAO,EAAmB,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAExE,OAAO,EAAsE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AACtH,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AA+CnD;;;;;;;GA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AE,SAAS,EAAE,WAAW,CAAC,oBAAoB,CAAC,GAAI,CAC9D,CACvB,CAAC;IACF,MAAM,gBAAgB,GAAG,MAAM,CAAC,CAAC,CAAC,oBAAoB,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,gBAAgB,EAAE,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC;IAClH,OAAO,oBAAC,WAAW,CAAC,QAAQ,IAAC,KAAK,EAAE,IAAI,IAAG,gBAAgB,CAAwB,CAAC;AACtF,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,GAAG,aAAa,CAAU,KAAK,CAAC,CAAC;AAElD;;GAEG;AACH,MAAM,OAAO,GAAG,GAAY,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;AAEvD;;;;;GAKG;AACH,MAAM,mBAAmB,GAAG,CAAC,KAAoC,EAAe,EAAE;IAChF,MAAM,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IAC3B,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IACzB,MAAM,SAAS,GAAG,WAAW,CAAC;QAC5B,UAAU,EAAE,KAAK,CAAC,cAAc,CAAC,cAAc;QAC/C,MAAM,EAAE,MAAM;QACd,KAAK,EAAE,MAAM;QACb,QAAQ,EAAE,UAAU;KACrB,CAAC,CAAC;IACH,OAAO,oBAAC,KAAK,IAAC,SAAS,EAAE,SAAS,IAAG,QAAQ,CAAS,CAAC;AACzD,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n Customizer,\n LayerHost,\n mergeStyles,\n PartialTheme,\n registerIcons,\n Stack,\n Theme,\n useTheme\n} from '@fluentui/react';\nimport { FluentThemeProvider, ParticipantMenuItemsCallback } from '@internal/react-components';\nimport React, { createContext, useContext } from 'react';\nimport { CompositeLocale, LocalizationProvider } from '../localization';\nimport { AvatarPersonaDataCallback } from './AvatarPersona';\nimport { CallCompositeIcons, CallWithChatCompositeIcons, ChatCompositeIcons, DEFAULT_COMPOSITE_ICONS } from './icons';\nimport { globalLayerHostStyle } from './styles/GlobalHostLayer.styles';\nimport { useId } from '@fluentui/react-hooks';\nimport { ACSAudioProvider } from './AudioProvider';\n/**\n * Properties common to all composites exported from this library.\n *\n * @public\n */\nexport interface BaseCompositeProps<TIcons extends Record<string, JSX.Element>> {\n /**\n * Fluent theme for the composite.\n *\n * @defaultValue light theme\n */\n fluentTheme?: PartialTheme | Theme;\n /**\n * Custom Icon override for the composite.\n * A JSX element can be provided to override the default icon.\n */\n icons?: TIcons;\n /**\n * Locale for the composite.\n *\n * @defaultValue English (US)\n */\n locale?: CompositeLocale;\n /**\n * Whether composite is displayed right-to-left.\n *\n * @defaultValue false\n */\n rtl?: boolean;\n /**\n * A callback function that can be used to provide custom data to Avatars rendered\n * in Composite.\n *\n * This will not affect the displayName shown in the composite.\n * The displayName throughout the composite will be what is provided to the adapter when the adapter is created.\n * will be what is provided to the adapter when the adapter is created.\n */\n onFetchAvatarPersonaData?: AvatarPersonaDataCallback;\n\n /**\n * A callback function that can be used to provide custom menu items for a participant in\n * participant list.\n */\n onFetchParticipantMenuItems?: ParticipantMenuItemsCallback;\n}\n\n/**\n * A base provider {@link React.Context} to wrap components with other required providers\n * (e.g. icons, FluentThemeProvider, LocalizationProvider).\n *\n * Required providers are only wrapped once, with all other instances only passing children.\n *\n * @private\n */\nexport const BaseProvider = (\n props: BaseCompositeProps<CallCompositeIcons | ChatCompositeIcons | CallWithChatCompositeIcons> & {\n children: React.ReactNode;\n }\n): JSX.Element => {\n const { fluentTheme, rtl, locale } = props;\n\n const globalLayerHostId = useId('composite-global-hostId');\n\n /**\n * Pass only the children if we previously registered icons, and have previously wrapped the children in\n * FluentThemeProvider and LocalizationProvider\n */\n const alreadyWrapped = useBase();\n if (alreadyWrapped) {\n return <>{props.children}</>;\n }\n\n /**\n * Before registering fluent icons, we should check DEFAULT_COMPOSITE_ICONS and strip out the key value pairs where value is undefined\n */\n const iconsToRegister: { [key: string]: JSX.Element } = {};\n Object.entries(DEFAULT_COMPOSITE_ICONS).forEach(([key, value]) => {\n if (value) {\n iconsToRegister[key] = value;\n }\n });\n\n /**\n * We register the default icon mappings merged with custom icons provided through props\n * to ensure all icons render correctly.\n */\n registerIcons({ icons: { ...iconsToRegister, ...props.icons } });\n\n /**\n * We need to create one context for the AudioProvider to ensure that we only have one instance of the AudioContext.\n */\n const compositeAudioContext = new AudioContext();\n // we use Customizer to override default LayerHost injected to <body />\n // which stop polluting global dom tree and increase compatibility with react-full-screen\n const CompositeElement = (\n <FluentThemeProvider fluentTheme={fluentTheme} rtl={rtl}>\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0\" />\n <Customizer scopedSettings={{ Layer: { hostId: globalLayerHostId } }}>\n <ACSAudioProvider audioContext={compositeAudioContext}>\n <WithBackgroundColor>{props.children}</WithBackgroundColor>\n </ACSAudioProvider>\n </Customizer>\n <LayerHost id={globalLayerHostId} className={mergeStyles(globalLayerHostStyle)} />\n </FluentThemeProvider>\n );\n const localizedElement = locale ? LocalizationProvider({ locale, children: CompositeElement }) : CompositeElement;\n return <BaseContext.Provider value={true}>{localizedElement}</BaseContext.Provider>;\n};\n\n/**\n * @private\n */\nconst BaseContext = createContext<boolean>(false);\n\n/**\n * @private\n */\nconst useBase = (): boolean => useContext(BaseContext);\n\n/**\n * @private\n * Provides a wrapper with a background color to ensure that composites always have a background color.\n * This is necessary to ensure that composites are not transparent,\n * and the background color of it's parent elements doesn't show through the composite.\n */\nconst WithBackgroundColor = (props: { children: React.ReactNode }): JSX.Element => {\n const { children } = props;\n const theme = useTheme();\n const className = mergeStyles({\n background: theme.semanticColors.bodyBackground,\n height: '100%',\n width: '100%',\n position: 'relative'\n });\n return <Stack className={className}>{children}</Stack>;\n};\n"]}
|
package/dist/dist-esm/react-composites/src/composites/localization/locales/en-US/strings.json
CHANGED
@@ -244,6 +244,10 @@
|
|
244
244
|
"shareScreen": {
|
245
245
|
"lostDueToRoleChangeToAttendee": "Your role has been changed. Some actions, like sharing content, won't be available to you.",
|
246
246
|
"grantedDueToRoleChangeToPresenter": "You're a presenter. You can share content and facilitate the meeting."
|
247
|
+
},
|
248
|
+
"hideAttendeeNames": {
|
249
|
+
"hideAttendeeNameAttendee": "Your name is hidden from other attendees. Organizers and presenters can see your real name.",
|
250
|
+
"hideAttendeeNamePresenter": "Attendee names are hidden. Only organizers and presenters can see names to protect attendee privacy."
|
247
251
|
}
|
248
252
|
},
|
249
253
|
"surveyTitle": "Help us improve",
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@azure/communication-react",
|
3
|
-
"version": "1.16.0-alpha-
|
3
|
+
"version": "1.16.0-alpha-202405011636",
|
4
4
|
"sideEffects": false,
|
5
5
|
"description": "React library for building modern communication user experiences utilizing Azure Communication Services",
|
6
6
|
"keywords": [
|