@azure/communication-react 1.20.0-alpha-202410100016 → 1.20.0-alpha-202410110016

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.
Files changed (38) hide show
  1. package/dist/communication-react.d.ts +3 -25
  2. package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-Dk_okMwX.js → ChatMessageComponentAsRichTextEditBox-B1i-YRoN.js} +2 -2
  3. package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-Dk_okMwX.js.map → ChatMessageComponentAsRichTextEditBox-B1i-YRoN.js.map} +1 -1
  4. package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-C36s6eLH.js → RichTextSendBoxWrapper-D5odi2AE.js} +2 -2
  5. package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-C36s6eLH.js.map → RichTextSendBoxWrapper-D5odi2AE.js.map} +1 -1
  6. package/dist/dist-cjs/communication-react/{index-C548hWR1.js → index-BYN3MK0Z.js} +21 -14
  7. package/dist/dist-cjs/communication-react/index-BYN3MK0Z.js.map +1 -0
  8. package/dist/dist-cjs/communication-react/index.js +1 -1
  9. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
  10. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
  11. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.d.ts +1 -1
  12. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js.map +1 -1
  13. package/dist/dist-esm/react-components/src/components/MicrophoneButton.d.ts +0 -9
  14. package/dist/dist-esm/react-components/src/components/MicrophoneButton.js.map +1 -1
  15. package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideo.js +6 -2
  16. package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideo.js.map +1 -1
  17. package/dist/dist-esm/react-components/src/components/VideoGallery.js +3 -3
  18. package/dist/dist-esm/react-components/src/components/VideoGallery.js.map +1 -1
  19. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.d.ts +0 -1
  20. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
  21. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts +0 -5
  22. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js.map +1 -1
  23. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js +3 -1
  24. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js.map +1 -1
  25. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.d.ts +0 -4
  26. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.js.map +1 -1
  27. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.d.ts +0 -3
  28. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js.map +1 -1
  29. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js +3 -1
  30. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js.map +1 -1
  31. package/dist/dist-esm/react-composites/src/composites/common/resolveDeepNoiseSuppressionDependency.d.ts +1 -1
  32. package/dist/dist-esm/react-composites/src/composites/common/resolveDeepNoiseSuppressionDependency.js +1 -1
  33. package/dist/dist-esm/react-composites/src/composites/common/resolveDeepNoiseSuppressionDependency.js.map +1 -1
  34. package/dist/dist-esm/react-composites/src/composites/common/resolveDeepNoiseSuppressionDependencyLazy.d.ts +1 -1
  35. package/dist/dist-esm/react-composites/src/composites/common/resolveDeepNoiseSuppressionDependencyLazy.js +1 -1
  36. package/dist/dist-esm/react-composites/src/composites/common/resolveDeepNoiseSuppressionDependencyLazy.js.map +1 -1
  37. package/package.json +1 -1
  38. package/dist/dist-cjs/communication-react/index-C548hWR1.js.map +0 -1
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-C548hWR1.js');
3
+ var index = require('./index-BYN3MK0Z.js');
4
4
  require('react');
5
5
  require('@fluentui/react');
6
6
  require('@fluentui/react-components');
@@ -2,5 +2,5 @@
2
2
  // Copyright (c) Microsoft Corporation.
3
3
  // Licensed under the MIT License.
4
4
  // GENERATED FILE. DO NOT EDIT MANUALLY.
5
- module.exports = '1.20.0-alpha-202410100016';
5
+ module.exports = '1.20.0-alpha-202410110016';
6
6
  //# sourceMappingURL=telemetryVersion.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"telemetryVersion.js","sourceRoot":"","sources":["../../../../../acs-ui-common/src/telemetryVersion.js"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;AAElC,wCAAwC;AAExC,MAAM,CAAC,OAAO,GAAG,2BAA2B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n// GENERATED FILE. DO NOT EDIT MANUALLY.\n\nmodule.exports = '1.20.0-alpha-202410100016';\n"]}
1
+ {"version":3,"file":"telemetryVersion.js","sourceRoot":"","sources":["../../../../../acs-ui-common/src/telemetryVersion.js"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;AAElC,wCAAwC;AAExC,MAAM,CAAC,OAAO,GAAG,2BAA2B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n// GENERATED FILE. DO NOT EDIT MANUALLY.\n\nmodule.exports = '1.20.0-alpha-202410110016';\n"]}
@@ -94,7 +94,7 @@ export type VideoBackgroundEffectsDependency = {
94
94
  /**
95
95
  * Dependency type to be injected for deep noise suppression
96
96
  *
97
- * @beta
97
+ * @public
98
98
  */
99
99
  export type DeepNoiseSuppressionEffectDependency = {
100
100
  deepNoiseSuppressionEffect: AudioEffectsStartConfig;
@@ -1 +1 @@
1
- {"version":3,"file":"createCommonHandlers.js","sourceRoot":"","sources":["../../../../../../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AAC,MAAM,EAAE,EAAE,CAAC,0BAA0B,CAAC,MAAM,CAAC,CAAC,CAAC;YAClF,MAAM,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,OAAO,CAAC,QAAQ,CAAC,SAAS,EAAE,aAAa,CAAC,YAAY,CAAC,CAAA,CAAC;QACtE,CAAC,CAAA;QACH,CAAC,CAAC,SAAS,CAAC;IAEd,OAAO;QACL,QAAQ;QACR,YAAY;QACZ,cAAc;QACd,kBAAkB;QAClB,eAAe;QACf,kBAAkB;QAClB,iBAAiB;QACjB,cAAc;QACd,kBAAkB;QAClB,mBAAmB;QACnB,uBAAuB;QACvB,wBAAwB;QACxB,iBAAiB;QACjB,yBAAyB;QACzB,wBAAwB;QACxB,oCAAoC;QACpC,mCAAmC;QACnC,8BAA8B;QAC9B,WAAW;QACX,WAAW;QACX,iBAAiB;QACjB,eAAe,EAAE,eAAe;QAChC,gBAAgB,EAAE,cAAc;QAChC,mBAAmB,EAAE,cAAc;QACnC,WAAW,EAAE,cAAc;QAC3B,cAAc;QACd,iDAAiD;QACjD,mBAAmB;QACnB,8BAA8B;QAC9B,qBAAqB;QACrB,wBAAwB;QACxB,sCAAsC;QACtC,6BAA6B;QAC7B,sCAAsC;QACtC,4BAA4B;QAC5B,eAAe;QACf,cAAc;QACd,oBAAoB;QACpB,mBAAmB;QACnB,cAAc;QACd,gBAAgB;QAChB,eAAe;QACf,kBAAkB;QAClB,qBAAqB;QACrB,oBAAoB;QACpB,sBAAsB;QACtB,qBAAqB;QACrB,4CAA4C;QAC5C,iBAAiB;QACjB,4CAA4C;QAC5C,2BAA2B;QAC3B,YAAY,EAAE,cAAc;QAC5B,YAAY,EAAE,cAAc;KAC7B,CAAC;AACJ,CAAC,CACF,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n AudioDeviceInfo,\n Call,\n LocalVideoStream,\n StartCallOptions,\n VideoDeviceInfo,\n BackgroundBlurEffect,\n BackgroundReplacementEffect,\n BackgroundBlurConfig,\n BackgroundReplacementConfig\n} from '@azure/communication-calling';\n/* @conditional-compile-remove(DNS) */\nimport { AudioEffectsStartConfig, AudioEffectsStopConfig } from '@azure/communication-calling';\n/* @conditional-compile-remove(soft-mute) */\nimport { RemoteParticipant } from '@azure/communication-calling';\nimport { CallSurvey, CallSurveyResponse } from '@azure/communication-calling';\nimport { DtmfTone } from '@azure/communication-calling';\nimport { AddPhoneNumberOptions } from '@azure/communication-calling';\n/* @conditional-compile-remove(teams-identity-support) */\nimport { TeamsCall } from '@azure/communication-calling';\n/* @conditional-compile-remove(call-readiness) */\nimport { PermissionConstraints } from '@azure/communication-calling';\nimport { toFlatCommunicationIdentifier } from '@internal/acs-ui-common';\nimport { _toCommunicationIdentifier } from '@internal/acs-ui-common';\nimport { CreateViewResult, StatefulCallClient, StatefulDeviceManager } from '@internal/calling-stateful-client';\nimport memoizeOne from 'memoize-one';\nimport { CreateVideoStreamViewResult, VideoStreamOptions } from '@internal/react-components';\nimport { disposeAllLocalPreviewViews, _isInCall, _isInLobbyOrConnecting, _isPreviewOn } from '../utils/callUtils';\nimport { CommunicationUserIdentifier, PhoneNumberIdentifier } from '@azure/communication-common';\nimport { CommunicationIdentifier } from '@azure/communication-common';\nimport { Features } from '@azure/communication-calling';\nimport { TeamsCaptions } from '@azure/communication-calling';\nimport { Reaction } from '@azure/communication-calling';\nimport { _ComponentCallingHandlers } from './createHandlers';\n\n/**\n * Object containing all the handlers required for calling components.\n *\n * Calling related components from this package are able to pick out relevant handlers from this object.\n * See {@link useHandlers} and {@link usePropsFor}.\n *\n * @public\n */\nexport interface CommonCallingHandlers {\n onStartLocalVideo: () => Promise<void>;\n onToggleCamera: (options?: VideoStreamOptions) => Promise<void>;\n onSelectMicrophone: (device: AudioDeviceInfo) => Promise<void>;\n onSelectSpeaker: (device: AudioDeviceInfo) => Promise<void>;\n onSelectCamera: (device: VideoDeviceInfo, options?: VideoStreamOptions) => Promise<void>;\n onToggleMicrophone: () => Promise<void>;\n onStartScreenShare: () => Promise<void>;\n onStopScreenShare: () => Promise<void>;\n onToggleScreenShare: () => Promise<void>;\n onHangUp: (forEveryone?: boolean) => Promise<void>;\n onRaiseHand: () => Promise<void>;\n onLowerHand: () => Promise<void>;\n onToggleRaiseHand: () => Promise<void>;\n onReactionClick: (reaction: Reaction) => Promise<void>;\n onToggleHold: () => Promise<void>;\n onAddParticipant(participant: CommunicationUserIdentifier): Promise<void>;\n onAddParticipant(participant: PhoneNumberIdentifier, options: AddPhoneNumberOptions): Promise<void>;\n onCreateLocalStreamView: (options?: VideoStreamOptions) => Promise<void | CreateVideoStreamViewResult>;\n onCreateRemoteStreamView: (\n userId: string,\n options?: VideoStreamOptions\n ) => Promise<void | CreateVideoStreamViewResult>;\n /**\n * @deprecated use {@link onDisposeRemoteVideoStreamView} and {@link onDisposeRemoteScreenShareStreamView} instead.\n */\n onDisposeRemoteStreamView: (userId: string) => Promise<void>;\n onDisposeLocalStreamView: () => Promise<void>;\n onDisposeRemoteVideoStreamView: (userId: string) => Promise<void>;\n onDisposeRemoteScreenShareStreamView: (userId: string) => Promise<void>;\n onDisposeLocalScreenShareStreamView: () => Promise<void>;\n onSendDtmfTone: (dtmfTone: DtmfTone) => Promise<void>;\n onRemoveParticipant(userId: string): Promise<void>;\n\n onRemoveParticipant(participant: CommunicationIdentifier): Promise<void>;\n /* @conditional-compile-remove(call-readiness) */\n askDevicePermission: (constrain: PermissionConstraints) => Promise<void>;\n onStartCall: (participants: CommunicationIdentifier[], options?: StartCallOptions) => void;\n onAcceptCall: (incomingCallId: string, useVideo?: boolean) => Promise<void>;\n onRejectCall: (incomingCallId: string) => Promise<void>;\n onRemoveVideoBackgroundEffects: () => Promise<void>;\n\n onBlurVideoBackground: (backgroundBlurConfig?: BackgroundBlurConfig) => Promise<void>;\n\n onReplaceVideoBackground: (backgroundReplacementConfig: BackgroundReplacementConfig) => Promise<void>;\n /* @conditional-compile-remove(DNS) */\n onStartNoiseSuppressionEffect: () => Promise<void>;\n /* @conditional-compile-remove(DNS) */\n onStopNoiseSuppressionEffect: () => Promise<void>;\n onStartCaptions: (options?: CaptionsOptions) => Promise<void>;\n onStopCaptions: () => Promise<void>;\n onSetSpokenLanguage: (language: string) => Promise<void>;\n onSetCaptionLanguage: (language: string) => Promise<void>;\n\n onSubmitSurvey(survey: CallSurvey): Promise<CallSurveyResponse | undefined>;\n onStartSpotlight: (userIds?: string[]) => Promise<void>;\n onStopSpotlight: (userIds?: string[]) => Promise<void>;\n onStopAllSpotlight: () => Promise<void>;\n /* @conditional-compile-remove(soft-mute) */\n onMuteParticipant: (userId: string) => Promise<void>;\n /* @conditional-compile-remove(soft-mute) */\n onMuteAllRemoteParticipants: () => Promise<void>;\n}\n\n/**\n * options bag to start captions\n *\n * @public\n */\nexport type CaptionsOptions = {\n spokenLanguage: string;\n};\n\n/**\n * @private\n */\nexport const areStreamsEqual = (prevStream: LocalVideoStream, newStream: LocalVideoStream): boolean => {\n return !!prevStream && !!newStream && prevStream.source.id === newStream.source.id;\n};\n\n/**\n * Dependency type to be injected for video background effects\n *\n * @public\n */\nexport type VideoBackgroundEffectsDependency = {\n createBackgroundBlurEffect: (config?: BackgroundBlurConfig) => BackgroundBlurEffect;\n createBackgroundReplacementEffect: (config: BackgroundReplacementConfig) => BackgroundReplacementEffect;\n};\n\n/* @conditional-compile-remove(DNS) */\n/**\n * Dependency type to be injected for deep noise suppression\n *\n * @beta\n */\nexport type DeepNoiseSuppressionEffectDependency = {\n deepNoiseSuppressionEffect: AudioEffectsStartConfig;\n};\n/**\n * Create the common implementation of {@link CallingHandlers} for all types of Call\n *\n * @private\n */\nexport const createDefaultCommonCallingHandlers = memoizeOne(\n (\n callClient: StatefulCallClient,\n deviceManager: StatefulDeviceManager | undefined,\n call: Call | /* @conditional-compile-remove(teams-identity-support) */ TeamsCall | undefined,\n options?: {\n onResolveVideoBackgroundEffectsDependency?: () => Promise<VideoBackgroundEffectsDependency>;\n /* @conditional-compile-remove(DNS) */\n onResolveDeepNoiseSuppressionDependency?: () => Promise<DeepNoiseSuppressionEffectDependency>;\n }\n ): CommonCallingHandlers & Partial<_ComponentCallingHandlers> => {\n const onStartLocalVideo = async (): Promise<void> => {\n // Before the call object creates a stream, dispose of any local preview streams.\n // @TODO: is there any way to parent the unparented view to the call object instead\n // of disposing and creating a new stream?\n await disposeAllLocalPreviewViews(callClient);\n\n const callId = call?.id;\n let videoDeviceInfo = callClient.getState().deviceManager.selectedCamera;\n if (!videoDeviceInfo) {\n const cameras = await deviceManager?.getCameras();\n videoDeviceInfo = cameras && cameras.length > 0 ? cameras[0] : undefined;\n videoDeviceInfo && deviceManager?.selectCamera(videoDeviceInfo);\n }\n if (!callId || !videoDeviceInfo) {\n return;\n }\n const stream = new LocalVideoStream(videoDeviceInfo);\n if (call && !call.localVideoStreams.find((s) => areStreamsEqual(s, stream))) {\n await call.startVideo(stream);\n }\n };\n\n const onStopLocalVideo = async (stream: LocalVideoStream): Promise<void> => {\n const callId = call?.id;\n if (!callId) {\n return;\n }\n if (call && call.localVideoStreams.find((s) => areStreamsEqual(s, stream))) {\n await call.stopVideo(stream);\n }\n };\n\n const onToggleCamera = async (options?: VideoStreamOptions): Promise<void> => {\n const previewOn = _isPreviewOn(callClient.getState().deviceManager);\n\n // the disposal of the unparented views is to workaround: https://skype.visualstudio.com/SPOOL/_workitems/edit/3030558.\n // The root cause of the issue is caused by never transitioning the unparented view to the\n // call object when going from configuration page (disconnected call state) to connecting.\n //\n // Currently the only time the local video stream is moved from unparented view to the call\n // object is when we transition from connecting -> call state. If the camera was on,\n // inside the MediaGallery we trigger toggleCamera. This triggers onStartLocalVideo which\n // destroys the unparentedView and creates a new stream in the call - so all looks well.\n //\n // However, if someone turns off their camera during the lobbyOrConnecting screen, the\n // call.localVideoStreams will be empty (as the stream is currently stored in the unparented\n // views and was never transitioned to the call object) and thus we incorrectly try to create\n // a new video stream for the call object, instead of only stopping the unparented view.\n //\n // The correct fix for this is to ensure that callAgent.onStartCall is called with the\n // localvideostream as a videoOption. That will mean call.onLocalVideoStreamsUpdated will\n // be triggered when the call is in connecting state, which we can then transition the\n // local video stream to the stateful call client and get into a clean state.\n\n if (call && (_isInCall(call.state) || _isInLobbyOrConnecting(call.state))) {\n const stream = call.localVideoStreams.find((stream) => stream.mediaStreamType === 'Video');\n const unparentedViews = callClient.getState().deviceManager.unparentedViews;\n if (stream || unparentedViews.length > 0) {\n unparentedViews &&\n (await unparentedViews.forEach(\n (view) => view.mediaStreamType === 'Video' && callClient.disposeView(undefined, undefined, view)\n ));\n stream && (await onStopLocalVideo(stream));\n } else {\n await onStartLocalVideo();\n }\n } else {\n /**\n * This will create a unparented view to be used on the configuration page and the connecting screen\n *\n * If the device that the stream will come from is not on from permissions checks, then it will take time\n * to create the stream since device is off. If we are turn the camera on immedietly on the configuration page we see it is\n * fast but that is because the device is already primed to return a stream.\n *\n * On the connecting page the device has already turned off and the connecting window is so small we do not see the resulting\n * unparented view from the code below.\n */\n const selectedCamera = callClient.getState().deviceManager.selectedCamera;\n if (selectedCamera) {\n if (previewOn) {\n await onDisposeLocalStreamView();\n } else {\n await callClient.createView(\n undefined,\n undefined,\n {\n source: selectedCamera,\n mediaStreamType: 'Video'\n },\n options\n );\n }\n }\n }\n };\n\n const onSelectMicrophone = async (device: AudioDeviceInfo): Promise<void> => {\n if (!deviceManager) {\n return;\n }\n return deviceManager.selectMicrophone(device);\n };\n\n const onSelectSpeaker = async (device: AudioDeviceInfo): Promise<void> => {\n if (!deviceManager) {\n return;\n }\n return deviceManager.selectSpeaker(device);\n };\n\n const onSelectCamera = async (device: VideoDeviceInfo, options?: VideoStreamOptions): Promise<void> => {\n if (!deviceManager) {\n return;\n }\n if (call && _isInCall(call.state)) {\n deviceManager.selectCamera(device);\n const stream = call.localVideoStreams.find((stream) => stream.mediaStreamType === 'Video');\n await stream?.switchSource(device);\n\n /// TODO: TEMPORARY SOLUTION\n /// The Calling SDK needs to wait until the stream is ready before resolving the switchSource promise.\n /// This is a temporary solution to wait for the stream to be ready before resolving the promise.\n /// This allows the onSelectCamera to be throttled to prevent the streams from getting in to a frozen state\n /// if the user switches cameras too rapidly.\n /// This is to be removed once the Calling SDK has issued a fix.\n await stream?.getMediaStream();\n } else {\n const previewOn = _isPreviewOn(callClient.getState().deviceManager);\n\n if (!previewOn) {\n deviceManager.selectCamera(device);\n return;\n }\n\n await onDisposeLocalStreamView();\n\n deviceManager.selectCamera(device);\n await callClient.createView(\n undefined,\n undefined,\n {\n source: device,\n mediaStreamType: 'Video'\n },\n options\n );\n }\n };\n\n const onRaiseHand = async (): Promise<void> => await call?.feature(Features.RaiseHand)?.raiseHand();\n\n const onLowerHand = async (): Promise<void> => await call?.feature(Features.RaiseHand)?.lowerHand();\n\n const onToggleRaiseHand = async (): Promise<void> => {\n const raiseHandFeature = call?.feature(Features.RaiseHand);\n const localUserId = callClient.getState().userId;\n const isLocalRaisedHand = raiseHandFeature\n ?.getRaisedHands()\n .find(\n (publishedState) =>\n toFlatCommunicationIdentifier(publishedState.identifier) === toFlatCommunicationIdentifier(localUserId)\n );\n if (isLocalRaisedHand) {\n await raiseHandFeature?.lowerHand();\n } else {\n await raiseHandFeature?.raiseHand();\n }\n };\n\n const onReactionClick = async (reaction: Reaction): Promise<void> => {\n if (\n reaction === 'like' ||\n reaction === 'applause' ||\n reaction === 'heart' ||\n reaction === 'laugh' ||\n reaction === 'surprised'\n ) {\n await call?.feature(Features.Reaction)?.sendReaction({ reactionType: reaction });\n } else {\n console.warn(`Can not recognize ${reaction} as meeting reaction`);\n }\n return;\n };\n\n const onToggleMicrophone = async (): Promise<void> => {\n if (!call || !(_isInCall(call.state) || _isInLobbyOrConnecting(call.state))) {\n throw new Error(`Please invoke onToggleMicrophone after call is started`);\n }\n return call.isMuted ? await call.unmute() : await call.mute();\n };\n\n const onStartScreenShare = async (): Promise<void> => await call?.startScreenSharing();\n\n const onStopScreenShare = async (): Promise<void> => await call?.stopScreenSharing();\n\n const onToggleScreenShare = async (): Promise<void> =>\n call?.isScreenSharingOn ? await onStopScreenShare() : await onStartScreenShare();\n\n const onHangUp = async (forEveryone?: boolean): Promise<void> =>\n await call?.hangUp({ forEveryone: forEveryone === true ? true : false });\n\n const onToggleHold = async (): Promise<void> =>\n call?.state === 'LocalHold' ? await call?.resume() : await call?.hold();\n\n const onCreateLocalStreamView = async (\n options = { scalingMode: 'Crop', isMirrored: true } as VideoStreamOptions\n ): Promise<void | CreateVideoStreamViewResult> => {\n if (!call || call.localVideoStreams.length === 0) {\n return;\n }\n\n const callState = callClient.getState().calls[call.id];\n if (!callState) {\n return;\n }\n\n const localStream = callState.localVideoStreams.find((item) => item.mediaStreamType === 'Video');\n const localScreenSharingStream = callState.localVideoStreams.find(\n (item) => item.mediaStreamType === 'ScreenSharing'\n );\n\n let createViewResult: CreateViewResult | undefined = undefined;\n if (localStream && !localStream.view) {\n createViewResult = await callClient.createView(call.id, undefined, localStream, options);\n }\n\n if (localScreenSharingStream && !localScreenSharingStream.view && call.isScreenSharingOn) {\n // Hardcoded `scalingMode` since it is highly unlikely that CONTOSO would ever want to use a different scaling mode for screenshare.\n // Using `Crop` would crop the contents of screenshare and `Stretch` would warp it.\n // `Fit` is the only mode that maintains the integrity of the screen being shared.\n createViewResult = await callClient.createView(call.id, undefined, localScreenSharingStream, {\n scalingMode: 'Fit'\n });\n }\n\n return createViewResult?.view ? { view: createViewResult?.view } : undefined;\n };\n\n const onCreateRemoteStreamView = async (\n userId: string,\n options = { scalingMode: 'Crop' } as VideoStreamOptions\n ): Promise<void | CreateVideoStreamViewResult> => {\n if (!call) {\n return;\n }\n const callState = callClient.getState().calls[call.id];\n if (!callState) {\n throw new Error(`Call Not Found: ${call.id}`);\n }\n\n const participant = Object.values(callState.remoteParticipants).find(\n (participant) => toFlatCommunicationIdentifier(participant.identifier) === userId\n );\n\n if (!participant || !participant.videoStreams) {\n return;\n }\n\n /**\n * There is a bug from the calling sdk where if a user leaves and rejoins immediately\n * it adds 2 more potential streams this remote participant can use. The old 2 streams\n * still show as available and that is how we got a frozen stream in this case. The stopgap\n * until streams accurately reflect their availability is to always prioritize the latest streams of a certain type\n * e.g findLast instead of find\n */\n // Find the first available stream, if there is none, then get the first stream\n const remoteVideoStream =\n Object.values(participant.videoStreams).findLast((i) => i.mediaStreamType === 'Video' && i.isAvailable) ||\n Object.values(participant.videoStreams).findLast((i) => i.mediaStreamType === 'Video');\n\n const screenShareStream =\n Object.values(participant.videoStreams).findLast(\n (i) => i.mediaStreamType === 'ScreenSharing' && i.isAvailable\n ) || Object.values(participant.videoStreams).findLast((i) => i.mediaStreamType === 'ScreenSharing');\n\n let createViewResult: CreateViewResult | undefined = undefined;\n if (remoteVideoStream && remoteVideoStream.isAvailable && !remoteVideoStream.view) {\n createViewResult = await callClient.createView(call.id, participant.identifier, remoteVideoStream, options);\n }\n\n if (screenShareStream && screenShareStream.isAvailable && !screenShareStream.view) {\n // Hardcoded `scalingMode` since it is highly unlikely that CONTOSO would ever want to use a different scaling mode for screenshare.\n // Using `Crop` would crop the contents of screenshare and `Stretch` would warp it.\n // `Fit` is the only mode that maintains the integrity of the screen being shared.\n createViewResult = await callClient.createView(call.id, participant.identifier, screenShareStream, {\n scalingMode: 'Fit'\n });\n }\n\n return createViewResult?.view ? { view: createViewResult?.view } : undefined;\n };\n\n const onDisposeRemoteStreamView = async (userId: string): Promise<void> => {\n if (!call) {\n return;\n }\n const callState = callClient.getState().calls[call.id];\n if (!callState) {\n throw new Error(`Call Not Found: ${call.id}`);\n }\n\n const participant = Object.values(callState.remoteParticipants).find(\n (participant) => toFlatCommunicationIdentifier(participant.identifier) === userId\n );\n\n if (!participant || !participant.videoStreams) {\n return;\n }\n\n const remoteVideoStream = Object.values(participant.videoStreams).find((i) => i.mediaStreamType === 'Video');\n const screenShareStream = Object.values(participant.videoStreams).find(\n (i) => i.mediaStreamType === 'ScreenSharing'\n );\n\n if (remoteVideoStream && remoteVideoStream.view) {\n callClient.disposeView(call.id, participant.identifier, remoteVideoStream);\n }\n\n if (screenShareStream && screenShareStream.view) {\n callClient.disposeView(call.id, participant.identifier, screenShareStream);\n }\n };\n\n const onDisposeRemoteVideoStreamView = async (userId: string): Promise<void> => {\n if (!call) {\n return;\n }\n const callState = callClient.getState().calls[call.id];\n if (!callState) {\n throw new Error(`Call Not Found: ${call.id}`);\n }\n\n const participant = Object.values(callState.remoteParticipants).find(\n (participant) => toFlatCommunicationIdentifier(participant.identifier) === userId\n );\n\n if (!participant || !participant.videoStreams) {\n return;\n }\n\n const remoteVideoStream = Object.values(participant.videoStreams).find((i) => i.mediaStreamType === 'Video');\n\n if (remoteVideoStream && remoteVideoStream.view) {\n callClient.disposeView(call.id, participant.identifier, remoteVideoStream);\n }\n };\n\n const onDisposeRemoteScreenShareStreamView = async (userId: string): Promise<void> => {\n if (!call) {\n return;\n }\n const callState = callClient.getState().calls[call.id];\n if (!callState) {\n throw new Error(`Call Not Found: ${call.id}`);\n }\n const participant = Object.values(callState.remoteParticipants).find(\n (participant) => toFlatCommunicationIdentifier(participant.identifier) === userId\n );\n\n if (!participant || !participant.videoStreams) {\n return;\n }\n const screenShareStream = Object.values(participant.videoStreams).find(\n (i) => i.mediaStreamType === 'ScreenSharing'\n );\n\n if (screenShareStream && screenShareStream.view) {\n callClient.disposeView(call.id, participant.identifier, screenShareStream);\n }\n };\n\n const onDisposeLocalScreenShareStreamView = async (): Promise<void> => {\n if (!call) {\n return;\n }\n const callState = callClient.getState().calls[call.id];\n if (!callState) {\n throw new Error(`Call Not Found: ${call.id}`);\n }\n const screenShareStream = callState?.localVideoStreams.find((item) => item.mediaStreamType === 'ScreenSharing');\n if (screenShareStream && screenShareStream.view) {\n callClient.disposeView(call.id, undefined, screenShareStream);\n }\n };\n\n const onDisposeLocalStreamView = async (): Promise<void> => {\n // If the user is currently in a call, dispose of the local stream view attached to that call.\n const callState = call && callClient.getState().calls[call.id];\n const localStream = callState?.localVideoStreams.find((item) => item.mediaStreamType === 'Video');\n if (call && callState && localStream) {\n callClient.disposeView(call.id, undefined, localStream);\n }\n\n // If the user is not in a call we currently assume any unparented view is a LocalPreview and stop all\n // since those are only used for LocalPreview currently.\n // TODO: we need to remember which LocalVideoStream was used for LocalPreview and dispose that one.\n await disposeAllLocalPreviewViews(callClient);\n };\n\n const onSendDtmfTone = async (dtmfTone: DtmfTone): Promise<void> => await call?.sendDtmf(dtmfTone);\n\n const notImplemented = (): any => {\n throw new Error('Not implemented, cannot call a method from an abstract object');\n };\n\n /* @conditional-compile-remove(call-readiness) */\n const askDevicePermission = async (constrain: PermissionConstraints): Promise<void> => {\n if (deviceManager) {\n await deviceManager?.askDevicePermission(constrain);\n }\n };\n\n const onRemoveVideoBackgroundEffects = async (): Promise<void> => {\n const stream =\n call?.localVideoStreams.find((stream) => stream.mediaStreamType === 'Video') ||\n deviceManager?.getUnparentedVideoStreams().find((stream) => stream.mediaStreamType === 'Video');\n if (stream) {\n if (!options?.onResolveVideoBackgroundEffectsDependency) {\n throw new Error(`Video background effects dependency not resolved`);\n } else {\n return stream.feature(Features.VideoEffects).stopEffects();\n }\n }\n };\n\n const onBlurVideoBackground = async (backgroundBlurConfig?: BackgroundBlurConfig): Promise<void> => {\n const stream =\n call?.localVideoStreams.find((stream) => stream.mediaStreamType === 'Video') ||\n deviceManager?.getUnparentedVideoStreams().find((stream) => stream.mediaStreamType === 'Video');\n if (stream) {\n if (!options?.onResolveVideoBackgroundEffectsDependency) {\n throw new Error(`Video background effects dependency not resolved`);\n }\n const createEffect =\n options?.onResolveVideoBackgroundEffectsDependency &&\n (await options.onResolveVideoBackgroundEffectsDependency())?.createBackgroundBlurEffect;\n return createEffect && stream.feature(Features.VideoEffects).startEffects(createEffect(backgroundBlurConfig));\n }\n };\n\n const onReplaceVideoBackground = async (\n backgroundReplacementConfig: BackgroundReplacementConfig\n ): Promise<void> => {\n const stream =\n call?.localVideoStreams.find((stream) => stream.mediaStreamType === 'Video') ||\n deviceManager?.getUnparentedVideoStreams().find((stream) => stream.mediaStreamType === 'Video');\n if (stream) {\n if (!options?.onResolveVideoBackgroundEffectsDependency) {\n throw new Error(`Video background effects dependency not resolved`);\n }\n const createEffect =\n options?.onResolveVideoBackgroundEffectsDependency &&\n (await options.onResolveVideoBackgroundEffectsDependency())?.createBackgroundReplacementEffect;\n return (\n createEffect && stream.feature(Features.VideoEffects).startEffects(createEffect(backgroundReplacementConfig))\n );\n }\n };\n\n /* @conditional-compile-remove(DNS) */\n const onStartNoiseSuppressionEffect = async (): Promise<void> => {\n const audioEffects =\n options?.onResolveDeepNoiseSuppressionDependency &&\n (await options.onResolveDeepNoiseSuppressionDependency())?.deepNoiseSuppressionEffect;\n const stream = call?.localAudioStreams.find((stream) => stream.mediaStreamType === 'Audio');\n if (stream && audioEffects && audioEffects.noiseSuppression) {\n const audioEffectsFeature = stream.feature(Features.AudioEffects);\n const isNoiseSuppressionSupported = await audioEffectsFeature.isSupported(audioEffects.noiseSuppression);\n if (isNoiseSuppressionSupported) {\n return await audioEffectsFeature.startEffects(audioEffects);\n } else {\n throw new Error('Deep Noise Suppression is not supported on this platform.');\n }\n }\n };\n\n /* @conditional-compile-remove(DNS) */\n const onStopNoiseSuppressionEffect = async (): Promise<void> => {\n const stream = call?.localAudioStreams.find((stream) => stream.mediaStreamType === 'Audio');\n if (stream && options?.onResolveDeepNoiseSuppressionDependency) {\n const audioEffects: AudioEffectsStopConfig = {\n noiseSuppression: true\n };\n return await stream.feature(Features.AudioEffects).stopEffects(audioEffects);\n }\n };\n\n const onStartCaptions = async (options?: CaptionsOptions): Promise<void> => {\n const captionsFeature = call?.feature(Features.Captions).captions;\n await captionsFeature?.startCaptions(options);\n };\n const onStopCaptions = async (): Promise<void> => {\n const captionsFeature = call?.feature(Features.Captions).captions;\n await captionsFeature?.stopCaptions();\n };\n const onSetSpokenLanguage = async (language: string): Promise<void> => {\n const captionsFeature = call?.feature(Features.Captions).captions;\n await captionsFeature?.setSpokenLanguage(language);\n };\n const onSetCaptionLanguage = async (language: string): Promise<void> => {\n const captionsFeature = call?.feature(Features.Captions).captions as TeamsCaptions;\n await captionsFeature.setCaptionLanguage(language);\n };\n\n const onSubmitSurvey = async (survey: CallSurvey): Promise<CallSurveyResponse | undefined> =>\n await call?.feature(Features.CallSurvey).submitSurvey(survey);\n const onStartSpotlight = async (userIds?: string[]): Promise<void> => {\n const participants = userIds?.map((userId) => _toCommunicationIdentifier(userId));\n await call?.feature(Features.Spotlight).startSpotlight(participants);\n };\n const onStopSpotlight = async (userIds?: string[]): Promise<void> => {\n const participants = userIds?.map((userId) => _toCommunicationIdentifier(userId));\n await call?.feature(Features.Spotlight).stopSpotlight(participants);\n };\n const onStopAllSpotlight = async (): Promise<void> => {\n await call?.feature(Features.Spotlight).stopAllSpotlight();\n };\n /* @conditional-compile-remove(soft-mute) */\n const onMuteParticipant = async (userId: string): Promise<void> => {\n if (call?.remoteParticipants) {\n call?.remoteParticipants.forEach(async (participant: RemoteParticipant) => {\n // Using toFlatCommunicationIdentifier to convert the CommunicationIdentifier to string\n // as _toCommunicationIdentifier(userId) comparison to participant.identifier did not work for this case\n if (toFlatCommunicationIdentifier(participant.identifier) === userId) {\n await participant.mute();\n }\n });\n }\n };\n /* @conditional-compile-remove(soft-mute) */\n const onMuteAllRemoteParticipants = async (): Promise<void> => {\n call?.muteAllRemoteParticipants();\n };\n const canStartSpotlight = call?.feature(Features.Capabilities).capabilities.spotlightParticipant.isPresent;\n const canRemoveSpotlight = call?.feature(Features.Capabilities).capabilities.removeParticipantsSpotlight.isPresent;\n const onStartLocalSpotlight = canStartSpotlight\n ? async (): Promise<void> => {\n await call?.feature(Features.Spotlight).startSpotlight();\n }\n : undefined;\n const onStopLocalSpotlight = async (): Promise<void> => {\n await call?.feature(Features.Spotlight).stopSpotlight();\n };\n const onStartRemoteSpotlight = canStartSpotlight\n ? async (userIds?: string[]): Promise<void> => {\n const participants = userIds?.map((userId) => _toCommunicationIdentifier(userId));\n await call?.feature(Features.Spotlight).startSpotlight(participants);\n }\n : undefined;\n const onStopRemoteSpotlight = canRemoveSpotlight\n ? async (userIds?: string[]): Promise<void> => {\n const participants = userIds?.map((userId) => _toCommunicationIdentifier(userId));\n await call?.feature(Features.Spotlight).stopSpotlight(participants);\n }\n : undefined;\n\n return {\n onHangUp,\n onToggleHold,\n onSelectCamera,\n onSelectMicrophone,\n onSelectSpeaker,\n onStartScreenShare,\n onStopScreenShare,\n onToggleCamera,\n onToggleMicrophone,\n onToggleScreenShare,\n onCreateLocalStreamView,\n onCreateRemoteStreamView,\n onStartLocalVideo,\n onDisposeRemoteStreamView,\n onDisposeLocalStreamView,\n onDisposeRemoteScreenShareStreamView,\n onDisposeLocalScreenShareStreamView,\n onDisposeRemoteVideoStreamView,\n onRaiseHand,\n onLowerHand,\n onToggleRaiseHand,\n onReactionClick: onReactionClick,\n onAddParticipant: notImplemented,\n onRemoveParticipant: notImplemented,\n onStartCall: notImplemented,\n onSendDtmfTone,\n /* @conditional-compile-remove(call-readiness) */\n askDevicePermission,\n onRemoveVideoBackgroundEffects,\n onBlurVideoBackground,\n onReplaceVideoBackground,\n /* @conditional-compile-remove(DNS) */\n onStartNoiseSuppressionEffect,\n /* @conditional-compile-remove(DNS) */\n onStopNoiseSuppressionEffect,\n onStartCaptions,\n onStopCaptions,\n onSetCaptionLanguage,\n onSetSpokenLanguage,\n onSubmitSurvey,\n onStartSpotlight,\n onStopSpotlight,\n onStopAllSpotlight,\n onStartLocalSpotlight,\n onStopLocalSpotlight,\n onStartRemoteSpotlight,\n onStopRemoteSpotlight,\n /* @conditional-compile-remove(soft-mute) */\n onMuteParticipant,\n /* @conditional-compile-remove(soft-mute) */\n onMuteAllRemoteParticipants,\n onAcceptCall: notImplemented,\n onRejectCall: notImplemented\n };\n }\n);\n"]}
1
+ {"version":3,"file":"createCommonHandlers.js","sourceRoot":"","sources":["../../../../../../calling-component-bindings/src/handlers/createCommonHandlers.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAElC,OAAO,EAGL,gBAAgB,EAOjB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CAAE,OAAO,CAAC,QAAQ,CAAC,SAAS,EAAE,aAAa,CAAC,YAAY,CAAC,CAAA,CAAC;QACtE,CAAC,CAAA;QACH,CAAC,CAAC,SAAS,CAAC;IAEd,OAAO;QACL,QAAQ;QACR,YAAY;QACZ,cAAc;QACd,kBAAkB;QAClB,eAAe;QACf,kBAAkB;QAClB,iBAAiB;QACjB,cAAc;QACd,kBAAkB;QAClB,mBAAmB;QACnB,uBAAuB;QACvB,wBAAwB;QACxB,iBAAiB;QACjB,yBAAyB;QACzB,wBAAwB;QACxB,oCAAoC;QACpC,mCAAmC;QACnC,8BAA8B;QAC9B,WAAW;QACX,WAAW;QACX,iBAAiB;QACjB,eAAe,EAAE,eAAe;QAChC,gBAAgB,EAAE,cAAc;QAChC,mBAAmB,EAAE,cAAc;QACnC,WAAW,EAAE,cAAc;QAC3B,cAAc;QACd,iDAAiD;QACjD,mBAAmB;QACnB,8BAA8B;QAC9B,qBAAqB;QACrB,wBAAwB;QACxB,sCAAsC;QACtC,6BAA6B;QAC7B,sCAAsC;QACtC,4BAA4B;QAC5B,eAAe;QACf,cAAc;QACd,oBAAoB;QACpB,mBAAmB;QACnB,cAAc;QACd,gBAAgB;QAChB,eAAe;QACf,kBAAkB;QAClB,qBAAqB;QACrB,oBAAoB;QACpB,sBAAsB;QACtB,qBAAqB;QACrB,4CAA4C;QAC5C,iBAAiB;QACjB,4CAA4C;QAC5C,2BAA2B;QAC3B,YAAY,EAAE,cAAc;QAC5B,YAAY,EAAE,cAAc;KAC7B,CAAC;AACJ,CAAC,CACF,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n AudioDeviceInfo,\n Call,\n LocalVideoStream,\n StartCallOptions,\n VideoDeviceInfo,\n BackgroundBlurEffect,\n BackgroundReplacementEffect,\n BackgroundBlurConfig,\n BackgroundReplacementConfig\n} from '@azure/communication-calling';\n/* @conditional-compile-remove(DNS) */\nimport { AudioEffectsStartConfig, AudioEffectsStopConfig } from '@azure/communication-calling';\n/* @conditional-compile-remove(soft-mute) */\nimport { RemoteParticipant } from '@azure/communication-calling';\nimport { CallSurvey, CallSurveyResponse } from '@azure/communication-calling';\nimport { DtmfTone } from '@azure/communication-calling';\nimport { AddPhoneNumberOptions } from '@azure/communication-calling';\n/* @conditional-compile-remove(teams-identity-support) */\nimport { TeamsCall } from '@azure/communication-calling';\n/* @conditional-compile-remove(call-readiness) */\nimport { PermissionConstraints } from '@azure/communication-calling';\nimport { toFlatCommunicationIdentifier } from '@internal/acs-ui-common';\nimport { _toCommunicationIdentifier } from '@internal/acs-ui-common';\nimport { CreateViewResult, StatefulCallClient, StatefulDeviceManager } from '@internal/calling-stateful-client';\nimport memoizeOne from 'memoize-one';\nimport { CreateVideoStreamViewResult, VideoStreamOptions } from '@internal/react-components';\nimport { disposeAllLocalPreviewViews, _isInCall, _isInLobbyOrConnecting, _isPreviewOn } from '../utils/callUtils';\nimport { CommunicationUserIdentifier, PhoneNumberIdentifier } from '@azure/communication-common';\nimport { CommunicationIdentifier } from '@azure/communication-common';\nimport { Features } from '@azure/communication-calling';\nimport { TeamsCaptions } from '@azure/communication-calling';\nimport { Reaction } from '@azure/communication-calling';\nimport { _ComponentCallingHandlers } from './createHandlers';\n\n/**\n * Object containing all the handlers required for calling components.\n *\n * Calling related components from this package are able to pick out relevant handlers from this object.\n * See {@link useHandlers} and {@link usePropsFor}.\n *\n * @public\n */\nexport interface CommonCallingHandlers {\n onStartLocalVideo: () => Promise<void>;\n onToggleCamera: (options?: VideoStreamOptions) => Promise<void>;\n onSelectMicrophone: (device: AudioDeviceInfo) => Promise<void>;\n onSelectSpeaker: (device: AudioDeviceInfo) => Promise<void>;\n onSelectCamera: (device: VideoDeviceInfo, options?: VideoStreamOptions) => Promise<void>;\n onToggleMicrophone: () => Promise<void>;\n onStartScreenShare: () => Promise<void>;\n onStopScreenShare: () => Promise<void>;\n onToggleScreenShare: () => Promise<void>;\n onHangUp: (forEveryone?: boolean) => Promise<void>;\n onRaiseHand: () => Promise<void>;\n onLowerHand: () => Promise<void>;\n onToggleRaiseHand: () => Promise<void>;\n onReactionClick: (reaction: Reaction) => Promise<void>;\n onToggleHold: () => Promise<void>;\n onAddParticipant(participant: CommunicationUserIdentifier): Promise<void>;\n onAddParticipant(participant: PhoneNumberIdentifier, options: AddPhoneNumberOptions): Promise<void>;\n onCreateLocalStreamView: (options?: VideoStreamOptions) => Promise<void | CreateVideoStreamViewResult>;\n onCreateRemoteStreamView: (\n userId: string,\n options?: VideoStreamOptions\n ) => Promise<void | CreateVideoStreamViewResult>;\n /**\n * @deprecated use {@link onDisposeRemoteVideoStreamView} and {@link onDisposeRemoteScreenShareStreamView} instead.\n */\n onDisposeRemoteStreamView: (userId: string) => Promise<void>;\n onDisposeLocalStreamView: () => Promise<void>;\n onDisposeRemoteVideoStreamView: (userId: string) => Promise<void>;\n onDisposeRemoteScreenShareStreamView: (userId: string) => Promise<void>;\n onDisposeLocalScreenShareStreamView: () => Promise<void>;\n onSendDtmfTone: (dtmfTone: DtmfTone) => Promise<void>;\n onRemoveParticipant(userId: string): Promise<void>;\n\n onRemoveParticipant(participant: CommunicationIdentifier): Promise<void>;\n /* @conditional-compile-remove(call-readiness) */\n askDevicePermission: (constrain: PermissionConstraints) => Promise<void>;\n onStartCall: (participants: CommunicationIdentifier[], options?: StartCallOptions) => void;\n onAcceptCall: (incomingCallId: string, useVideo?: boolean) => Promise<void>;\n onRejectCall: (incomingCallId: string) => Promise<void>;\n onRemoveVideoBackgroundEffects: () => Promise<void>;\n\n onBlurVideoBackground: (backgroundBlurConfig?: BackgroundBlurConfig) => Promise<void>;\n\n onReplaceVideoBackground: (backgroundReplacementConfig: BackgroundReplacementConfig) => Promise<void>;\n /* @conditional-compile-remove(DNS) */\n onStartNoiseSuppressionEffect: () => Promise<void>;\n /* @conditional-compile-remove(DNS) */\n onStopNoiseSuppressionEffect: () => Promise<void>;\n onStartCaptions: (options?: CaptionsOptions) => Promise<void>;\n onStopCaptions: () => Promise<void>;\n onSetSpokenLanguage: (language: string) => Promise<void>;\n onSetCaptionLanguage: (language: string) => Promise<void>;\n\n onSubmitSurvey(survey: CallSurvey): Promise<CallSurveyResponse | undefined>;\n onStartSpotlight: (userIds?: string[]) => Promise<void>;\n onStopSpotlight: (userIds?: string[]) => Promise<void>;\n onStopAllSpotlight: () => Promise<void>;\n /* @conditional-compile-remove(soft-mute) */\n onMuteParticipant: (userId: string) => Promise<void>;\n /* @conditional-compile-remove(soft-mute) */\n onMuteAllRemoteParticipants: () => Promise<void>;\n}\n\n/**\n * options bag to start captions\n *\n * @public\n */\nexport type CaptionsOptions = {\n spokenLanguage: string;\n};\n\n/**\n * @private\n */\nexport const areStreamsEqual = (prevStream: LocalVideoStream, newStream: LocalVideoStream): boolean => {\n return !!prevStream && !!newStream && prevStream.source.id === newStream.source.id;\n};\n\n/**\n * Dependency type to be injected for video background effects\n *\n * @public\n */\nexport type VideoBackgroundEffectsDependency = {\n createBackgroundBlurEffect: (config?: BackgroundBlurConfig) => BackgroundBlurEffect;\n createBackgroundReplacementEffect: (config: BackgroundReplacementConfig) => BackgroundReplacementEffect;\n};\n\n/* @conditional-compile-remove(DNS) */\n/**\n * Dependency type to be injected for deep noise suppression\n *\n * @public\n */\nexport type DeepNoiseSuppressionEffectDependency = {\n deepNoiseSuppressionEffect: AudioEffectsStartConfig;\n};\n/**\n * Create the common implementation of {@link CallingHandlers} for all types of Call\n *\n * @private\n */\nexport const createDefaultCommonCallingHandlers = memoizeOne(\n (\n callClient: StatefulCallClient,\n deviceManager: StatefulDeviceManager | undefined,\n call: Call | /* @conditional-compile-remove(teams-identity-support) */ TeamsCall | undefined,\n options?: {\n onResolveVideoBackgroundEffectsDependency?: () => Promise<VideoBackgroundEffectsDependency>;\n /* @conditional-compile-remove(DNS) */\n onResolveDeepNoiseSuppressionDependency?: () => Promise<DeepNoiseSuppressionEffectDependency>;\n }\n ): CommonCallingHandlers & Partial<_ComponentCallingHandlers> => {\n const onStartLocalVideo = async (): Promise<void> => {\n // Before the call object creates a stream, dispose of any local preview streams.\n // @TODO: is there any way to parent the unparented view to the call object instead\n // of disposing and creating a new stream?\n await disposeAllLocalPreviewViews(callClient);\n\n const callId = call?.id;\n let videoDeviceInfo = callClient.getState().deviceManager.selectedCamera;\n if (!videoDeviceInfo) {\n const cameras = await deviceManager?.getCameras();\n videoDeviceInfo = cameras && cameras.length > 0 ? cameras[0] : undefined;\n videoDeviceInfo && deviceManager?.selectCamera(videoDeviceInfo);\n }\n if (!callId || !videoDeviceInfo) {\n return;\n }\n const stream = new LocalVideoStream(videoDeviceInfo);\n if (call && !call.localVideoStreams.find((s) => areStreamsEqual(s, stream))) {\n await call.startVideo(stream);\n }\n };\n\n const onStopLocalVideo = async (stream: LocalVideoStream): Promise<void> => {\n const callId = call?.id;\n if (!callId) {\n return;\n }\n if (call && call.localVideoStreams.find((s) => areStreamsEqual(s, stream))) {\n await call.stopVideo(stream);\n }\n };\n\n const onToggleCamera = async (options?: VideoStreamOptions): Promise<void> => {\n const previewOn = _isPreviewOn(callClient.getState().deviceManager);\n\n // the disposal of the unparented views is to workaround: https://skype.visualstudio.com/SPOOL/_workitems/edit/3030558.\n // The root cause of the issue is caused by never transitioning the unparented view to the\n // call object when going from configuration page (disconnected call state) to connecting.\n //\n // Currently the only time the local video stream is moved from unparented view to the call\n // object is when we transition from connecting -> call state. If the camera was on,\n // inside the MediaGallery we trigger toggleCamera. This triggers onStartLocalVideo which\n // destroys the unparentedView and creates a new stream in the call - so all looks well.\n //\n // However, if someone turns off their camera during the lobbyOrConnecting screen, the\n // call.localVideoStreams will be empty (as the stream is currently stored in the unparented\n // views and was never transitioned to the call object) and thus we incorrectly try to create\n // a new video stream for the call object, instead of only stopping the unparented view.\n //\n // The correct fix for this is to ensure that callAgent.onStartCall is called with the\n // localvideostream as a videoOption. That will mean call.onLocalVideoStreamsUpdated will\n // be triggered when the call is in connecting state, which we can then transition the\n // local video stream to the stateful call client and get into a clean state.\n\n if (call && (_isInCall(call.state) || _isInLobbyOrConnecting(call.state))) {\n const stream = call.localVideoStreams.find((stream) => stream.mediaStreamType === 'Video');\n const unparentedViews = callClient.getState().deviceManager.unparentedViews;\n if (stream || unparentedViews.length > 0) {\n unparentedViews &&\n (await unparentedViews.forEach(\n (view) => view.mediaStreamType === 'Video' && callClient.disposeView(undefined, undefined, view)\n ));\n stream && (await onStopLocalVideo(stream));\n } else {\n await onStartLocalVideo();\n }\n } else {\n /**\n * This will create a unparented view to be used on the configuration page and the connecting screen\n *\n * If the device that the stream will come from is not on from permissions checks, then it will take time\n * to create the stream since device is off. If we are turn the camera on immedietly on the configuration page we see it is\n * fast but that is because the device is already primed to return a stream.\n *\n * On the connecting page the device has already turned off and the connecting window is so small we do not see the resulting\n * unparented view from the code below.\n */\n const selectedCamera = callClient.getState().deviceManager.selectedCamera;\n if (selectedCamera) {\n if (previewOn) {\n await onDisposeLocalStreamView();\n } else {\n await callClient.createView(\n undefined,\n undefined,\n {\n source: selectedCamera,\n mediaStreamType: 'Video'\n },\n options\n );\n }\n }\n }\n };\n\n const onSelectMicrophone = async (device: AudioDeviceInfo): Promise<void> => {\n if (!deviceManager) {\n return;\n }\n return deviceManager.selectMicrophone(device);\n };\n\n const onSelectSpeaker = async (device: AudioDeviceInfo): Promise<void> => {\n if (!deviceManager) {\n return;\n }\n return deviceManager.selectSpeaker(device);\n };\n\n const onSelectCamera = async (device: VideoDeviceInfo, options?: VideoStreamOptions): Promise<void> => {\n if (!deviceManager) {\n return;\n }\n if (call && _isInCall(call.state)) {\n deviceManager.selectCamera(device);\n const stream = call.localVideoStreams.find((stream) => stream.mediaStreamType === 'Video');\n await stream?.switchSource(device);\n\n /// TODO: TEMPORARY SOLUTION\n /// The Calling SDK needs to wait until the stream is ready before resolving the switchSource promise.\n /// This is a temporary solution to wait for the stream to be ready before resolving the promise.\n /// This allows the onSelectCamera to be throttled to prevent the streams from getting in to a frozen state\n /// if the user switches cameras too rapidly.\n /// This is to be removed once the Calling SDK has issued a fix.\n await stream?.getMediaStream();\n } else {\n const previewOn = _isPreviewOn(callClient.getState().deviceManager);\n\n if (!previewOn) {\n deviceManager.selectCamera(device);\n return;\n }\n\n await onDisposeLocalStreamView();\n\n deviceManager.selectCamera(device);\n await callClient.createView(\n undefined,\n undefined,\n {\n source: device,\n mediaStreamType: 'Video'\n },\n options\n );\n }\n };\n\n const onRaiseHand = async (): Promise<void> => await call?.feature(Features.RaiseHand)?.raiseHand();\n\n const onLowerHand = async (): Promise<void> => await call?.feature(Features.RaiseHand)?.lowerHand();\n\n const onToggleRaiseHand = async (): Promise<void> => {\n const raiseHandFeature = call?.feature(Features.RaiseHand);\n const localUserId = callClient.getState().userId;\n const isLocalRaisedHand = raiseHandFeature\n ?.getRaisedHands()\n .find(\n (publishedState) =>\n toFlatCommunicationIdentifier(publishedState.identifier) === toFlatCommunicationIdentifier(localUserId)\n );\n if (isLocalRaisedHand) {\n await raiseHandFeature?.lowerHand();\n } else {\n await raiseHandFeature?.raiseHand();\n }\n };\n\n const onReactionClick = async (reaction: Reaction): Promise<void> => {\n if (\n reaction === 'like' ||\n reaction === 'applause' ||\n reaction === 'heart' ||\n reaction === 'laugh' ||\n reaction === 'surprised'\n ) {\n await call?.feature(Features.Reaction)?.sendReaction({ reactionType: reaction });\n } else {\n console.warn(`Can not recognize ${reaction} as meeting reaction`);\n }\n return;\n };\n\n const onToggleMicrophone = async (): Promise<void> => {\n if (!call || !(_isInCall(call.state) || _isInLobbyOrConnecting(call.state))) {\n throw new Error(`Please invoke onToggleMicrophone after call is started`);\n }\n return call.isMuted ? await call.unmute() : await call.mute();\n };\n\n const onStartScreenShare = async (): Promise<void> => await call?.startScreenSharing();\n\n const onStopScreenShare = async (): Promise<void> => await call?.stopScreenSharing();\n\n const onToggleScreenShare = async (): Promise<void> =>\n call?.isScreenSharingOn ? await onStopScreenShare() : await onStartScreenShare();\n\n const onHangUp = async (forEveryone?: boolean): Promise<void> =>\n await call?.hangUp({ forEveryone: forEveryone === true ? true : false });\n\n const onToggleHold = async (): Promise<void> =>\n call?.state === 'LocalHold' ? await call?.resume() : await call?.hold();\n\n const onCreateLocalStreamView = async (\n options = { scalingMode: 'Crop', isMirrored: true } as VideoStreamOptions\n ): Promise<void | CreateVideoStreamViewResult> => {\n if (!call || call.localVideoStreams.length === 0) {\n return;\n }\n\n const callState = callClient.getState().calls[call.id];\n if (!callState) {\n return;\n }\n\n const localStream = callState.localVideoStreams.find((item) => item.mediaStreamType === 'Video');\n const localScreenSharingStream = callState.localVideoStreams.find(\n (item) => item.mediaStreamType === 'ScreenSharing'\n );\n\n let createViewResult: CreateViewResult | undefined = undefined;\n if (localStream && !localStream.view) {\n createViewResult = await callClient.createView(call.id, undefined, localStream, options);\n }\n\n if (localScreenSharingStream && !localScreenSharingStream.view && call.isScreenSharingOn) {\n // Hardcoded `scalingMode` since it is highly unlikely that CONTOSO would ever want to use a different scaling mode for screenshare.\n // Using `Crop` would crop the contents of screenshare and `Stretch` would warp it.\n // `Fit` is the only mode that maintains the integrity of the screen being shared.\n createViewResult = await callClient.createView(call.id, undefined, localScreenSharingStream, {\n scalingMode: 'Fit'\n });\n }\n\n return createViewResult?.view ? { view: createViewResult?.view } : undefined;\n };\n\n const onCreateRemoteStreamView = async (\n userId: string,\n options = { scalingMode: 'Crop' } as VideoStreamOptions\n ): Promise<void | CreateVideoStreamViewResult> => {\n if (!call) {\n return;\n }\n const callState = callClient.getState().calls[call.id];\n if (!callState) {\n throw new Error(`Call Not Found: ${call.id}`);\n }\n\n const participant = Object.values(callState.remoteParticipants).find(\n (participant) => toFlatCommunicationIdentifier(participant.identifier) === userId\n );\n\n if (!participant || !participant.videoStreams) {\n return;\n }\n\n /**\n * There is a bug from the calling sdk where if a user leaves and rejoins immediately\n * it adds 2 more potential streams this remote participant can use. The old 2 streams\n * still show as available and that is how we got a frozen stream in this case. The stopgap\n * until streams accurately reflect their availability is to always prioritize the latest streams of a certain type\n * e.g findLast instead of find\n */\n // Find the first available stream, if there is none, then get the first stream\n const remoteVideoStream =\n Object.values(participant.videoStreams).findLast((i) => i.mediaStreamType === 'Video' && i.isAvailable) ||\n Object.values(participant.videoStreams).findLast((i) => i.mediaStreamType === 'Video');\n\n const screenShareStream =\n Object.values(participant.videoStreams).findLast(\n (i) => i.mediaStreamType === 'ScreenSharing' && i.isAvailable\n ) || Object.values(participant.videoStreams).findLast((i) => i.mediaStreamType === 'ScreenSharing');\n\n let createViewResult: CreateViewResult | undefined = undefined;\n if (remoteVideoStream && remoteVideoStream.isAvailable && !remoteVideoStream.view) {\n createViewResult = await callClient.createView(call.id, participant.identifier, remoteVideoStream, options);\n }\n\n if (screenShareStream && screenShareStream.isAvailable && !screenShareStream.view) {\n // Hardcoded `scalingMode` since it is highly unlikely that CONTOSO would ever want to use a different scaling mode for screenshare.\n // Using `Crop` would crop the contents of screenshare and `Stretch` would warp it.\n // `Fit` is the only mode that maintains the integrity of the screen being shared.\n createViewResult = await callClient.createView(call.id, participant.identifier, screenShareStream, {\n scalingMode: 'Fit'\n });\n }\n\n return createViewResult?.view ? { view: createViewResult?.view } : undefined;\n };\n\n const onDisposeRemoteStreamView = async (userId: string): Promise<void> => {\n if (!call) {\n return;\n }\n const callState = callClient.getState().calls[call.id];\n if (!callState) {\n throw new Error(`Call Not Found: ${call.id}`);\n }\n\n const participant = Object.values(callState.remoteParticipants).find(\n (participant) => toFlatCommunicationIdentifier(participant.identifier) === userId\n );\n\n if (!participant || !participant.videoStreams) {\n return;\n }\n\n const remoteVideoStream = Object.values(participant.videoStreams).find((i) => i.mediaStreamType === 'Video');\n const screenShareStream = Object.values(participant.videoStreams).find(\n (i) => i.mediaStreamType === 'ScreenSharing'\n );\n\n if (remoteVideoStream && remoteVideoStream.view) {\n callClient.disposeView(call.id, participant.identifier, remoteVideoStream);\n }\n\n if (screenShareStream && screenShareStream.view) {\n callClient.disposeView(call.id, participant.identifier, screenShareStream);\n }\n };\n\n const onDisposeRemoteVideoStreamView = async (userId: string): Promise<void> => {\n if (!call) {\n return;\n }\n const callState = callClient.getState().calls[call.id];\n if (!callState) {\n throw new Error(`Call Not Found: ${call.id}`);\n }\n\n const participant = Object.values(callState.remoteParticipants).find(\n (participant) => toFlatCommunicationIdentifier(participant.identifier) === userId\n );\n\n if (!participant || !participant.videoStreams) {\n return;\n }\n\n const remoteVideoStream = Object.values(participant.videoStreams).find((i) => i.mediaStreamType === 'Video');\n\n if (remoteVideoStream && remoteVideoStream.view) {\n callClient.disposeView(call.id, participant.identifier, remoteVideoStream);\n }\n };\n\n const onDisposeRemoteScreenShareStreamView = async (userId: string): Promise<void> => {\n if (!call) {\n return;\n }\n const callState = callClient.getState().calls[call.id];\n if (!callState) {\n throw new Error(`Call Not Found: ${call.id}`);\n }\n const participant = Object.values(callState.remoteParticipants).find(\n (participant) => toFlatCommunicationIdentifier(participant.identifier) === userId\n );\n\n if (!participant || !participant.videoStreams) {\n return;\n }\n const screenShareStream = Object.values(participant.videoStreams).find(\n (i) => i.mediaStreamType === 'ScreenSharing'\n );\n\n if (screenShareStream && screenShareStream.view) {\n callClient.disposeView(call.id, participant.identifier, screenShareStream);\n }\n };\n\n const onDisposeLocalScreenShareStreamView = async (): Promise<void> => {\n if (!call) {\n return;\n }\n const callState = callClient.getState().calls[call.id];\n if (!callState) {\n throw new Error(`Call Not Found: ${call.id}`);\n }\n const screenShareStream = callState?.localVideoStreams.find((item) => item.mediaStreamType === 'ScreenSharing');\n if (screenShareStream && screenShareStream.view) {\n callClient.disposeView(call.id, undefined, screenShareStream);\n }\n };\n\n const onDisposeLocalStreamView = async (): Promise<void> => {\n // If the user is currently in a call, dispose of the local stream view attached to that call.\n const callState = call && callClient.getState().calls[call.id];\n const localStream = callState?.localVideoStreams.find((item) => item.mediaStreamType === 'Video');\n if (call && callState && localStream) {\n callClient.disposeView(call.id, undefined, localStream);\n }\n\n // If the user is not in a call we currently assume any unparented view is a LocalPreview and stop all\n // since those are only used for LocalPreview currently.\n // TODO: we need to remember which LocalVideoStream was used for LocalPreview and dispose that one.\n await disposeAllLocalPreviewViews(callClient);\n };\n\n const onSendDtmfTone = async (dtmfTone: DtmfTone): Promise<void> => await call?.sendDtmf(dtmfTone);\n\n const notImplemented = (): any => {\n throw new Error('Not implemented, cannot call a method from an abstract object');\n };\n\n /* @conditional-compile-remove(call-readiness) */\n const askDevicePermission = async (constrain: PermissionConstraints): Promise<void> => {\n if (deviceManager) {\n await deviceManager?.askDevicePermission(constrain);\n }\n };\n\n const onRemoveVideoBackgroundEffects = async (): Promise<void> => {\n const stream =\n call?.localVideoStreams.find((stream) => stream.mediaStreamType === 'Video') ||\n deviceManager?.getUnparentedVideoStreams().find((stream) => stream.mediaStreamType === 'Video');\n if (stream) {\n if (!options?.onResolveVideoBackgroundEffectsDependency) {\n throw new Error(`Video background effects dependency not resolved`);\n } else {\n return stream.feature(Features.VideoEffects).stopEffects();\n }\n }\n };\n\n const onBlurVideoBackground = async (backgroundBlurConfig?: BackgroundBlurConfig): Promise<void> => {\n const stream =\n call?.localVideoStreams.find((stream) => stream.mediaStreamType === 'Video') ||\n deviceManager?.getUnparentedVideoStreams().find((stream) => stream.mediaStreamType === 'Video');\n if (stream) {\n if (!options?.onResolveVideoBackgroundEffectsDependency) {\n throw new Error(`Video background effects dependency not resolved`);\n }\n const createEffect =\n options?.onResolveVideoBackgroundEffectsDependency &&\n (await options.onResolveVideoBackgroundEffectsDependency())?.createBackgroundBlurEffect;\n return createEffect && stream.feature(Features.VideoEffects).startEffects(createEffect(backgroundBlurConfig));\n }\n };\n\n const onReplaceVideoBackground = async (\n backgroundReplacementConfig: BackgroundReplacementConfig\n ): Promise<void> => {\n const stream =\n call?.localVideoStreams.find((stream) => stream.mediaStreamType === 'Video') ||\n deviceManager?.getUnparentedVideoStreams().find((stream) => stream.mediaStreamType === 'Video');\n if (stream) {\n if (!options?.onResolveVideoBackgroundEffectsDependency) {\n throw new Error(`Video background effects dependency not resolved`);\n }\n const createEffect =\n options?.onResolveVideoBackgroundEffectsDependency &&\n (await options.onResolveVideoBackgroundEffectsDependency())?.createBackgroundReplacementEffect;\n return (\n createEffect && stream.feature(Features.VideoEffects).startEffects(createEffect(backgroundReplacementConfig))\n );\n }\n };\n\n /* @conditional-compile-remove(DNS) */\n const onStartNoiseSuppressionEffect = async (): Promise<void> => {\n const audioEffects =\n options?.onResolveDeepNoiseSuppressionDependency &&\n (await options.onResolveDeepNoiseSuppressionDependency())?.deepNoiseSuppressionEffect;\n const stream = call?.localAudioStreams.find((stream) => stream.mediaStreamType === 'Audio');\n if (stream && audioEffects && audioEffects.noiseSuppression) {\n const audioEffectsFeature = stream.feature(Features.AudioEffects);\n const isNoiseSuppressionSupported = await audioEffectsFeature.isSupported(audioEffects.noiseSuppression);\n if (isNoiseSuppressionSupported) {\n return await audioEffectsFeature.startEffects(audioEffects);\n } else {\n throw new Error('Deep Noise Suppression is not supported on this platform.');\n }\n }\n };\n\n /* @conditional-compile-remove(DNS) */\n const onStopNoiseSuppressionEffect = async (): Promise<void> => {\n const stream = call?.localAudioStreams.find((stream) => stream.mediaStreamType === 'Audio');\n if (stream && options?.onResolveDeepNoiseSuppressionDependency) {\n const audioEffects: AudioEffectsStopConfig = {\n noiseSuppression: true\n };\n return await stream.feature(Features.AudioEffects).stopEffects(audioEffects);\n }\n };\n\n const onStartCaptions = async (options?: CaptionsOptions): Promise<void> => {\n const captionsFeature = call?.feature(Features.Captions).captions;\n await captionsFeature?.startCaptions(options);\n };\n const onStopCaptions = async (): Promise<void> => {\n const captionsFeature = call?.feature(Features.Captions).captions;\n await captionsFeature?.stopCaptions();\n };\n const onSetSpokenLanguage = async (language: string): Promise<void> => {\n const captionsFeature = call?.feature(Features.Captions).captions;\n await captionsFeature?.setSpokenLanguage(language);\n };\n const onSetCaptionLanguage = async (language: string): Promise<void> => {\n const captionsFeature = call?.feature(Features.Captions).captions as TeamsCaptions;\n await captionsFeature.setCaptionLanguage(language);\n };\n\n const onSubmitSurvey = async (survey: CallSurvey): Promise<CallSurveyResponse | undefined> =>\n await call?.feature(Features.CallSurvey).submitSurvey(survey);\n const onStartSpotlight = async (userIds?: string[]): Promise<void> => {\n const participants = userIds?.map((userId) => _toCommunicationIdentifier(userId));\n await call?.feature(Features.Spotlight).startSpotlight(participants);\n };\n const onStopSpotlight = async (userIds?: string[]): Promise<void> => {\n const participants = userIds?.map((userId) => _toCommunicationIdentifier(userId));\n await call?.feature(Features.Spotlight).stopSpotlight(participants);\n };\n const onStopAllSpotlight = async (): Promise<void> => {\n await call?.feature(Features.Spotlight).stopAllSpotlight();\n };\n /* @conditional-compile-remove(soft-mute) */\n const onMuteParticipant = async (userId: string): Promise<void> => {\n if (call?.remoteParticipants) {\n call?.remoteParticipants.forEach(async (participant: RemoteParticipant) => {\n // Using toFlatCommunicationIdentifier to convert the CommunicationIdentifier to string\n // as _toCommunicationIdentifier(userId) comparison to participant.identifier did not work for this case\n if (toFlatCommunicationIdentifier(participant.identifier) === userId) {\n await participant.mute();\n }\n });\n }\n };\n /* @conditional-compile-remove(soft-mute) */\n const onMuteAllRemoteParticipants = async (): Promise<void> => {\n call?.muteAllRemoteParticipants();\n };\n const canStartSpotlight = call?.feature(Features.Capabilities).capabilities.spotlightParticipant.isPresent;\n const canRemoveSpotlight = call?.feature(Features.Capabilities).capabilities.removeParticipantsSpotlight.isPresent;\n const onStartLocalSpotlight = canStartSpotlight\n ? async (): Promise<void> => {\n await call?.feature(Features.Spotlight).startSpotlight();\n }\n : undefined;\n const onStopLocalSpotlight = async (): Promise<void> => {\n await call?.feature(Features.Spotlight).stopSpotlight();\n };\n const onStartRemoteSpotlight = canStartSpotlight\n ? async (userIds?: string[]): Promise<void> => {\n const participants = userIds?.map((userId) => _toCommunicationIdentifier(userId));\n await call?.feature(Features.Spotlight).startSpotlight(participants);\n }\n : undefined;\n const onStopRemoteSpotlight = canRemoveSpotlight\n ? async (userIds?: string[]): Promise<void> => {\n const participants = userIds?.map((userId) => _toCommunicationIdentifier(userId));\n await call?.feature(Features.Spotlight).stopSpotlight(participants);\n }\n : undefined;\n\n return {\n onHangUp,\n onToggleHold,\n onSelectCamera,\n onSelectMicrophone,\n onSelectSpeaker,\n onStartScreenShare,\n onStopScreenShare,\n onToggleCamera,\n onToggleMicrophone,\n onToggleScreenShare,\n onCreateLocalStreamView,\n onCreateRemoteStreamView,\n onStartLocalVideo,\n onDisposeRemoteStreamView,\n onDisposeLocalStreamView,\n onDisposeRemoteScreenShareStreamView,\n onDisposeLocalScreenShareStreamView,\n onDisposeRemoteVideoStreamView,\n onRaiseHand,\n onLowerHand,\n onToggleRaiseHand,\n onReactionClick: onReactionClick,\n onAddParticipant: notImplemented,\n onRemoveParticipant: notImplemented,\n onStartCall: notImplemented,\n onSendDtmfTone,\n /* @conditional-compile-remove(call-readiness) */\n askDevicePermission,\n onRemoveVideoBackgroundEffects,\n onBlurVideoBackground,\n onReplaceVideoBackground,\n /* @conditional-compile-remove(DNS) */\n onStartNoiseSuppressionEffect,\n /* @conditional-compile-remove(DNS) */\n onStopNoiseSuppressionEffect,\n onStartCaptions,\n onStopCaptions,\n onSetCaptionLanguage,\n onSetSpokenLanguage,\n onSubmitSurvey,\n onStartSpotlight,\n onStopSpotlight,\n onStopAllSpotlight,\n onStartLocalSpotlight,\n onStopLocalSpotlight,\n onStartRemoteSpotlight,\n onStopRemoteSpotlight,\n /* @conditional-compile-remove(soft-mute) */\n onMuteParticipant,\n /* @conditional-compile-remove(soft-mute) */\n onMuteAllRemoteParticipants,\n onAcceptCall: notImplemented,\n onRejectCall: notImplemented\n };\n }\n);\n"]}
@@ -73,17 +73,14 @@ export interface MicrophoneButtonStrings {
73
73
  microphoneAriaDescription?: string;
74
74
  /**
75
75
  * Title for deep noise suppression button
76
- * @beta
77
76
  */
78
77
  deepNoiseSuppressionTitle?: string;
79
78
  /**
80
79
  * Noise Suppression turned on string for announcer
81
- * @beta
82
80
  */
83
81
  deepNoiseSuppressionOnAnnouncement?: string;
84
82
  /**
85
83
  * Noise Suppression turned off string for announcer
86
- * @beta
87
84
  */
88
85
  deepNoiseSuppressionOffAnnouncement?: string;
89
86
  }
@@ -160,20 +157,14 @@ export interface MicrophoneButtonProps extends ControlBarButtonProps {
160
157
  styles?: Partial<MicrophoneButtonStyles>;
161
158
  /**
162
159
  * Whether the deep noise suppression is on or off
163
- *
164
- * @beta
165
160
  */
166
161
  isDeepNoiseSuppressionOn?: boolean;
167
162
  /**
168
163
  * Callback when noise suppression is clicked
169
- *
170
- * @beta
171
164
  */
172
165
  onClickNoiseSuppression?: () => void;
173
166
  /**
174
167
  * Show/Hide the deep noise suppression button
175
- *
176
- * @beta
177
168
  */
178
169
  showNoiseSuppressionButton?: boolean;
179
170
  }
@@ -1 +1 @@
1
- {"version":3,"file":"MicrophoneButton.js","sourceRoot":"","sources":["../../../../../../react-components/src/components/MicrophoneButton.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAElC,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAyB,MAAM,oBAAoB,CAAC;AAC7E,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AAEjE,OAAO,EACL,sBAAsB,EAIvB,MAAM,iBAAiB,CAAC;AACzB,sCAAsC;AACtC,OAAO,EAAE,MAAM,EAAE,KAAK,EAA4D,MAAM,iBAAiB,CAAC;AAE1G,OAAO,EAAiB,8BAA8B,EAAE,MAAM,iBAAiB,CAAC;AAChF,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AA0LxC;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,KAA4B,EAAe,EAAE;;IAC5E,MAAM,EAAE,kBAAkB,EAAE,GAAG,KAAK,CAAC;IACrC,MAAM,aAAa,GAAG,SAAS,EAAE,CAAC,OAAO,CAAC,gBAAgB,CAAC;IAC3D,MAAM,O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AAA,KAAK,CAAC,eAAe,mCAAI,kBAAkB,EAC5D,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,MAAA,KAAK,CAAC,QAAQ,mCAAI,uBAAuB,EACnD,SAAS,EACP,MAAA,KAAK,CAAC,SAAS,mCACf,CAAC,KAAK,CAAC,yBAAyB;gBAC9B,CAAC,CAAC,8BAA8B,iCACvB,KAAK,KAAE,MAAM,EAAE,MAAA,KAAK,CAAC,MAAM,0CAAE,UAAU,KAC5C,OAAO,EACP,wBAAwB,CACzB;gBACH,CAAC,CAAC,SAAS,CAAC,EAEhB,aAAa,EAAE,CAAA,MAAA,KAAK,CAAC,aAAa,mCAAI,CAAC,KAAK,CAAC,yBAAyB,EAAC,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,SAAS,EACrG,KAAK,EAAE,MAAA,KAAK,CAAC,KAAK,mCAAI,KAAK,CAAC,yBAAyB,0BAEnD,KAAK,CAAC,yBAAyB,CAAC,CAAC,CAAC,OAAO,CAAC,oCAAoC,CAAC,CAAC,CAAC,SAAS,sBAE1E,OAAO,CAAC,yBAAyB,EACnD,oBAAoB,EAAE,KAAK,CAAC,yBAAyB,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,SAAS,EACzF,QAAQ,EAAE,QAAQ,EAClB,eAAe,EAAE,eAAe,IAChC,CACD,CACJ,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React, { useState, useCallback } from 'react';\nimport { useLocale } from '../localization';\nimport { ControlBarButton, ControlBarButtonProps } from './ControlBarButton';\nimport { _HighContrastAwareIcon } from './HighContrastAwareIcon';\n\nimport {\n ContextualMenuItemType,\n IContextualMenuItem,\n IContextualMenuItemStyles,\n IContextualMenuStyles\n} from '@fluentui/react';\n/* @conditional-compile-remove(DNS) */\nimport { Toggle, Stack, IStyleFunctionOrObject, IToggleStyleProps, IToggleStyles } from '@fluentui/react';\nimport { ControlBarButtonStyles } from './ControlBarButton';\nimport { OptionsDevice, generateDefaultDeviceMenuProps } from './DevicesButton';\nimport { Announcer } from './Announcer';\n\n/**\n * Strings of {@link MicrophoneButton} that can be overridden.\n *\n * @public\n */\nexport interface MicrophoneButtonStrings {\n /** Label when button is on. */\n onLabel: string;\n /** Label when button is off. */\n offLabel: string;\n /** * Tooltip content when the button is disabled. */\n tooltipDisabledContent?: string;\n /** Tooltip content when the button is on. */\n tooltipOnContent?: string;\n /** Tooltip content when the button is off. */\n tooltipOffContent?: string;\n /**\n * Title of microphone menu\n */\n microphoneMenuTitle?: string;\n /**\n * Title of speaker menu\n */\n speakerMenuTitle?: string;\n /**\n * Tooltip of microphone menu\n */\n microphoneMenuTooltip?: string;\n /**\n * Tooltip of speaker menu\n */\n speakerMenuTooltip?: string;\n /**\n * Description of microphone button split button role\n */\n microphoneButtonSplitRoleDescription?: string;\n /**\n * Microphone split button aria label when mic is enabled.\n */\n onSplitButtonAriaLabel?: string;\n /**\n * Microphone split button aria label when mic is disabled.\n */\n offSplitButtonAriaLabel?: string;\n /**\n * Microphone action turned on string for announcer\n */\n microphoneActionTurnedOnAnnouncement?: string;\n /**\n * Microphone action turned off string for announcer\n */\n microphoneActionTurnedOffAnnouncement?: string;\n /**\n * Primary action for the microphone when microphone is live.\n */\n onSplitButtonMicrophonePrimaryAction?: string;\n /**\n * Primary action for the microphone when the microphone is muted.\n */\n offSplitButtonMicrophonePrimaryAction?: string;\n /**\n * Title for primary action section of split button\n */\n microphonePrimaryActionSplitButtonTitle?: string;\n /**\n * Aria description for the microphone button\n */\n microphoneAriaDescription?: string;\n /* @conditional-compile-remove(DNS) */\n /**\n * Title for deep noise suppression button\n * @beta\n */\n deepNoiseSuppressionTitle?: string;\n /* @conditional-compile-remove(DNS) */\n /**\n * Noise Suppression turned on string for announcer\n * @beta\n */\n deepNoiseSuppressionOnAnnouncement?: string;\n /* @conditional-compile-remove(DNS) */\n /**\n * Noise Suppression turned off string for announcer\n * @beta\n */\n deepNoiseSuppressionOffAnnouncement?: string;\n}\n\n/**\n * Styles for {@link MicrophoneButton}\n *\n * @public\n */\nexport interface MicrophoneButtonStyles extends ControlBarButtonStyles {\n /**\n * Styles for the {@link MicrophoneButton} menu.\n */\n menuStyles?: Partial<MicrophoneButtonContextualMenuStyles>;\n}\n\n/**\n * Styles for the {@link MicrophoneButton} menu.\n *\n * @public\n */\nexport interface MicrophoneButtonContextualMenuStyles extends IContextualMenuStyles {\n /**\n * Styles for the items inside the {@link MicrophoneButton} button menu.\n */\n menuItemStyles?: IContextualMenuItemStyles;\n}\n\n/**\n * Props for {@link MicrophoneButton}.\n *\n * @public\n */\nexport interface MicrophoneButtonProps extends ControlBarButtonProps {\n /**\n * Utility property for using this component with `communication react eventHandlers`.\n * Maps directly to the `onClick` property.\n */\n onToggleMicrophone?: () => Promise<void>;\n /**\n * Available microphones for selection\n */\n microphones?: OptionsDevice[];\n /**\n * Available speakers for selection\n */\n speakers?: OptionsDevice[];\n /**\n * Microphone that is shown as currently selected\n */\n selectedMicrophone?: OptionsDevice;\n /**\n * Speaker that is shown as currently selected\n */\n selectedSpeaker?: OptionsDevice;\n /**\n * Callback when a microphone is selected\n */\n onSelectMicrophone?: (device: OptionsDevice) => Promise<void>;\n /**\n * Speaker when a speaker is selected\n */\n onSelectSpeaker?: (device: OptionsDevice) => Promise<void>;\n /**\n * Whether to use a {@link SplitButton} with a {@link IContextualMenu} for device selection.\n *\n * default: false\n */\n enableDeviceSelectionMenu?: boolean;\n /**\n * Optional strings to override in component\n */\n strings?: Partial<MicrophoneButtonStrings>;\n /**\n * Styles for {@link MicrophoneButton} and the device selection flyout.\n */\n styles?: Partial<MicrophoneButtonStyles>;\n /* @conditional-compile-remove(DNS) */\n /**\n * Whether the deep noise suppression is on or off\n *\n * @beta\n */\n isDeepNoiseSuppressionOn?: boolean;\n /* @conditional-compile-remove(DNS) */\n /**\n * Callback when noise suppression is clicked\n *\n * @beta\n */\n onClickNoiseSuppression?: () => void;\n /* @conditional-compile-remove(DNS) */\n /**\n * Show/Hide the deep noise suppression button\n *\n * @beta\n */\n showNoiseSuppressionButton?: boolean;\n}\n\n/**\n * A button to turn microphone on / off.\n *\n * Can be used with {@link ControlBar}.\n *\n * @public\n */\nexport const MicrophoneButton = (props: MicrophoneButtonProps): JSX.Element => {\n const { onToggleMicrophone } = props;\n const localeStrings = useLocale().strings.microphoneButton;\n const strings = { ...localeStrings, ...props.strings };\n const [announcerString, setAnnouncerString] = useState<string | undefined>(undefined);\n\n const isSplit = props.split ?? props.enableDeviceSelectionMenu;\n\n // The button should be disabled when there are no mics. However if the button is a split button, if there are\n // no mics but there are speakers, then only the primary part of the button should be disabled to allow for\n // speaker change.\n const primaryDisabled = props.primaryDisabled || (isSplit && !props.microphones?.length ? true : undefined);\n const disabled =\n props.disabled ||\n (isSplit && !props.microphones?.length && !props.speakers?.length) ||\n (!isSplit && props.microphones && props.microphones?.length === 0);\n\n const onRenderMicOnIcon = (): JSX.Element => {\n return <_HighContrastAwareIcon disabled={disabled} iconName=\"ControlButtonMicOn\" />;\n };\n const onRenderMicOffIcon = (): JSX.Element => {\n return <_HighContrastAwareIcon disabled={disabled} iconName=\"ControlButtonMicOff\" />;\n };\n\n const isMicOn = props.checked;\n\n const splitButtonAriaString = isMicOn ? strings.onSplitButtonAriaLabel : strings.offSplitButtonAriaLabel;\n\n const toggleAnnouncerString = useCallback(\n (isMicOn: boolean) => {\n setAnnouncerString(\n !isMicOn ? strings.microphoneActionTurnedOffAnnouncement : strings.microphoneActionTurnedOnAnnouncement\n );\n },\n [strings.microphoneActionTurnedOffAnnouncement, strings.microphoneActionTurnedOnAnnouncement]\n );\n\n const onToggleClick = useCallback(async () => {\n if (onToggleMicrophone) {\n try {\n await onToggleMicrophone();\n // allows for the setting of narrator strings triggering the announcer when microphone is turned on or off.\n toggleAnnouncerString(!isMicOn);\n // eslint-disable-next-line no-empty\n } finally {\n }\n }\n }, [isMicOn, onToggleMicrophone, toggleAnnouncerString]);\n\n /* @conditional-compile-remove(DNS) */\n const deepNoiseSuppressionToggleStyles: IStyleFunctionOrObject<IToggleStyleProps, IToggleStyles> = {\n root: {\n margin: '4px',\n padding: '0px 12px',\n flexFlow: 'row-reverse',\n justifyContent: 'space-between'\n },\n label: { fontWeight: 400 }\n };\n\n const splitButtonMenuItems: IContextualMenuItem[] = [];\n\n /* @conditional-compile-remove(DNS) */\n if (props.showNoiseSuppressionButton) {\n splitButtonMenuItems.push({\n key: 'microphoneDNSToggle',\n onRender: () => {\n return (\n <Stack\n onClick={async () => {\n await props.onClickNoiseSuppression?.();\n setAnnouncerString(\n props.isDeepNoiseSuppressionOn\n ? strings.deepNoiseSuppressionOnAnnouncement\n : strings.deepNoiseSuppressionOffAnnouncement\n );\n }}\n >\n <Toggle\n label={strings.deepNoiseSuppressionTitle}\n checked={props.isDeepNoiseSuppressionOn}\n inlineLabel\n styles={deepNoiseSuppressionToggleStyles}\n />\n </Stack>\n );\n }\n });\n }\n\n splitButtonMenuItems.push({\n key: 'microphonePrimaryAction',\n text: props.checked ? strings.onSplitButtonMicrophonePrimaryAction : strings.offSplitButtonMicrophonePrimaryAction,\n onClick: () => {\n onToggleClick();\n },\n iconProps: {\n iconName: props.checked ? 'SplitButtonPrimaryActionMicUnmuted' : 'SplitButtonPrimaryActionMicMuted',\n styles: { root: { lineHeight: 0 } }\n }\n });\n\n /**\n * We need to also include the primary action of the button to the\n * split button for mobile devices.\n */\n const splitButtonPrimaryAction: IContextualMenuItem = {\n key: 'primaryAction',\n title: 'toggle mic',\n itemType: ContextualMenuItemType.Section,\n sectionProps: {\n topDivider: true,\n items: splitButtonMenuItems\n }\n };\n\n return (\n <>\n <Announcer announcementString={announcerString} ariaLive={'polite'} />\n <ControlBarButton\n {...props}\n onClick={props.onToggleMicrophone ? onToggleClick : props.onClick}\n onRenderOnIcon={props.onRenderOnIcon ?? onRenderMicOnIcon}\n onRenderOffIcon={props.onRenderOffIcon ?? onRenderMicOffIcon}\n strings={strings}\n labelKey={props.labelKey ?? 'microphoneButtonLabel'}\n menuProps={\n props.menuProps ??\n (props.enableDeviceSelectionMenu\n ? generateDefaultDeviceMenuProps(\n { ...props, styles: props.styles?.menuStyles },\n strings,\n splitButtonPrimaryAction\n )\n : undefined)\n }\n menuIconProps={props.menuIconProps ?? !props.enableDeviceSelectionMenu ? { hidden: true } : undefined}\n split={props.split ?? props.enableDeviceSelectionMenu}\n aria-roledescription={\n props.enableDeviceSelectionMenu ? strings.microphoneButtonSplitRoleDescription : undefined\n }\n aria-description={strings.microphoneAriaDescription}\n splitButtonAriaLabel={props.enableDeviceSelectionMenu ? splitButtonAriaString : undefined}\n disabled={disabled}\n primaryDisabled={primaryDisabled}\n />\n </>\n );\n};\n"]}
1
+ {"version":3,"file":"MicrophoneButton.js","sourceRoot":"","sources":["../../../../../../react-components/src/components/MicrophoneButton.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAElC,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAyB,MAAM,oBAAoB,CAAC;AAC7E,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AAEjE,OAAO,EACL,sBAAsB,EAIvB,MAAM,iBAAiB,CAAC;AACzB,sCAAsC;AACtC,OAAO,EAAE,MAAM,EAAE,KAAK,EAA4D,MAAM,iBAAiB,CAAC;AAE1G,OAAO,EAAiB,8BAA8B,EAAE,MAAM,iBAAiB,CAAC;AAChF,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAiLxC;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,KAA4B,EAAe,EAAE;;IAC5E,MAAM,EAAE,kBAAkB,EAAE,GAAG,KAAK,CAAC;IACrC,MAAM,aAAa,GAAG,SA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AA,KAAK,CAAC,cAAc,mCAAI,iBAAiB,EACzD,eAAe,EAAE,MAAA,KAAK,CAAC,eAAe,mCAAI,kBAAkB,EAC5D,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,MAAA,KAAK,CAAC,QAAQ,mCAAI,uBAAuB,EACnD,SAAS,EACP,MAAA,KAAK,CAAC,SAAS,mCACf,CAAC,KAAK,CAAC,yBAAyB;gBAC9B,CAAC,CAAC,8BAA8B,iCACvB,KAAK,KAAE,MAAM,EAAE,MAAA,KAAK,CAAC,MAAM,0CAAE,UAAU,KAC5C,OAAO,EACP,wBAAwB,CACzB;gBACH,CAAC,CAAC,SAAS,CAAC,EAEhB,aAAa,EAAE,CAAA,MAAA,KAAK,CAAC,aAAa,mCAAI,CAAC,KAAK,CAAC,yBAAyB,EAAC,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,SAAS,EACrG,KAAK,EAAE,MAAA,KAAK,CAAC,KAAK,mCAAI,KAAK,CAAC,yBAAyB,0BAEnD,KAAK,CAAC,yBAAyB,CAAC,CAAC,CAAC,OAAO,CAAC,oCAAoC,CAAC,CAAC,CAAC,SAAS,sBAE1E,OAAO,CAAC,yBAAyB,EACnD,oBAAoB,EAAE,KAAK,CAAC,yBAAyB,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,SAAS,EACzF,QAAQ,EAAE,QAAQ,EAClB,eAAe,EAAE,eAAe,IAChC,CACD,CACJ,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React, { useState, useCallback } from 'react';\nimport { useLocale } from '../localization';\nimport { ControlBarButton, ControlBarButtonProps } from './ControlBarButton';\nimport { _HighContrastAwareIcon } from './HighContrastAwareIcon';\n\nimport {\n ContextualMenuItemType,\n IContextualMenuItem,\n IContextualMenuItemStyles,\n IContextualMenuStyles\n} from '@fluentui/react';\n/* @conditional-compile-remove(DNS) */\nimport { Toggle, Stack, IStyleFunctionOrObject, IToggleStyleProps, IToggleStyles } from '@fluentui/react';\nimport { ControlBarButtonStyles } from './ControlBarButton';\nimport { OptionsDevice, generateDefaultDeviceMenuProps } from './DevicesButton';\nimport { Announcer } from './Announcer';\n\n/**\n * Strings of {@link MicrophoneButton} that can be overridden.\n *\n * @public\n */\nexport interface MicrophoneButtonStrings {\n /** Label when button is on. */\n onLabel: string;\n /** Label when button is off. */\n offLabel: string;\n /** * Tooltip content when the button is disabled. */\n tooltipDisabledContent?: string;\n /** Tooltip content when the button is on. */\n tooltipOnContent?: string;\n /** Tooltip content when the button is off. */\n tooltipOffContent?: string;\n /**\n * Title of microphone menu\n */\n microphoneMenuTitle?: string;\n /**\n * Title of speaker menu\n */\n speakerMenuTitle?: string;\n /**\n * Tooltip of microphone menu\n */\n microphoneMenuTooltip?: string;\n /**\n * Tooltip of speaker menu\n */\n speakerMenuTooltip?: string;\n /**\n * Description of microphone button split button role\n */\n microphoneButtonSplitRoleDescription?: string;\n /**\n * Microphone split button aria label when mic is enabled.\n */\n onSplitButtonAriaLabel?: string;\n /**\n * Microphone split button aria label when mic is disabled.\n */\n offSplitButtonAriaLabel?: string;\n /**\n * Microphone action turned on string for announcer\n */\n microphoneActionTurnedOnAnnouncement?: string;\n /**\n * Microphone action turned off string for announcer\n */\n microphoneActionTurnedOffAnnouncement?: string;\n /**\n * Primary action for the microphone when microphone is live.\n */\n onSplitButtonMicrophonePrimaryAction?: string;\n /**\n * Primary action for the microphone when the microphone is muted.\n */\n offSplitButtonMicrophonePrimaryAction?: string;\n /**\n * Title for primary action section of split button\n */\n microphonePrimaryActionSplitButtonTitle?: string;\n /**\n * Aria description for the microphone button\n */\n microphoneAriaDescription?: string;\n /* @conditional-compile-remove(DNS) */\n /**\n * Title for deep noise suppression button\n */\n deepNoiseSuppressionTitle?: string;\n /* @conditional-compile-remove(DNS) */\n /**\n * Noise Suppression turned on string for announcer\n */\n deepNoiseSuppressionOnAnnouncement?: string;\n /* @conditional-compile-remove(DNS) */\n /**\n * Noise Suppression turned off string for announcer\n */\n deepNoiseSuppressionOffAnnouncement?: string;\n}\n\n/**\n * Styles for {@link MicrophoneButton}\n *\n * @public\n */\nexport interface MicrophoneButtonStyles extends ControlBarButtonStyles {\n /**\n * Styles for the {@link MicrophoneButton} menu.\n */\n menuStyles?: Partial<MicrophoneButtonContextualMenuStyles>;\n}\n\n/**\n * Styles for the {@link MicrophoneButton} menu.\n *\n * @public\n */\nexport interface MicrophoneButtonContextualMenuStyles extends IContextualMenuStyles {\n /**\n * Styles for the items inside the {@link MicrophoneButton} button menu.\n */\n menuItemStyles?: IContextualMenuItemStyles;\n}\n\n/**\n * Props for {@link MicrophoneButton}.\n *\n * @public\n */\nexport interface MicrophoneButtonProps extends ControlBarButtonProps {\n /**\n * Utility property for using this component with `communication react eventHandlers`.\n * Maps directly to the `onClick` property.\n */\n onToggleMicrophone?: () => Promise<void>;\n /**\n * Available microphones for selection\n */\n microphones?: OptionsDevice[];\n /**\n * Available speakers for selection\n */\n speakers?: OptionsDevice[];\n /**\n * Microphone that is shown as currently selected\n */\n selectedMicrophone?: OptionsDevice;\n /**\n * Speaker that is shown as currently selected\n */\n selectedSpeaker?: OptionsDevice;\n /**\n * Callback when a microphone is selected\n */\n onSelectMicrophone?: (device: OptionsDevice) => Promise<void>;\n /**\n * Speaker when a speaker is selected\n */\n onSelectSpeaker?: (device: OptionsDevice) => Promise<void>;\n /**\n * Whether to use a {@link SplitButton} with a {@link IContextualMenu} for device selection.\n *\n * default: false\n */\n enableDeviceSelectionMenu?: boolean;\n /**\n * Optional strings to override in component\n */\n strings?: Partial<MicrophoneButtonStrings>;\n /**\n * Styles for {@link MicrophoneButton} and the device selection flyout.\n */\n styles?: Partial<MicrophoneButtonStyles>;\n /* @conditional-compile-remove(DNS) */\n /**\n * Whether the deep noise suppression is on or off\n */\n isDeepNoiseSuppressionOn?: boolean;\n /* @conditional-compile-remove(DNS) */\n /**\n * Callback when noise suppression is clicked\n */\n onClickNoiseSuppression?: () => void;\n /* @conditional-compile-remove(DNS) */\n /**\n * Show/Hide the deep noise suppression button\n */\n showNoiseSuppressionButton?: boolean;\n}\n\n/**\n * A button to turn microphone on / off.\n *\n * Can be used with {@link ControlBar}.\n *\n * @public\n */\nexport const MicrophoneButton = (props: MicrophoneButtonProps): JSX.Element => {\n const { onToggleMicrophone } = props;\n const localeStrings = useLocale().strings.microphoneButton;\n const strings = { ...localeStrings, ...props.strings };\n const [announcerString, setAnnouncerString] = useState<string | undefined>(undefined);\n\n const isSplit = props.split ?? props.enableDeviceSelectionMenu;\n\n // The button should be disabled when there are no mics. However if the button is a split button, if there are\n // no mics but there are speakers, then only the primary part of the button should be disabled to allow for\n // speaker change.\n const primaryDisabled = props.primaryDisabled || (isSplit && !props.microphones?.length ? true : undefined);\n const disabled =\n props.disabled ||\n (isSplit && !props.microphones?.length && !props.speakers?.length) ||\n (!isSplit && props.microphones && props.microphones?.length === 0);\n\n const onRenderMicOnIcon = (): JSX.Element => {\n return <_HighContrastAwareIcon disabled={disabled} iconName=\"ControlButtonMicOn\" />;\n };\n const onRenderMicOffIcon = (): JSX.Element => {\n return <_HighContrastAwareIcon disabled={disabled} iconName=\"ControlButtonMicOff\" />;\n };\n\n const isMicOn = props.checked;\n\n const splitButtonAriaString = isMicOn ? strings.onSplitButtonAriaLabel : strings.offSplitButtonAriaLabel;\n\n const toggleAnnouncerString = useCallback(\n (isMicOn: boolean) => {\n setAnnouncerString(\n !isMicOn ? strings.microphoneActionTurnedOffAnnouncement : strings.microphoneActionTurnedOnAnnouncement\n );\n },\n [strings.microphoneActionTurnedOffAnnouncement, strings.microphoneActionTurnedOnAnnouncement]\n );\n\n const onToggleClick = useCallback(async () => {\n if (onToggleMicrophone) {\n try {\n await onToggleMicrophone();\n // allows for the setting of narrator strings triggering the announcer when microphone is turned on or off.\n toggleAnnouncerString(!isMicOn);\n // eslint-disable-next-line no-empty\n } finally {\n }\n }\n }, [isMicOn, onToggleMicrophone, toggleAnnouncerString]);\n\n /* @conditional-compile-remove(DNS) */\n const deepNoiseSuppressionToggleStyles: IStyleFunctionOrObject<IToggleStyleProps, IToggleStyles> = {\n root: {\n margin: '4px',\n padding: '0px 12px',\n flexFlow: 'row-reverse',\n justifyContent: 'space-between'\n },\n label: { fontWeight: 400 }\n };\n\n const splitButtonMenuItems: IContextualMenuItem[] = [];\n\n /* @conditional-compile-remove(DNS) */\n if (props.showNoiseSuppressionButton) {\n splitButtonMenuItems.push({\n key: 'microphoneDNSToggle',\n onRender: () => {\n return (\n <Stack\n onClick={async () => {\n await props.onClickNoiseSuppression?.();\n setAnnouncerString(\n props.isDeepNoiseSuppressionOn\n ? strings.deepNoiseSuppressionOnAnnouncement\n : strings.deepNoiseSuppressionOffAnnouncement\n );\n }}\n >\n <Toggle\n label={strings.deepNoiseSuppressionTitle}\n checked={props.isDeepNoiseSuppressionOn}\n inlineLabel\n styles={deepNoiseSuppressionToggleStyles}\n />\n </Stack>\n );\n }\n });\n }\n\n splitButtonMenuItems.push({\n key: 'microphonePrimaryAction',\n text: props.checked ? strings.onSplitButtonMicrophonePrimaryAction : strings.offSplitButtonMicrophonePrimaryAction,\n onClick: () => {\n onToggleClick();\n },\n iconProps: {\n iconName: props.checked ? 'SplitButtonPrimaryActionMicUnmuted' : 'SplitButtonPrimaryActionMicMuted',\n styles: { root: { lineHeight: 0 } }\n }\n });\n\n /**\n * We need to also include the primary action of the button to the\n * split button for mobile devices.\n */\n const splitButtonPrimaryAction: IContextualMenuItem = {\n key: 'primaryAction',\n title: 'toggle mic',\n itemType: ContextualMenuItemType.Section,\n sectionProps: {\n topDivider: true,\n items: splitButtonMenuItems\n }\n };\n\n return (\n <>\n <Announcer announcementString={announcerString} ariaLive={'polite'} />\n <ControlBarButton\n {...props}\n onClick={props.onToggleMicrophone ? onToggleClick : props.onClick}\n onRenderOnIcon={props.onRenderOnIcon ?? onRenderMicOnIcon}\n onRenderOffIcon={props.onRenderOffIcon ?? onRenderMicOffIcon}\n strings={strings}\n labelKey={props.labelKey ?? 'microphoneButtonLabel'}\n menuProps={\n props.menuProps ??\n (props.enableDeviceSelectionMenu\n ? generateDefaultDeviceMenuProps(\n { ...props, styles: props.styles?.menuStyles },\n strings,\n splitButtonPrimaryAction\n )\n : undefined)\n }\n menuIconProps={props.menuIconProps ?? !props.enableDeviceSelectionMenu ? { hidden: true } : undefined}\n split={props.split ?? props.enableDeviceSelectionMenu}\n aria-roledescription={\n props.enableDeviceSelectionMenu ? strings.microphoneButtonSplitRoleDescription : undefined\n }\n aria-description={strings.microphoneAriaDescription}\n splitButtonAriaLabel={props.enableDeviceSelectionMenu ? splitButtonAriaString : undefined}\n disabled={disabled}\n primaryDisabled={primaryDisabled}\n />\n </>\n );\n};\n"]}
@@ -1,11 +1,12 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT License.
3
- import { ContextualMenu } from '@fluentui/react';
3
+ import { ContextualMenu, Stack } from '@fluentui/react';
4
4
  import { _convertRemToPx } from "../../../../acs-ui-common/src";
5
5
  import React, { useMemo } from 'react';
6
6
  import { useTheme } from '../../theming';
7
7
  import { _ModalClone } from '../ModalClone/ModalClone';
8
8
  import { floatingLocalVideoModalStyle, floatinglocalVideoModalInitialPositionGapRem } from './styles/FloatingLocalVideo.styles';
9
+ import { useLocale } from '../../localization';
9
10
  const DRAG_OPTIONS = {
10
11
  moveMenuItemText: 'Move',
11
12
  closeMenuItemText: 'Close',
@@ -24,8 +25,10 @@ const modalMaxDragPosition = {
24
25
  * @private
25
26
  */
26
27
  export const FloatingLocalVideo = (props) => {
28
+ var _a;
27
29
  const { localVideoComponent, layerHostId, localVideoSizeRem, parentWidth, parentHeight } = props;
28
30
  const theme = useTheme();
31
+ const strings = useLocale().strings.videoGallery;
29
32
  // The minimum drag position is the top left of the video gallery. i.e. the modal (PiP) should not be able
30
33
  // to be dragged offscreen and these are the top and left bounds of that calculation.
31
34
  const modalMinDragPosition = useMemo(() => parentWidth && parentHeight
@@ -42,6 +45,7 @@ export const FloatingLocalVideo = (props) => {
42
45
  : undefined, [parentHeight, parentWidth, localVideoSizeRem.width, localVideoSizeRem.height]);
43
46
  const modalStyles = useMemo(() => floatingLocalVideoModalStyle(theme, localVideoSizeRem), [theme, localVideoSizeRem]);
44
47
  const layerProps = useMemo(() => ({ hostId: layerHostId }), [layerHostId]);
45
- return (React.createElement(_ModalClone, { isOpen: true, isModeless: true, dragOptions: DRAG_OPTIONS, styles: modalStyles, layerProps: layerProps, maxDragPosition: modalMaxDragPosition, minDragPosition: modalMinDragPosition, "data-ui-id": "floating-local-video-host" }, localVideoComponent));
48
+ return (React.createElement(_ModalClone, { isOpen: true, isModeless: true, dragOptions: DRAG_OPTIONS, styles: modalStyles, layerProps: layerProps, maxDragPosition: modalMaxDragPosition, minDragPosition: modalMinDragPosition, "data-ui-id": "floating-local-video-host" },
49
+ React.createElement(Stack, { "aria-label": (_a = strings.localVideoMovementAriaLabel) !== null && _a !== void 0 ? _a : strings.localVideoMovementLabel, tabIndex: 0 }, localVideoComponent)));
46
50
  };
47
51
  //# sourceMappingURL=FloatingLocalVideo.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FloatingLocalVideo.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/VideoGallery/FloatingLocalVideo.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,cAAc,EAAgB,MAAM,iBAAiB,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,sCAAgC;AAC1D,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAiB,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,EACL,4BAA4B,EAC5B,4CAA4C,EAC7C,MAAM,oCAAoC,CAAC;AAE5C,MAAM,YAAY,GAAiB;IACjC,gBAAgB,EAAE,MAAM;IACxB,iBAAi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AE,CAAC,WAAW,CAAC,CAAC,CAAC;IAE3E,OAAO,CACL,oBAAC,WAAW,IACV,MAAM,EAAE,IAAI,EACZ,UAAU,EAAE,IAAI,EAChB,WAAW,EAAE,YAAY,EACzB,MAAM,EAAE,WAAW,EACnB,UAAU,EAAE,UAAU,EACtB,eAAe,EAAE,oBAAoB,EACrC,eAAe,EAAE,oBAAoB,gBAC1B,2BAA2B,IAErC,mBAAmB,CACR,CACf,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { ContextualMenu, IDragOptions } from '@fluentui/react';\nimport { _convertRemToPx } from '@internal/acs-ui-common';\nimport React, { useMemo } from 'react';\nimport { useTheme } from '../../theming';\nimport { _ICoordinates, _ModalClone } from '../ModalClone/ModalClone';\nimport {\n floatingLocalVideoModalStyle,\n floatinglocalVideoModalInitialPositionGapRem\n} from './styles/FloatingLocalVideo.styles';\n\nconst DRAG_OPTIONS: IDragOptions = {\n moveMenuItemText: 'Move',\n closeMenuItemText: 'Close',\n menu: ContextualMenu,\n keepInBounds: true\n};\n\n// Manually override the max position used to keep the modal in the bounds of its container.\n// This is a workaround for: https://github.com/microsoft/fluentui/issues/20122\n// Because our modal starts in the bottom right corner, we can say that this is the max (i.e. rightmost and bottomost)\n// position the modal can be dragged to.\nconst modalMaxDragPosition = {\n x: _convertRemToPx(floatinglocalVideoModalInitialPositionGapRem),\n y: _convertRemToPx(floatinglocalVideoModalInitialPositionGapRem)\n};\n\n/**\n * @private\n */\nexport interface FloatingLocalVideoProps {\n // Local video component to make draggable\n localVideoComponent: JSX.Element;\n // Element id of layer host to constrain the dragging of local video\n layerHostId: string;\n // Parent component width in px\n parentWidth?: number;\n // Parent component height in px\n parentHeight?: number;\n // Local video width and height in rem\n localVideoSizeRem: {\n width: number;\n height: number;\n };\n}\n\n/**\n * @private\n */\nexport const FloatingLocalVideo = (props: FloatingLocalVideoProps): JSX.Element => {\n const { localVideoComponent, layerHostId, localVideoSizeRem, parentWidth, parentHeight } = props;\n\n const theme = useTheme();\n\n // The minimum drag position is the top left of the video gallery. i.e. the modal (PiP) should not be able\n // to be dragged offscreen and these are the top and left bounds of that calculation.\n const modalMinDragPosition: _ICoordinates | undefined = useMemo(\n () =>\n parentWidth && parentHeight\n ? {\n // We use -parentWidth/Height because our modal is positioned to start in the bottom right,\n // hence (0,0) is the bottom right of the video gallery.\n x:\n -parentWidth +\n _convertRemToPx(localVideoSizeRem.width) +\n _convertRemToPx(floatinglocalVideoModalInitialPositionGapRem),\n y:\n -parentHeight +\n _convertRemToPx(localVideoSizeRem.height) +\n _convertRemToPx(floatinglocalVideoModalInitialPositionGapRem)\n }\n : undefined,\n [parentHeight, parentWidth, localVideoSizeRem.width, localVideoSizeRem.height]\n );\n\n const modalStyles = useMemo(() => floatingLocalVideoModalStyle(theme, localVideoSizeRem), [theme, localVideoSizeRem]);\n const layerProps = useMemo(() => ({ hostId: layerHostId }), [layerHostId]);\n\n return (\n <_ModalClone\n isOpen={true}\n isModeless={true}\n dragOptions={DRAG_OPTIONS}\n styles={modalStyles}\n layerProps={layerProps}\n maxDragPosition={modalMaxDragPosition}\n minDragPosition={modalMinDragPosition}\n data-ui-id=\"floating-local-video-host\"\n >\n {localVideoComponent}\n </_ModalClone>\n );\n};\n"]}
1
+ {"version":3,"file":"FloatingLocalVideo.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/VideoGallery/FloatingLocalVideo.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,cAAc,EAAgB,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,sCAAgC;AAC1D,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAiB,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,EACL,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AM,WAAW,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,4BAA4B,CAAC,KAAK,EAAE,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,CAAC,CAAC,CAAC;IACtH,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC;IAE3E,OAAO,CACL,oBAAC,WAAW,IACV,MAAM,EAAE,IAAI,EACZ,UAAU,EAAE,IAAI,EAChB,WAAW,EAAE,YAAY,EACzB,MAAM,EAAE,WAAW,EACnB,UAAU,EAAE,UAAU,EACtB,eAAe,EAAE,oBAAoB,EACrC,eAAe,EAAE,oBAAoB,gBAC1B,2BAA2B;QAEtC,oBAAC,KAAK,kBAAa,MAAA,OAAO,CAAC,2BAA2B,mCAAI,OAAO,CAAC,uBAAuB,EAAE,QAAQ,EAAE,CAAC,IACnG,mBAAmB,CACd,CACI,CACf,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { ContextualMenu, IDragOptions, Stack } from '@fluentui/react';\nimport { _convertRemToPx } from '@internal/acs-ui-common';\nimport React, { useMemo } from 'react';\nimport { useTheme } from '../../theming';\nimport { _ICoordinates, _ModalClone } from '../ModalClone/ModalClone';\nimport {\n floatingLocalVideoModalStyle,\n floatinglocalVideoModalInitialPositionGapRem\n} from './styles/FloatingLocalVideo.styles';\nimport { useLocale } from '../../localization';\n\nconst DRAG_OPTIONS: IDragOptions = {\n moveMenuItemText: 'Move',\n closeMenuItemText: 'Close',\n menu: ContextualMenu,\n keepInBounds: true\n};\n\n// Manually override the max position used to keep the modal in the bounds of its container.\n// This is a workaround for: https://github.com/microsoft/fluentui/issues/20122\n// Because our modal starts in the bottom right corner, we can say that this is the max (i.e. rightmost and bottomost)\n// position the modal can be dragged to.\nconst modalMaxDragPosition = {\n x: _convertRemToPx(floatinglocalVideoModalInitialPositionGapRem),\n y: _convertRemToPx(floatinglocalVideoModalInitialPositionGapRem)\n};\n\n/**\n * @private\n */\nexport interface FloatingLocalVideoProps {\n // Local video component to make draggable\n localVideoComponent: JSX.Element;\n // Element id of layer host to constrain the dragging of local video\n layerHostId: string;\n // Parent component width in px\n parentWidth?: number;\n // Parent component height in px\n parentHeight?: number;\n // Local video width and height in rem\n localVideoSizeRem: {\n width: number;\n height: number;\n };\n}\n\n/**\n * @private\n */\nexport const FloatingLocalVideo = (props: FloatingLocalVideoProps): JSX.Element => {\n const { localVideoComponent, layerHostId, localVideoSizeRem, parentWidth, parentHeight } = props;\n\n const theme = useTheme();\n const strings = useLocale().strings.videoGallery;\n\n // The minimum drag position is the top left of the video gallery. i.e. the modal (PiP) should not be able\n // to be dragged offscreen and these are the top and left bounds of that calculation.\n const modalMinDragPosition: _ICoordinates | undefined = useMemo(\n () =>\n parentWidth && parentHeight\n ? {\n // We use -parentWidth/Height because our modal is positioned to start in the bottom right,\n // hence (0,0) is the bottom right of the video gallery.\n x:\n -parentWidth +\n _convertRemToPx(localVideoSizeRem.width) +\n _convertRemToPx(floatinglocalVideoModalInitialPositionGapRem),\n y:\n -parentHeight +\n _convertRemToPx(localVideoSizeRem.height) +\n _convertRemToPx(floatinglocalVideoModalInitialPositionGapRem)\n }\n : undefined,\n [parentHeight, parentWidth, localVideoSizeRem.width, localVideoSizeRem.height]\n );\n\n const modalStyles = useMemo(() => floatingLocalVideoModalStyle(theme, localVideoSizeRem), [theme, localVideoSizeRem]);\n const layerProps = useMemo(() => ({ hostId: layerHostId }), [layerHostId]);\n\n return (\n <_ModalClone\n isOpen={true}\n isModeless={true}\n dragOptions={DRAG_OPTIONS}\n styles={modalStyles}\n layerProps={layerProps}\n maxDragPosition={modalMaxDragPosition}\n minDragPosition={modalMinDragPosition}\n data-ui-id=\"floating-local-video-host\"\n >\n <Stack aria-label={strings.localVideoMovementAriaLabel ?? strings.localVideoMovementLabel} tabIndex={0}>\n {localVideoComponent}\n </Stack>\n </_ModalClone>\n );\n};\n"]}
@@ -106,7 +106,7 @@ export const VideoGallery = (props) => {
106
106
  * Utility function for memoized rendering of LocalParticipant.
107
107
  */
108
108
  const localVideoTile = useMemo(() => {
109
- var _a, _b, _c;
109
+ var _a, _b;
110
110
  if (localVideoTileSize === 'hidden') {
111
111
  return undefined;
112
112
  }
@@ -122,8 +122,8 @@ export const VideoGallery = (props) => {
122
122
  return layout === 'default' ? strings.localVideoLabel : isNarrow ? '' : strings.localVideoLabel;
123
123
  return isNarrow ? '' : strings.localVideoLabel;
124
124
  };
125
- return (React.createElement(Stack, { styles: localVideoTileContainerStyles, key: "local-video-tile-key", tabIndex: 0, "aria-label": (_a = strings.localVideoMovementAriaLabel) !== null && _a !== void 0 ? _a : strings.localVideoMovementLabel, role: 'dialog' },
126
- React.createElement(_LocalVideoTile, { alwaysShowLabelBackground: videoTilesOptions === null || videoTilesOptions === void 0 ? void 0 : videoTilesOptions.alwaysShowLabelBackground, userId: localParticipant.userId, onCreateLocalStreamView: onCreateLocalStreamView, onDisposeLocalStreamView: onDisposeLocalStreamView, isAvailable: (_b = localParticipant === null || localParticipant === void 0 ? void 0 : localParticipant.videoStream) === null || _b === void 0 ? void 0 : _b.isAvailable, isMuted: localParticipant.isMuted, renderElement: (_c = localParticipant === null || localParticipant === void 0 ? void 0 : localParticipant.videoStream) === null || _c === void 0 ? void 0 : _c.renderElement, displayName: showDisplayNameTrampoline(), initialsName: initialsName, localVideoViewOptions: localVideoViewOptions, onRenderAvatar: onRenderAvatar, showLabel: showLocalVideoTileLabel, showMuteIndicator: showMuteIndicator, showCameraSwitcherInLocalPreview: showCameraSwitcherInLocalPreview, localVideoCameraCycleButtonProps: localVideoCameraCycleButtonProps, localVideoCameraSwitcherLabel: strings.localVideoCameraSwitcherLabel, localVideoSelectedDescription: strings.localVideoSelectedDescription, styles: localVideoTileStyles, raisedHand: localParticipant.raisedHand, reaction: localParticipant.reaction, spotlightedParticipantUserIds: spotlightedParticipants, isSpotlighted: isSpotlighted, onStartSpotlight: onStartLocalSpotlight, onStopSpotlight: onStopLocalSpotlight, maxParticipantsToSpotlight: maxParticipantsToSpotlight, menuKind: remoteVideoTileMenu ? (remoteVideoTileMenu.kind === 'drawer' ? 'drawer' : 'contextual') : undefined, drawerMenuHostId: drawerMenuHostId, strings: strings, reactionResources: reactionResources, participantsCount: remoteParticipants.length + 1 })));
125
+ return (React.createElement(Stack, { styles: localVideoTileContainerStyles, key: "local-video-tile-key", role: 'dialog' },
126
+ React.createElement(_LocalVideoTile, { alwaysShowLabelBackground: videoTilesOptions === null || videoTilesOptions === void 0 ? void 0 : videoTilesOptions.alwaysShowLabelBackground, userId: localParticipant.userId, onCreateLocalStreamView: onCreateLocalStreamView, onDisposeLocalStreamView: onDisposeLocalStreamView, isAvailable: (_a = localParticipant === null || localParticipant === void 0 ? void 0 : localParticipant.videoStream) === null || _a === void 0 ? void 0 : _a.isAvailable, isMuted: localParticipant.isMuted, renderElement: (_b = localParticipant === null || localParticipant === void 0 ? void 0 : localParticipant.videoStream) === null || _b === void 0 ? void 0 : _b.renderElement, displayName: showDisplayNameTrampoline(), initialsName: initialsName, localVideoViewOptions: localVideoViewOptions, onRenderAvatar: onRenderAvatar, showLabel: showLocalVideoTileLabel, showMuteIndicator: showMuteIndicator, showCameraSwitcherInLocalPreview: showCameraSwitcherInLocalPreview, localVideoCameraCycleButtonProps: localVideoCameraCycleButtonProps, localVideoCameraSwitcherLabel: strings.localVideoCameraSwitcherLabel, localVideoSelectedDescription: strings.localVideoSelectedDescription, styles: localVideoTileStyles, raisedHand: localParticipant.raisedHand, reaction: localParticipant.reaction, spotlightedParticipantUserIds: spotlightedParticipants, isSpotlighted: isSpotlighted, onStartSpotlight: onStartLocalSpotlight, onStopSpotlight: onStopLocalSpotlight, maxParticipantsToSpotlight: maxParticipantsToSpotlight, menuKind: remoteVideoTileMenu ? (remoteVideoTileMenu.kind === 'drawer' ? 'drawer' : 'contextual') : undefined, drawerMenuHostId: drawerMenuHostId, strings: strings, reactionResources: reactionResources, participantsCount: remoteParticipants.length + 1 })));
127
127
  }, [
128
128
  isNarrow,
129
129
  localParticipant,