@azure/communication-react 1.22.0-alpha-202412070017 → 1.22.0-alpha-202412100018
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 +60 -10
- package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-CTHWXMl0.js → ChatMessageComponentAsRichTextEditBox-Bpez2mhK.js} +2 -2
- package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-CTHWXMl0.js.map → ChatMessageComponentAsRichTextEditBox-Bpez2mhK.js.map} +1 -1
- package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-C0YPqtKB.js → RichTextSendBoxWrapper-CrmMCuXY.js} +2 -2
- package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-C0YPqtKB.js.map → RichTextSendBoxWrapper-CrmMCuXY.js.map} +1 -1
- package/dist/dist-cjs/communication-react/{index-Bf1eybwR.js → index-DIxf34Zj.js} +176 -40
- package/dist/dist-cjs/communication-react/index-DIxf34Zj.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/calling-component-bindings/src/baseSelectors.d.ts +5 -0
- package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js +8 -0
- package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.d.ts +48 -8
- package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js +20 -20
- package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/notificationStackSelector.js +45 -3
- package/dist/dist-esm/calling-component-bindings/src/notificationStackSelector.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.d.ts +1 -1
- package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js +11 -5
- package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.js +7 -1
- package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallClientState.d.ts +5 -1
- package/dist/dist-esm/calling-stateful-client/src/CallClientState.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallContext.d.ts +2 -1
- package/dist/dist-esm/calling-stateful-client/src/CallContext.js +15 -0
- package/dist/dist-esm/calling-stateful-client/src/CallContext.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CapabilitiesSubscriber.d.ts +1 -0
- package/dist/dist-esm/calling-stateful-client/src/CapabilitiesSubscriber.js +62 -0
- package/dist/dist-esm/calling-stateful-client/src/CapabilitiesSubscriber.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/MediaAccessSubscriber.d.ts +1 -0
- package/dist/dist-esm/calling-stateful-client/src/MediaAccessSubscriber.js +7 -4
- package/dist/dist-esm/calling-stateful-client/src/MediaAccessSubscriber.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/NotificationStack.d.ts +4 -0
- package/dist/dist-esm/react-components/src/components/NotificationStack.js.map +1 -1
- package/dist/dist-esm/react-components/src/types/TogetherModeTypes.d.ts +7 -31
- package/dist/dist-esm/react-components/src/types/TogetherModeTypes.js.map +1 -1
- package/dist/dist-esm/react-components/src/types/VideoGalleryParticipant.d.ts +3 -1
- package/dist/dist-esm/react-components/src/types/VideoGalleryParticipant.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/AudioProvider.d.ts +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/AudioProvider.js +8 -3
- package/dist/dist-esm/react-composites/src/composites/common/AudioProvider.js.map +1 -1
- package/package.json +2 -2
- package/dist/dist-cjs/communication-react/index-Bf1eybwR.js.map +0 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"MediaAccessSubscriber.js","sourceRoot":"","sources":["../../../../../calling-stateful-client/src/MediaAccessSubscriber.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;
|
1
|
+
{"version":3,"file":"MediaAccessSubscriber.js","sourceRoot":"","sources":["../../../../../calling-stateful-client/src/MediaAccessSubscriber.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAalC,+CAA+C;AAC/C;;GAEG;AACH,MAAM,OAAO,qBAAqB;IAKhC,YAAY,SAAoB,EAAE,OAAoB,EAAE,sBAA8C;QAa9F,cAAS,GAAG,GAAS,EAAE;YAC7B,IAAI,CAAC,uBAAuB,CAAC,EAAE,CAAC,oBAAoB,EAAE,IAAI,CAAC,kBAAkB,CAAC,CAAC;YAC/E,IAAI,CAAC,uBAAuB,CAAC,EAAE,CAAC,2BAA2B,EAAE,IAAI,CAAC,yBAAyB,CAAC,CAAC;QAC/F,CAAC,CAAC;QAEK,gBAAW,GAAG,GAAS,EAAE;YAC9B,IAAI,CAAC,uBAAuB,CAAC,GAAG,CAAC,oBAAoB,EAAE,IAAI,CAAC,kBAAkB,CAAC,CAAC;YAChF,IAAI,CAAC,uBAAuB,CAAC,GAAG,CAAC,2BAA2B,EAAE,IAAI,CAAC,yBAAyB,CAAC,CAAC;QAChG,CAAC,CAAC;QAEM,uBAAkB,GAAG,CAAC,IAA6B,EAAQ,EAAE,CACnE,IAAI,CAAC,QAAQ,CAAC,gBAAgB,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;QAErE,8BAAyB,GAAG,CAAC,IAAoC,EAAQ,EAAE,CACjF,IAAI,CAAC,QAAQ,CAAC,qBAAqB,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,IAAI,CAAC,kBAAkB,CAAC,CAAC;QA1BrF,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAC5B,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;QACxB,IAAI,CAAC,uBAAuB,GAAG,sBAAsB,CAAC;QAEtD,MAAM,aAAa,GAAG,IAAI,CAAC,uBAAuB,CAAC,uBAAuB,EAAE,CAAC;QAC7E,MAAM,kBAAkB,GAAG,IAAI,CAAC,uBAAuB,CAAC,qBAAqB,EAAE,CAAC;QAEhF,IAAI,CAAC,QAAQ,CAAC,gBAAgB,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;QACtE,IAAI,CAAC,QAAQ,CAAC,qBAAqB,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC;QAChF,IAAI,CAAC,SAAS,EAAE,CAAC;IACnB,CAAC;CAiBF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/* @conditional-compile-remove(media-access) */\nimport {\n MediaAccessCallFeature,\n MediaAccessChangedEvent,\n MeetingMediaAccessChangedEvent\n} from '@azure/communication-calling';\n/* @conditional-compile-remove(media-access) */\nimport { CallContext } from './CallContext';\n/* @conditional-compile-remove(media-access) */\nimport { CallIdRef } from './CallIdRef';\n\n/* @conditional-compile-remove(media-access) */\n/**\n * @private\n */\nexport class MediaAccessSubscriber {\n private _callIdRef: CallIdRef;\n private _context: CallContext;\n private _mediaAccessCallFeature: MediaAccessCallFeature;\n\n constructor(callIdRef: CallIdRef, context: CallContext, mediaAccessCallFeature: MediaAccessCallFeature) {\n this._callIdRef = callIdRef;\n this._context = context;\n this._mediaAccessCallFeature = mediaAccessCallFeature;\n\n const mediaAccesses = this._mediaAccessCallFeature.getAllOthersMediaAccess();\n const meetingMediaAccess = this._mediaAccessCallFeature.getMeetingMediaAccess();\n\n this._context.setMediaAccesses(this._callIdRef.callId, mediaAccesses);\n this._context.setMeetingMediaAccess(this._callIdRef.callId, meetingMediaAccess);\n this.subscribe();\n }\n\n private subscribe = (): void => {\n this._mediaAccessCallFeature.on('mediaAccessChanged', this.mediaAccessChanged);\n this._mediaAccessCallFeature.on('meetingMediaAccessChanged', this.meetingMediaAccessChanged);\n };\n\n public unsubscribe = (): void => {\n this._mediaAccessCallFeature.off('mediaAccessChanged', this.mediaAccessChanged);\n this._mediaAccessCallFeature.off('meetingMediaAccessChanged', this.meetingMediaAccessChanged);\n };\n\n private mediaAccessChanged = (data: MediaAccessChangedEvent): void =>\n this._context.setMediaAccesses(this._callIdRef.callId, data.mediaAccesses);\n\n private meetingMediaAccessChanged = (data: MeetingMediaAccessChangedEvent): void =>\n this._context.setMeetingMediaAccess(this._callIdRef.callId, data.meetingMediaAccess);\n}\n"]}
|
@@ -221,6 +221,10 @@ export interface NotificationStackStrings {
|
|
221
221
|
* Message shown in notification when breakout room is closing soon
|
222
222
|
*/
|
223
223
|
breakoutRoomClosingSoon?: NotificationStrings;
|
224
|
+
capabilityTurnVideoOnPresent?: NotificationStrings;
|
225
|
+
capabilityTurnVideoOnAbsent?: NotificationStrings;
|
226
|
+
capabilityUnmuteMicPresent?: NotificationStrings;
|
227
|
+
capabilityUnmuteMicAbsent?: NotificationStrings;
|
224
228
|
}
|
225
229
|
/**
|
226
230
|
* All notifications that can be shown in the {@link NotificationStack}.
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"NotificationStack.js","sourceRoot":"","sources":["../../../../../../react-components/src/components/NotificationStack.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAExC,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAEL,qBAAqB,EACrB,mBAAmB,EACnB,sCAAsC,EACtC,mBAAmB,EACpB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,YAAY,EAAuB,MAAM,gBA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,EACrC,QAAQ,EAAE,YAAY,CAAC,QAAQ,GAC/B,CACE,CACP,CAAC;QACJ,CAAC;aAAM,CAAC;YACN,OAAO,yCAAK,CAAC;QACf,CAAC;IACH,CAAC,CAAC,CACI,CACT,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React, { useEffect, useRef, useState } from 'react';\nimport { Stack } from '@fluentui/react';\n\nimport { useLocale } from '../localization';\nimport {\n DismissedNotification,\n NotificationIconProps,\n dismissNotification,\n dropDismissalsForInactiveNotifications,\n notificationsToShow\n} from './utils';\nimport { Notification, NotificationStrings } from './Notification';\n\n/**\n * Props for {@link NotificationStack}.\n * @public\n */\nexport interface NotificationStackProps {\n /**\n * Strings shown on the UI on errors.\n */\n strings?: NotificationStackStrings;\n\n /**\n * Currently active notifications.\n */\n activeNotifications: ActiveNotification[];\n\n /**\n * Max notifications to show at a time.\n * @defaultValue 2\n */\n maxNotificationsToShow?: number;\n\n /**\n * Callback called when the dismiss button is triggered.\n * Use this to control notifications shown when they dismissed by the user.\n * Note this onDismiss function will affect all notifications in the same stack\n */\n onDismissNotification?: (dismissedNotification: ActiveNotification) => void;\n\n /**\n * If set, notifications with {@link ActiveNotification.timestamp} older than the time this component is mounted\n * are not shown.\n *\n * This is useful when using the {@link NotificationStack} with a stateful client that handles more than one call\n * or chat thread. Set this prop to ignore notifications from previous call or chat.\n *\n * @defaultValue false\n */\n ignorePremountNotifications?: boolean;\n}\n\n/**\n * All strings that may be shown on the UI in the {@link NotificationStack}.\n *\n * @public\n */\nexport interface NotificationStackStrings {\n /**\n * A generic message when starting video fails.\n */\n startVideoGeneric?: NotificationStrings;\n\n /**\n * A generic message when starting video fails.\n */\n stopVideoGeneric?: NotificationStrings;\n\n /**\n * A generic message when muting microphone fails.\n */\n muteGeneric?: NotificationStrings;\n\n /**\n * A generic message when unmuting microphone fails.\n */\n unmuteGeneric?: NotificationStrings;\n\n /**\n * A generic message when starting screenshare fails.\n */\n startScreenShareGeneric?: NotificationStrings;\n\n /**\n * A generic message when stopping screenshare fails.\n */\n stopScreenShareGeneric?: NotificationStrings;\n\n /**\n * Message shown when poor network quality is detected during a call.\n */\n callNetworkQualityLow?: NotificationStrings;\n /**\n * Message shown when poor network quality is detected during a teams meetings.\n * Contains actions to open phone info modal.\n */\n teamsMeetingCallNetworkQualityLow?: NotificationStrings;\n /**\n * Message shown on failure to detect audio output devices.\n */\n callNoSpeakerFound?: NotificationStrings;\n\n /**\n * Message shown on failure to detect audio input devices.\n */\n callNoMicrophoneFound?: NotificationStrings;\n\n /**\n * Message shown when microphone can be enumerated but access is blocked by the system.\n */\n callMicrophoneAccessDenied?: NotificationStrings;\n\n /**\n * Message shown when microphone can be enumerated but access is blocked by the system, for safari browsers\n */\n callMicrophoneAccessDeniedSafari?: NotificationStrings;\n\n /**\n * Message shown when microphone is muted by the system (not by local or remote participants)\n */\n callMicrophoneMutedBySystem?: NotificationStrings;\n\n /**\n * Message shown when microphone is unmuted by the system (not by local or remote participants).\n * This typically occurs if the system recovers from an unexpected mute.\n */\n callMicrophoneUnmutedBySystem?: NotificationStrings;\n\n /**\n * Mac OS specific message shown when microphone can be enumerated but access is\n * blocked by the system.\n */\n callMacOsMicrophoneAccessDenied?: NotificationStrings;\n\n /**\n * Message shown when poor network causes local video stream to be frozen.\n */\n callLocalVideoFreeze?: NotificationStrings;\n\n /**\n * Message shown when camera can be enumerated but access is blocked by the system.\n */\n callCameraAccessDenied?: NotificationStrings;\n\n /**\n * Message shown when camera can be enumerated but access is blocked by the system, for safari browsers\n */\n callCameraAccessDeniedSafari?: NotificationStrings;\n\n /**\n * Message shown when local video fails to start because camera is already in use by\n * another applciation.\n */\n callCameraAlreadyInUse?: NotificationStrings;\n\n /**\n * Message shown when local video is stopped by the system (not by local or remote participants)\n */\n callVideoStoppedBySystem?: NotificationStrings;\n\n /**\n * Message shown when local video was recovered by the system (not by the local participant)\n */\n callVideoRecoveredBySystem?: NotificationStrings;\n\n /**\n * Mac OS specific message shown when system denies access to camera.\n */\n callMacOsCameraAccessDenied?: NotificationStrings;\n\n /**\n * Mac OS specific message shown when system denies sharing local screen on a call.\n */\n callMacOsScreenShareAccessDenied?: NotificationStrings;\n\n /**\n * Dimiss Notifications button aria label read by screen reader accessibility tools\n */\n dismissButtonAriaLabel?: NotificationStrings;\n\n /**\n * An error message when joining a call fails.\n */\n failedToJoinCallGeneric?: NotificationStrings;\n\n /**\n * An error message when joining a call fails specifically due to an invalid meeting link.\n */\n failedToJoinCallInvalidMeetingLink?: NotificationStrings;\n /**\n * Error string letting you know remote participants see a frozen stream for you.\n */\n cameraFrozenForRemoteParticipants?: NotificationStrings;\n /**\n * Unable to start effect\n */\n unableToStartVideoEffect?: NotificationStrings;\n /**\n * An error message when starting spotlight while max participants are spotlighted\n */\n startSpotlightWhileMaxParticipantsAreSpotlighted?: NotificationStrings;\n /**\n * Muted by a remote participant message\n */\n mutedByRemoteParticipant?: NotificationStrings;\n /**\n * Speaking while muted message\n */\n speakingWhileMuted?: NotificationStrings;\n /**\n * Recording started message\n */\n recordingStarted?: NotificationStrings;\n /**\n * Transcription started message\n */\n transcriptionStarted?: NotificationStrings;\n /**\n * Recording stopped message\n */\n recordingStopped?: NotificationStrings;\n /**\n * Transcription stopped message\n */\n transcriptionStopped?: NotificationStrings;\n /**\n * Recording and transcription both started message\n */\n recordingAndTranscriptionStarted?: NotificationStrings;\n /**\n * Recording and transcription both stopped message\n */\n recordingAndTranscriptionStopped?: NotificationStrings;\n /**\n * Recording stopped but transcription still going on message\n */\n recordingStoppedStillTranscribing?: NotificationStrings;\n /**\n * Transcription stopped but recording still going on message\n */\n transcriptionStoppedStillRecording?: NotificationStrings;\n /* @conditional-compile-remove(breakout-rooms) */\n /**\n * Message shown in notification when the user will be automatically to their assigned breakout room that is opened\n */\n assignedBreakoutRoomOpened?: NotificationStrings;\n /* @conditional-compile-remove(breakout-rooms) */\n /**\n * Message shown in notification when the user is prompted to join their assigned breakout room that is opened\n */\n assignedBreakoutRoomOpenedPromptJoin?: NotificationStrings;\n /* @conditional-compile-remove(breakout-rooms) */\n /**\n * Message shown in notification when the user is assigned breakout room is changed\n */\n assignedBreakoutRoomChanged?: NotificationStrings;\n /* @conditional-compile-remove(breakout-rooms) */\n /**\n * Message shown in notification when breakout room is joined\n */\n breakoutRoomJoined?: NotificationStrings;\n /* @conditional-compile-remove(breakout-rooms) */\n /**\n * Message shown in notification when breakout room is closing soon\n */\n breakoutRoomClosingSoon?: NotificationStrings;\n}\n\n/**\n * All notifications that can be shown in the {@link NotificationStack}.\n *\n * @public\n */\nexport type NotificationType = keyof NotificationStackStrings;\n\n/**\n * Active notifications to be shown via {@link NotificationStack}.\n *\n * @public\n */\nexport interface ActiveNotification {\n /**\n * Type of error that is active.\n */\n type: NotificationType;\n /**\n * Callback called when the primary button inside notification bar is clicked.\n */\n onClickPrimaryButton?: () => void;\n\n /**\n * Callback called when the primary button inside notification bar is clicked.\n */\n onClickSecondaryButton?: () => void;\n\n /**\n * Callback called when the notification is dismissed.\n */\n onDismiss?: () => void;\n\n /**\n * If set, notification will automatically dismiss after 5 seconds\n */\n autoDismiss?: boolean;\n\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 * Aria-live property for the notification.\n * @defaultValue polite\n */\n ariaLive?: 'assertive' | 'off' | 'polite';\n}\n\n/**\n * A component to show notifications on the UI.\n * All strings that can be shown are accepted as the {@link NotificationStackProps.strings} so that they can be localized.\n * Active notifications are selected by {@link NotificationStackProps.activeNotifications}.\n *\n * This component internally tracks dismissed by the user.\n * * Notifications that have an associated timestamp: The notification is shown on the UI again if it occurs after being dismissed.\n * * Notifications that do not have a timestamp: The notification is dismissed until it disappears from the props.\n * If the notification recurs, it is shown in the UI.\n *\n *\n * @public\n */\nexport const NotificationStack = (props: NotificationStackProps): JSX.Element => {\n const localeStrings = useLocale().strings.notificationStack;\n const strings = props.strings ?? localeStrings;\n const maxNotificationsToShow = props.maxNotificationsToShow ?? 2;\n\n const trackDismissedNotificationsInternally = !props.onDismissNotification;\n\n // Timestamp for when this comopnent is first mounted.\n // Never updated through the lifecycle of this component.\n const mountTimestamp = useRef(new Date(Date.now()));\n\n const [dismissedNotifications, setDismissedNotifications] = useState<DismissedNotification[]>([]);\n\n // dropDismissalsForInactiveNotifications only returns a new object if `dismissedErrors` actually changes.\n // Without this behaviour, this `useEffect` block would cause a render loop.\n useEffect(() => {\n trackDismissedNotificationsInternally &&\n setDismissedNotifications(\n dropDismissalsForInactiveNotifications(props.activeNotifications, dismissedNotifications)\n );\n }, [props.activeNotifications, dismissedNotifications, trackDismissedNotificationsInternally]);\n\n const activeNotifications = notificationsToShow(\n props.activeNotifications,\n dismissedNotifications,\n props.ignorePremountNotifications ? mountTimestamp.current : undefined\n );\n\n return (\n <Stack\n data-ui-id=\"notifications-stack\"\n style={{\n width: 'fit-content'\n }}\n >\n {activeNotifications.map((notification, index) => {\n if (index < maxNotificationsToShow) {\n const onDismiss = (): void => {\n trackDismissedNotificationsInternally\n ? setDismissedNotifications(dismissNotification(dismissedNotifications, notification))\n : props.onDismissNotification?.(notification);\n notification.onDismiss && notification.onDismiss();\n };\n /* @conditional-compile-remove(breakout-rooms) */\n if (notification.type === 'assignedBreakoutRoomOpenedPromptJoin') {\n // If notification is of type assignedBreakoutRoomOpenedPromptJoin then set onClickSecondaryButton to\n // onDismiss if it is not defined\n notification.onClickSecondaryButton = notification.onClickSecondaryButton\n ? notification.onClickSecondaryButton\n : () => onDismiss();\n }\n return (\n <div key={index} style={{ marginBottom: `${index === maxNotificationsToShow - 1 ? 0 : '0.25rem'}` }}>\n <Notification\n notificationStrings={strings ? strings[notification.type] : undefined}\n notificationIconProps={NotificationIconProps(notification.type)}\n onClickPrimaryButton={() => notification.onClickPrimaryButton?.()}\n onClickSecondaryButton={() => notification.onClickSecondaryButton?.()}\n onDismiss={onDismiss}\n showStackedEffect={\n index === maxNotificationsToShow - 1 && activeNotifications.length > maxNotificationsToShow\n }\n autoDismiss={notification.autoDismiss}\n ariaLive={notification.ariaLive}\n />\n </div>\n );\n } else {\n return <></>;\n }\n })}\n </Stack>\n );\n};\n"]}
|
1
|
+
{"version":3,"file":"NotificationStack.js","sourceRoot":"","sources":["../../../../../../react-components/src/components/NotificationStack.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAExC,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAEL,qBAAqB,EACrB,mBAAmB,EACnB,sCAAsC,EACtC,mBAAmB,EACpB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,YAAY,EAAuB,MAAM,gBAAgB,CAAC;AAkUnE;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,KAA6B,EAAe,EAAE;;IAC9E,MAAM,aAAa,GAAG,SAAS,EAAE,CAAC,OAAO,CAAC,iBAAiB,CAAC;IAC5D,MAAM,OAAO,GAAG,MAAA,KAAK,CAAC,OAAO,mCAAI,aAAa,CAAC;IAC/C,MAAM,sBAAsB,GAAG,MAAA,KAAK,CAAC,sBAAsB,mCAAI,CAAC,CAAC;IAEjE,MAAM,qCAAqC,GAAG,CAAC,KAAK,CAAC,qBAAqB,CAAC;IAE3E,sDAAsD;IACtD,yDAAyD;IACzD,MAAM,cAAc,GAAG,MAAM,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;IAEpD,MAAM,CAAC,sBAAsB,EAAE,yBAAyB,CAAC,GAAG,QAAQ,CAA0B,EAAE,CAAC,CAAC;IAElG,0GAA0G;IAC1G,4EAA4E;IAC5E,SAAS,CAAC,GA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sB,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,EAAE,EAAE;gBACjG,oBAAC,YAAY,IACX,mBAAmB,EAAE,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,EACrE,qBAAqB,EAAE,qBAAqB,CAAC,YAAY,CAAC,IAAI,CAAC,EAC/D,oBAAoB,EAAE,GAAG,EAAE,WAAC,OAAA,MAAA,YAAY,CAAC,oBAAoB,4DAAI,CAAA,EAAA,EACjE,sBAAsB,EAAE,GAAG,EAAE,WAAC,OAAA,MAAA,YAAY,CAAC,sBAAsB,4DAAI,CAAA,EAAA,EACrE,SAAS,EAAE,SAAS,EACpB,iBAAiB,EACf,KAAK,KAAK,sBAAsB,GAAG,CAAC,IAAI,mBAAmB,CAAC,MAAM,GAAG,sBAAsB,EAE7F,WAAW,EAAE,YAAY,CAAC,WAAW,EACrC,QAAQ,EAAE,YAAY,CAAC,QAAQ,GAC/B,CACE,CACP,CAAC;QACJ,CAAC;aAAM,CAAC;YACN,OAAO,yCAAK,CAAC;QACf,CAAC;IACH,CAAC,CAAC,CACI,CACT,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React, { useEffect, useRef, useState } from 'react';\nimport { Stack } from '@fluentui/react';\n\nimport { useLocale } from '../localization';\nimport {\n DismissedNotification,\n NotificationIconProps,\n dismissNotification,\n dropDismissalsForInactiveNotifications,\n notificationsToShow\n} from './utils';\nimport { Notification, NotificationStrings } from './Notification';\n\n/**\n * Props for {@link NotificationStack}.\n * @public\n */\nexport interface NotificationStackProps {\n /**\n * Strings shown on the UI on errors.\n */\n strings?: NotificationStackStrings;\n\n /**\n * Currently active notifications.\n */\n activeNotifications: ActiveNotification[];\n\n /**\n * Max notifications to show at a time.\n * @defaultValue 2\n */\n maxNotificationsToShow?: number;\n\n /**\n * Callback called when the dismiss button is triggered.\n * Use this to control notifications shown when they dismissed by the user.\n * Note this onDismiss function will affect all notifications in the same stack\n */\n onDismissNotification?: (dismissedNotification: ActiveNotification) => void;\n\n /**\n * If set, notifications with {@link ActiveNotification.timestamp} older than the time this component is mounted\n * are not shown.\n *\n * This is useful when using the {@link NotificationStack} with a stateful client that handles more than one call\n * or chat thread. Set this prop to ignore notifications from previous call or chat.\n *\n * @defaultValue false\n */\n ignorePremountNotifications?: boolean;\n}\n\n/**\n * All strings that may be shown on the UI in the {@link NotificationStack}.\n *\n * @public\n */\nexport interface NotificationStackStrings {\n /**\n * A generic message when starting video fails.\n */\n startVideoGeneric?: NotificationStrings;\n\n /**\n * A generic message when starting video fails.\n */\n stopVideoGeneric?: NotificationStrings;\n\n /**\n * A generic message when muting microphone fails.\n */\n muteGeneric?: NotificationStrings;\n\n /**\n * A generic message when unmuting microphone fails.\n */\n unmuteGeneric?: NotificationStrings;\n\n /**\n * A generic message when starting screenshare fails.\n */\n startScreenShareGeneric?: NotificationStrings;\n\n /**\n * A generic message when stopping screenshare fails.\n */\n stopScreenShareGeneric?: NotificationStrings;\n\n /**\n * Message shown when poor network quality is detected during a call.\n */\n callNetworkQualityLow?: NotificationStrings;\n /**\n * Message shown when poor network quality is detected during a teams meetings.\n * Contains actions to open phone info modal.\n */\n teamsMeetingCallNetworkQualityLow?: NotificationStrings;\n /**\n * Message shown on failure to detect audio output devices.\n */\n callNoSpeakerFound?: NotificationStrings;\n\n /**\n * Message shown on failure to detect audio input devices.\n */\n callNoMicrophoneFound?: NotificationStrings;\n\n /**\n * Message shown when microphone can be enumerated but access is blocked by the system.\n */\n callMicrophoneAccessDenied?: NotificationStrings;\n\n /**\n * Message shown when microphone can be enumerated but access is blocked by the system, for safari browsers\n */\n callMicrophoneAccessDeniedSafari?: NotificationStrings;\n\n /**\n * Message shown when microphone is muted by the system (not by local or remote participants)\n */\n callMicrophoneMutedBySystem?: NotificationStrings;\n\n /**\n * Message shown when microphone is unmuted by the system (not by local or remote participants).\n * This typically occurs if the system recovers from an unexpected mute.\n */\n callMicrophoneUnmutedBySystem?: NotificationStrings;\n\n /**\n * Mac OS specific message shown when microphone can be enumerated but access is\n * blocked by the system.\n */\n callMacOsMicrophoneAccessDenied?: NotificationStrings;\n\n /**\n * Message shown when poor network causes local video stream to be frozen.\n */\n callLocalVideoFreeze?: NotificationStrings;\n\n /**\n * Message shown when camera can be enumerated but access is blocked by the system.\n */\n callCameraAccessDenied?: NotificationStrings;\n\n /**\n * Message shown when camera can be enumerated but access is blocked by the system, for safari browsers\n */\n callCameraAccessDeniedSafari?: NotificationStrings;\n\n /**\n * Message shown when local video fails to start because camera is already in use by\n * another applciation.\n */\n callCameraAlreadyInUse?: NotificationStrings;\n\n /**\n * Message shown when local video is stopped by the system (not by local or remote participants)\n */\n callVideoStoppedBySystem?: NotificationStrings;\n\n /**\n * Message shown when local video was recovered by the system (not by the local participant)\n */\n callVideoRecoveredBySystem?: NotificationStrings;\n\n /**\n * Mac OS specific message shown when system denies access to camera.\n */\n callMacOsCameraAccessDenied?: NotificationStrings;\n\n /**\n * Mac OS specific message shown when system denies sharing local screen on a call.\n */\n callMacOsScreenShareAccessDenied?: NotificationStrings;\n\n /**\n * Dimiss Notifications button aria label read by screen reader accessibility tools\n */\n dismissButtonAriaLabel?: NotificationStrings;\n\n /**\n * An error message when joining a call fails.\n */\n failedToJoinCallGeneric?: NotificationStrings;\n\n /**\n * An error message when joining a call fails specifically due to an invalid meeting link.\n */\n failedToJoinCallInvalidMeetingLink?: NotificationStrings;\n /**\n * Error string letting you know remote participants see a frozen stream for you.\n */\n cameraFrozenForRemoteParticipants?: NotificationStrings;\n /**\n * Unable to start effect\n */\n unableToStartVideoEffect?: NotificationStrings;\n /**\n * An error message when starting spotlight while max participants are spotlighted\n */\n startSpotlightWhileMaxParticipantsAreSpotlighted?: NotificationStrings;\n /**\n * Muted by a remote participant message\n */\n mutedByRemoteParticipant?: NotificationStrings;\n /**\n * Speaking while muted message\n */\n speakingWhileMuted?: NotificationStrings;\n /**\n * Recording started message\n */\n recordingStarted?: NotificationStrings;\n /**\n * Transcription started message\n */\n transcriptionStarted?: NotificationStrings;\n /**\n * Recording stopped message\n */\n recordingStopped?: NotificationStrings;\n /**\n * Transcription stopped message\n */\n transcriptionStopped?: NotificationStrings;\n /**\n * Recording and transcription both started message\n */\n recordingAndTranscriptionStarted?: NotificationStrings;\n /**\n * Recording and transcription both stopped message\n */\n recordingAndTranscriptionStopped?: NotificationStrings;\n /**\n * Recording stopped but transcription still going on message\n */\n recordingStoppedStillTranscribing?: NotificationStrings;\n /**\n * Transcription stopped but recording still going on message\n */\n transcriptionStoppedStillRecording?: NotificationStrings;\n /* @conditional-compile-remove(breakout-rooms) */\n /**\n * Message shown in notification when the user will be automatically to their assigned breakout room that is opened\n */\n assignedBreakoutRoomOpened?: NotificationStrings;\n /* @conditional-compile-remove(breakout-rooms) */\n /**\n * Message shown in notification when the user is prompted to join their assigned breakout room that is opened\n */\n assignedBreakoutRoomOpenedPromptJoin?: NotificationStrings;\n /* @conditional-compile-remove(breakout-rooms) */\n /**\n * Message shown in notification when the user is assigned breakout room is changed\n */\n assignedBreakoutRoomChanged?: NotificationStrings;\n /* @conditional-compile-remove(breakout-rooms) */\n /**\n * Message shown in notification when breakout room is joined\n */\n breakoutRoomJoined?: NotificationStrings;\n /* @conditional-compile-remove(breakout-rooms) */\n /**\n * Message shown in notification when breakout room is closing soon\n */\n breakoutRoomClosingSoon?: NotificationStrings;\n\n /* @conditional-compile-remove(media-access) */\n capabilityTurnVideoOnPresent?: NotificationStrings;\n\n /* @conditional-compile-remove(media-access) */\n capabilityTurnVideoOnAbsent?: NotificationStrings;\n\n /* @conditional-compile-remove(media-access) */\n capabilityUnmuteMicPresent?: NotificationStrings;\n\n /* @conditional-compile-remove(media-access) */\n capabilityUnmuteMicAbsent?: NotificationStrings;\n}\n\n/**\n * All notifications that can be shown in the {@link NotificationStack}.\n *\n * @public\n */\nexport type NotificationType = keyof NotificationStackStrings;\n\n/**\n * Active notifications to be shown via {@link NotificationStack}.\n *\n * @public\n */\nexport interface ActiveNotification {\n /**\n * Type of error that is active.\n */\n type: NotificationType;\n /**\n * Callback called when the primary button inside notification bar is clicked.\n */\n onClickPrimaryButton?: () => void;\n\n /**\n * Callback called when the primary button inside notification bar is clicked.\n */\n onClickSecondaryButton?: () => void;\n\n /**\n * Callback called when the notification is dismissed.\n */\n onDismiss?: () => void;\n\n /**\n * If set, notification will automatically dismiss after 5 seconds\n */\n autoDismiss?: boolean;\n\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 * Aria-live property for the notification.\n * @defaultValue polite\n */\n ariaLive?: 'assertive' | 'off' | 'polite';\n}\n\n/**\n * A component to show notifications on the UI.\n * All strings that can be shown are accepted as the {@link NotificationStackProps.strings} so that they can be localized.\n * Active notifications are selected by {@link NotificationStackProps.activeNotifications}.\n *\n * This component internally tracks dismissed by the user.\n * * Notifications that have an associated timestamp: The notification is shown on the UI again if it occurs after being dismissed.\n * * Notifications that do not have a timestamp: The notification is dismissed until it disappears from the props.\n * If the notification recurs, it is shown in the UI.\n *\n *\n * @public\n */\nexport const NotificationStack = (props: NotificationStackProps): JSX.Element => {\n const localeStrings = useLocale().strings.notificationStack;\n const strings = props.strings ?? localeStrings;\n const maxNotificationsToShow = props.maxNotificationsToShow ?? 2;\n\n const trackDismissedNotificationsInternally = !props.onDismissNotification;\n\n // Timestamp for when this comopnent is first mounted.\n // Never updated through the lifecycle of this component.\n const mountTimestamp = useRef(new Date(Date.now()));\n\n const [dismissedNotifications, setDismissedNotifications] = useState<DismissedNotification[]>([]);\n\n // dropDismissalsForInactiveNotifications only returns a new object if `dismissedErrors` actually changes.\n // Without this behaviour, this `useEffect` block would cause a render loop.\n useEffect(() => {\n trackDismissedNotificationsInternally &&\n setDismissedNotifications(\n dropDismissalsForInactiveNotifications(props.activeNotifications, dismissedNotifications)\n );\n }, [props.activeNotifications, dismissedNotifications, trackDismissedNotificationsInternally]);\n\n const activeNotifications = notificationsToShow(\n props.activeNotifications,\n dismissedNotifications,\n props.ignorePremountNotifications ? mountTimestamp.current : undefined\n );\n\n return (\n <Stack\n data-ui-id=\"notifications-stack\"\n style={{\n width: 'fit-content'\n }}\n >\n {activeNotifications.map((notification, index) => {\n if (index < maxNotificationsToShow) {\n const onDismiss = (): void => {\n trackDismissedNotificationsInternally\n ? setDismissedNotifications(dismissNotification(dismissedNotifications, notification))\n : props.onDismissNotification?.(notification);\n notification.onDismiss && notification.onDismiss();\n };\n /* @conditional-compile-remove(breakout-rooms) */\n if (notification.type === 'assignedBreakoutRoomOpenedPromptJoin') {\n // If notification is of type assignedBreakoutRoomOpenedPromptJoin then set onClickSecondaryButton to\n // onDismiss if it is not defined\n notification.onClickSecondaryButton = notification.onClickSecondaryButton\n ? notification.onClickSecondaryButton\n : () => onDismiss();\n }\n return (\n <div key={index} style={{ marginBottom: `${index === maxNotificationsToShow - 1 ? 0 : '0.25rem'}` }}>\n <Notification\n notificationStrings={strings ? strings[notification.type] : undefined}\n notificationIconProps={NotificationIconProps(notification.type)}\n onClickPrimaryButton={() => notification.onClickPrimaryButton?.()}\n onClickSecondaryButton={() => notification.onClickSecondaryButton?.()}\n onDismiss={onDismiss}\n showStackedEffect={\n index === maxNotificationsToShow - 1 && activeNotifications.length > maxNotificationsToShow\n }\n autoDismiss={notification.autoDismiss}\n ariaLive={notification.ariaLive}\n />\n </div>\n );\n } else {\n return <></>;\n }\n })}\n </Stack>\n );\n};\n"]}
|
@@ -1,48 +1,24 @@
|
|
1
|
-
import { CreateVideoStreamViewResult,
|
1
|
+
import { CreateVideoStreamViewResult, VideoGalleryStream, VideoStreamOptions } from './VideoGalleryParticipant';
|
2
2
|
/**
|
3
3
|
* Interface representing the result of a Together Mode stream view.
|
4
4
|
* @beta
|
5
5
|
*/
|
6
|
-
export interface
|
7
|
-
|
6
|
+
export interface TogetherModeStreamOptions extends VideoStreamOptions {
|
7
|
+
viewKind?: 'main' | 'panoramic';
|
8
8
|
}
|
9
9
|
/**
|
10
|
-
*
|
10
|
+
* Interface representing the result of a Together Mode stream view.
|
11
11
|
* @beta
|
12
12
|
*/
|
13
|
-
export interface
|
14
|
-
|
15
|
-
* Flag indicating whether the video stream is available for rendering
|
16
|
-
*/
|
17
|
-
isAvailable?: boolean;
|
18
|
-
/**
|
19
|
-
* Flag indicating whether the together mode stream is packets are being received.
|
20
|
-
*/
|
21
|
-
isReceiving?: boolean;
|
22
|
-
/**
|
23
|
-
* The HTML element used to render the video stream.
|
24
|
-
*
|
25
|
-
*/
|
26
|
-
renderElement?: HTMLElement;
|
27
|
-
/**
|
28
|
-
* Scaling mode of the video stream
|
29
|
-
*/
|
30
|
-
scalingMode?: ViewScalingMode;
|
31
|
-
/**
|
32
|
-
* The size of the video stream.
|
33
|
-
*
|
34
|
-
*/
|
35
|
-
streamSize?: {
|
36
|
-
width: number;
|
37
|
-
height: number;
|
38
|
-
};
|
13
|
+
export interface TogetherModeStreamViewResult {
|
14
|
+
mainVideoView?: CreateVideoStreamViewResult;
|
39
15
|
}
|
40
16
|
/**
|
41
17
|
* Interface representing the streams in Together Mode.
|
42
18
|
* @beta
|
43
19
|
*/
|
44
20
|
export interface VideoGalleryTogetherModeStreams {
|
45
|
-
mainVideoStream?:
|
21
|
+
mainVideoStream?: VideoGalleryStream;
|
46
22
|
}
|
47
23
|
/**
|
48
24
|
* Interface representing the seating information in Together Mode.
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"TogetherModeTypes.js","sourceRoot":"","sources":["../../../../../../react-components/src/types/TogetherModeTypes.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/* @conditional-compile-remove(together-mode) */\nimport { CreateVideoStreamViewResult,
|
1
|
+
{"version":3,"file":"TogetherModeTypes.js","sourceRoot":"","sources":["../../../../../../react-components/src/types/TogetherModeTypes.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/* @conditional-compile-remove(together-mode) */\nimport { CreateVideoStreamViewResult, VideoGalleryStream, VideoStreamOptions } from './VideoGalleryParticipant';\n\n/* @conditional-compile-remove(together-mode) */\n/**\n * Interface representing the result of a Together Mode stream view.\n * @beta\n */\nexport interface TogetherModeStreamOptions extends VideoStreamOptions {\n viewKind?: 'main' | 'panoramic';\n}\n/* @conditional-compile-remove(together-mode) */\n/**\n * Interface representing the result of a Together Mode stream view.\n * @beta\n */\nexport interface TogetherModeStreamViewResult {\n mainVideoView?: CreateVideoStreamViewResult;\n}\n\n/* @conditional-compile-remove(together-mode) */\n/**\n * Interface representing the streams in Together Mode.\n * @beta\n */\nexport interface VideoGalleryTogetherModeStreams {\n mainVideoStream?: VideoGalleryStream;\n}\n\n/* @conditional-compile-remove(together-mode) */\n/**\n * Interface representing the seating information in Together Mode.\n * @beta\n */\nexport interface VideoGalleryTogetherModeSeatingInfo {\n /* The top left offset from the top of the together mode view.*/\n top: number;\n /* The left offset position from the left of the together mode view. */\n left: number;\n /* The width of the seating area */\n width: number;\n /* The height of the seating area. */\n height: number;\n}\n\n/* @conditional-compile-remove(together-mode) */\n/**\n * Interface representing the position of a participant in Together Mode.\n * @beta\n */\nexport type VideoGalleryTogetherModeParticipantPosition = Record<string, VideoGalleryTogetherModeSeatingInfo>;\n"]}
|
@@ -39,8 +39,10 @@ export type VideoGalleryParticipant = {
|
|
39
39
|
spotlight?: Spotlight;
|
40
40
|
/** Signal strength of the participant, range from 1 to 3, lower means better connection **/
|
41
41
|
signalStrength?: number;
|
42
|
-
/** audio video access states **/
|
42
|
+
/** Media audio video access states **/
|
43
43
|
mediaAccess?: MediaAccess;
|
44
|
+
/** Participant user role **/
|
45
|
+
role?: string;
|
44
46
|
};
|
45
47
|
/**
|
46
48
|
* Video stream of a participant in {@link VideoGallery}.
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"VideoGalleryParticipant.js","sourceRoot":"","sources":["../../../../../../react-components/src/types/VideoGalleryParticipant.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n ParticipantState,\n /* @conditional-compile-remove(media-access) */\n MediaAccess\n} from './ParticipantListParticipant';\n\nimport { RaisedHand } from './ParticipantListParticipant';\nimport { Reaction } from './ParticipantListParticipant';\nimport { Spotlight } from './ParticipantListParticipant';\n/**\n * Scaling mode of a {@link VideoGalleryStream}.\n *\n * @public\n */\nexport type ViewScalingMode = 'Stretch' | 'Crop' | 'Fit';\n\n/**\n * Options to control how video streams are rendered.\n *\n * @public\n */\nexport declare interface VideoStreamOptions {\n /** Whether the video stream is mirrored or not */\n isMirrored?: boolean;\n /** Scaling mode. It can be `Stretch`, `Crop` or `Fit` */\n scalingMode?: ViewScalingMode;\n}\n\n/**\n * The state of a participant in the {@link VideoGallery}.\n *\n * @public\n */\nexport type VideoGalleryParticipant = {\n /** User ID of participant */\n userId: string;\n /** Whether participant is muted */\n isMuted?: boolean;\n /** Display name of participant */\n displayName?: string;\n /** Video stream of participant */\n videoStream?: VideoGalleryStream;\n /** Whether participant is screen sharing or not */\n isScreenSharingOn?: boolean;\n /** Whether participant is spotlighted **/\n spotlight?: Spotlight;\n /* @conditional-compile-remove(remote-ufd) */\n /** Signal strength of the participant, range from 1 to 3, lower means better connection **/\n signalStrength?: number;\n /* @conditional-compile-remove(media-access) */\n /** audio video access states **/\n mediaAccess?: MediaAccess;\n};\n\n/**\n * Video stream of a participant in {@link VideoGallery}.\n *\n * @public\n */\nexport interface VideoGalleryStream {\n /** ID of the video stream */\n id?: number;\n /** Whether the video stream is available or not */\n isAvailable?: boolean;\n /** Whether the video stream is receiving data or not */\n isReceiving?: boolean;\n /** Whether the video stream is mirrored or not */\n isMirrored?: boolean;\n /** Render element of the video stream */\n renderElement?: HTMLElement;\n /** Scaling mode of the video stream */\n scalingMode?: ViewScalingMode;\n /** Stream Size of the video stream */\n streamSize?: { width: number; height: number };\n}\n\n/**\n * Object returned after creating a local or remote VideoStream.\n * This contains helper functions to manipulate the render of the stream.\n *\n * @public\n */\nexport interface CreateVideoStreamViewResult {\n /** View handle of the rendered video stream */\n view: {\n /**\n * Update the scale mode for this view.\n * @param scalingMode - The new scale mode.\n */\n updateScalingMode: (scalingMode: ViewScalingMode) => Promise<void>;\n };\n}\n\n// set the required attribs in selector. (Further simplifying our component logic) For example\n// isLocalVideoReady can be calculated inside selector.\n/**\n * The state of the local participant in the {@link VideoGallery}.\n *\n * @public\n */\nexport interface VideoGalleryLocalParticipant extends VideoGalleryParticipant {\n /** Whether local participant is raised a hand */\n raisedHand?: RaisedHand;\n /**\n * Whether local participant has reacted\n *\n * */\n reaction?: Reaction;\n /** Video stream of shared screen */\n screenShareStream?: VideoGalleryStream;\n}\n\n/**\n * The state of a remote participant in the {@link VideoGallery}.\n *\n * @public\n */\nexport interface VideoGalleryRemoteParticipant extends VideoGalleryParticipant {\n /** Whether participant is speaking or not */\n isSpeaking?: boolean;\n /** Video stream of shared screen */\n screenShareStream?: VideoGalleryStream;\n /**\n * @public\n * The connection state of the participant. For example, 'Hold', 'Connecting' etc.\n */\n state?: ParticipantState;\n /** Whether participant is raised a hand */\n raisedHand?: RaisedHand;\n /**\n * Whether participant has reacted\n *\n * @public\n * */\n reaction?: Reaction;\n /* @conditional-compile-remove(media-access) */\n mediaAccess?: MediaAccess;\n}\n"]}
|
1
|
+
{"version":3,"file":"VideoGalleryParticipant.js","sourceRoot":"","sources":["../../../../../../react-components/src/types/VideoGalleryParticipant.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n ParticipantState,\n /* @conditional-compile-remove(media-access) */\n MediaAccess\n} from './ParticipantListParticipant';\n\nimport { RaisedHand } from './ParticipantListParticipant';\nimport { Reaction } from './ParticipantListParticipant';\nimport { Spotlight } from './ParticipantListParticipant';\n/**\n * Scaling mode of a {@link VideoGalleryStream}.\n *\n * @public\n */\nexport type ViewScalingMode = 'Stretch' | 'Crop' | 'Fit';\n\n/**\n * Options to control how video streams are rendered.\n *\n * @public\n */\nexport declare interface VideoStreamOptions {\n /** Whether the video stream is mirrored or not */\n isMirrored?: boolean;\n /** Scaling mode. It can be `Stretch`, `Crop` or `Fit` */\n scalingMode?: ViewScalingMode;\n}\n\n/**\n * The state of a participant in the {@link VideoGallery}.\n *\n * @public\n */\nexport type VideoGalleryParticipant = {\n /** User ID of participant */\n userId: string;\n /** Whether participant is muted */\n isMuted?: boolean;\n /** Display name of participant */\n displayName?: string;\n /** Video stream of participant */\n videoStream?: VideoGalleryStream;\n /** Whether participant is screen sharing or not */\n isScreenSharingOn?: boolean;\n /** Whether participant is spotlighted **/\n spotlight?: Spotlight;\n /* @conditional-compile-remove(remote-ufd) */\n /** Signal strength of the participant, range from 1 to 3, lower means better connection **/\n signalStrength?: number;\n /* @conditional-compile-remove(media-access) */\n /** Media audio video access states **/\n mediaAccess?: MediaAccess;\n /* @conditional-compile-remove(media-access) */\n /** Participant user role **/\n role?: string;\n};\n\n/**\n * Video stream of a participant in {@link VideoGallery}.\n *\n * @public\n */\nexport interface VideoGalleryStream {\n /** ID of the video stream */\n id?: number;\n /** Whether the video stream is available or not */\n isAvailable?: boolean;\n /** Whether the video stream is receiving data or not */\n isReceiving?: boolean;\n /** Whether the video stream is mirrored or not */\n isMirrored?: boolean;\n /** Render element of the video stream */\n renderElement?: HTMLElement;\n /** Scaling mode of the video stream */\n scalingMode?: ViewScalingMode;\n /** Stream Size of the video stream */\n streamSize?: { width: number; height: number };\n}\n\n/**\n * Object returned after creating a local or remote VideoStream.\n * This contains helper functions to manipulate the render of the stream.\n *\n * @public\n */\nexport interface CreateVideoStreamViewResult {\n /** View handle of the rendered video stream */\n view: {\n /**\n * Update the scale mode for this view.\n * @param scalingMode - The new scale mode.\n */\n updateScalingMode: (scalingMode: ViewScalingMode) => Promise<void>;\n };\n}\n\n// set the required attribs in selector. (Further simplifying our component logic) For example\n// isLocalVideoReady can be calculated inside selector.\n/**\n * The state of the local participant in the {@link VideoGallery}.\n *\n * @public\n */\nexport interface VideoGalleryLocalParticipant extends VideoGalleryParticipant {\n /** Whether local participant is raised a hand */\n raisedHand?: RaisedHand;\n /**\n * Whether local participant has reacted\n *\n * */\n reaction?: Reaction;\n /** Video stream of shared screen */\n screenShareStream?: VideoGalleryStream;\n}\n\n/**\n * The state of a remote participant in the {@link VideoGallery}.\n *\n * @public\n */\nexport interface VideoGalleryRemoteParticipant extends VideoGalleryParticipant {\n /** Whether participant is speaking or not */\n isSpeaking?: boolean;\n /** Video stream of shared screen */\n screenShareStream?: VideoGalleryStream;\n /**\n * @public\n * The connection state of the participant. For example, 'Hold', 'Connecting' etc.\n */\n state?: ParticipantState;\n /** Whether participant is raised a hand */\n raisedHand?: RaisedHand;\n /**\n * Whether participant has reacted\n *\n * @public\n * */\n reaction?: Reaction;\n /* @conditional-compile-remove(media-access) */\n mediaAccess?: MediaAccess;\n}\n"]}
|
@@ -15,5 +15,5 @@ export declare const ACSAudioProvider: (props: ACSAudioProviderProps) => JSX.Ele
|
|
15
15
|
/**
|
16
16
|
* @private
|
17
17
|
*/
|
18
|
-
export declare const useAudio: () => AudioContext;
|
18
|
+
export declare const useAudio: () => AudioContext | undefined;
|
19
19
|
//# sourceMappingURL=AudioProvider.d.ts.map
|
@@ -1,6 +1,6 @@
|
|
1
1
|
// Copyright (c) Microsoft Corporation.
|
2
2
|
// Licensed under the MIT License.
|
3
|
-
import React, { useContext, createContext } from 'react';
|
3
|
+
import React, { useContext, createContext, useState, useEffect } from 'react';
|
4
4
|
/**
|
5
5
|
*
|
6
6
|
* @param props
|
@@ -8,16 +8,21 @@ import React, { useContext, createContext } from 'react';
|
|
8
8
|
*/
|
9
9
|
export const ACSAudioProvider = (props) => {
|
10
10
|
const { audioContext, children } = props;
|
11
|
+
const [stateAudioContext, setStateAudioContext] = useState(undefined);
|
12
|
+
useEffect(() => {
|
13
|
+
// Create the AudioContext only when the component is rendered
|
14
|
+
setStateAudioContext(audioContext);
|
15
|
+
}, [audioContext]);
|
11
16
|
const alreadyWrapped = useAudio();
|
12
17
|
if (alreadyWrapped) {
|
13
18
|
return React.createElement(React.Fragment, null, children);
|
14
19
|
}
|
15
|
-
return React.createElement(ACSAudioContext.Provider, { value:
|
20
|
+
return React.createElement(ACSAudioContext.Provider, { value: stateAudioContext }, props.children);
|
16
21
|
};
|
17
22
|
/**
|
18
23
|
* @private
|
19
24
|
*/
|
20
|
-
const ACSAudioContext = createContext(
|
25
|
+
const ACSAudioContext = createContext(undefined);
|
21
26
|
/**
|
22
27
|
* @private
|
23
28
|
*/
|
@@ -1 +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;
|
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,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAU9E;;;;GAIG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,KAA4B,EAAe,EAAE;IAC5E,MAAM,EAAE,YAAY,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IACzC,MAAM,CAAC,iBAAiB,EAAE,oBAAoB,CAAC,GAAG,QAAQ,CAA2B,SAAS,CAAC,CAAC;IAEhG,SAAS,CAAC,GAAG,EAAE;QACb,8DAA8D;QAC9D,oBAAoB,CAAC,YAAY,CAAC,CAAC;IACrC,CAAC,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC;IAEnB,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,iBAAiB,IAAG,KAAK,CAAC,QAAQ,CAA4B,CAAC;AACzG,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,eAAe,GAAG,aAAa,CAA2B,SAAS,CAAC,CAAC;AAE3E;;GAEG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,GAA6B,EAAE,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React, { useContext, createContext, useState, useEffect } 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 [stateAudioContext, setStateAudioContext] = useState<AudioContext | undefined>(undefined);\n\n useEffect(() => {\n // Create the AudioContext only when the component is rendered\n setStateAudioContext(audioContext);\n }, [audioContext]);\n\n const alreadyWrapped = useAudio();\n if (alreadyWrapped) {\n return <>{children}</>;\n }\n return <ACSAudioContext.Provider value={stateAudioContext}>{props.children}</ACSAudioContext.Provider>;\n};\n\n/**\n * @private\n */\nconst ACSAudioContext = createContext<AudioContext | undefined>(undefined);\n\n/**\n * @private\n */\nexport const useAudio = (): AudioContext | undefined => useContext(ACSAudioContext);\n"]}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@azure/communication-react",
|
3
|
-
"version": "1.22.0-alpha-
|
3
|
+
"version": "1.22.0-alpha-202412100018",
|
4
4
|
"sideEffects": false,
|
5
5
|
"description": "React library for building modern communication user experiences utilizing Azure Communication Services",
|
6
6
|
"keywords": [
|
@@ -55,7 +55,7 @@
|
|
55
55
|
"uuid": "^9.0.0"
|
56
56
|
},
|
57
57
|
"peerDependencies": {
|
58
|
-
"@azure/communication-calling": "1.
|
58
|
+
"@azure/communication-calling": "1.32.1-beta.1",
|
59
59
|
"@azure/communication-calling-effects": "^1.1.2",
|
60
60
|
"@azure/communication-chat": "1.6.0-beta.3",
|
61
61
|
"@types/react": ">=16.8.0 <19.0.0",
|