@azure/communication-react 1.0.0-alpha-20211130.12.0 → 1.0.0-alpha
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/communication-react.d.ts +214 -0
- package/dist/dist-cjs/communication-react/index.js +1254 -236
- package/dist/dist-cjs/communication-react/index.js.map +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
- package/dist/dist-esm/calling-stateful-client/src/StreamUtils.d.ts.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/StreamUtils.js +6 -3
- package/dist/dist-esm/calling-stateful-client/src/StreamUtils.js.map +1 -1
- package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.js +1 -1
- package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ControlBarButton.d.ts.map +1 -1
- package/dist/dist-esm/react-components/src/components/ControlBarButton.js +10 -16
- package/dist/dist-esm/react-components/src/components/ControlBarButton.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/MessageThread.js +1 -1
- package/dist/dist-esm/react-components/src/components/ScreenShareButton.d.ts.map +1 -1
- package/dist/dist-esm/react-components/src/components/ScreenShareButton.js +18 -2
- package/dist/dist-esm/react-components/src/components/ScreenShareButton.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery.d.ts.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery.js +6 -3
- package/dist/dist-esm/react-components/src/components/VideoGallery.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/ControlBar.styles.d.ts +0 -4
- package/dist/dist-esm/react-components/src/components/styles/ControlBar.styles.d.ts.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/ControlBar.styles.js +8 -10
- package/dist/dist-esm/react-components/src/components/styles/ControlBar.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/VideoGallery.styles.d.ts +4 -0
- package/dist/dist-esm/react-components/src/components/styles/VideoGallery.styles.d.ts.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/VideoGallery.styles.js +8 -16
- package/dist/dist-esm/react-components/src/components/styles/VideoGallery.styles.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.d.ts.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js +3 -5
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.d.ts.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js +18 -15
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallControls.styles.d.ts +1 -5
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallControls.styles.d.ts.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallControls.styles.js +0 -12
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallControls.styles.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.d.ts +7 -0
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.d.ts.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.d.ts.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js +14 -7
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/MeetingComposite/ChatButton.d.ts +7 -0
- package/dist/dist-esm/react-composites/src/composites/MeetingComposite/ChatButton.d.ts.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/MeetingComposite/ChatButton.js +16 -0
- package/dist/dist-esm/react-composites/src/composites/MeetingComposite/ChatButton.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/MeetingComposite/MeetingCallControlBar.d.ts +19 -0
- package/dist/dist-esm/react-composites/src/composites/MeetingComposite/MeetingCallControlBar.d.ts.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/MeetingComposite/MeetingCallControlBar.js +38 -0
- package/dist/dist-esm/react-composites/src/composites/MeetingComposite/MeetingCallControlBar.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/MeetingComposite/MeetingComposite.d.ts +37 -0
- package/dist/dist-esm/react-composites/src/composites/MeetingComposite/MeetingComposite.d.ts.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/MeetingComposite/MeetingComposite.js +59 -0
- package/dist/dist-esm/react-composites/src/composites/MeetingComposite/MeetingComposite.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/MeetingComposite/PeopleButton.d.ts +7 -0
- package/dist/dist-esm/react-composites/src/composites/MeetingComposite/PeopleButton.d.ts.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/MeetingComposite/PeopleButton.js +16 -0
- package/dist/dist-esm/react-composites/src/composites/MeetingComposite/PeopleButton.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/MeetingComposite/SidePane.d.ts +25 -0
- package/dist/dist-esm/react-composites/src/composites/MeetingComposite/SidePane.d.ts.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/MeetingComposite/SidePane.js +76 -0
- package/dist/dist-esm/react-composites/src/composites/MeetingComposite/SidePane.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/MeetingComposite/adapter/AzureCommunicationMeetingAdapter.d.ts +129 -0
- package/dist/dist-esm/react-composites/src/composites/MeetingComposite/adapter/AzureCommunicationMeetingAdapter.d.ts.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/MeetingComposite/adapter/AzureCommunicationMeetingAdapter.js +385 -0
- package/dist/dist-esm/react-composites/src/composites/MeetingComposite/adapter/AzureCommunicationMeetingAdapter.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/MeetingComposite/adapter/MeetingAdapter.d.ts +73 -0
- package/dist/dist-esm/react-composites/src/composites/MeetingComposite/adapter/MeetingAdapter.d.ts.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/MeetingComposite/adapter/MeetingAdapter.js +4 -0
- package/dist/dist-esm/react-composites/src/composites/MeetingComposite/adapter/MeetingAdapter.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/MeetingComposite/adapter/MeetingBackedCallAdapter.d.ts +40 -0
- package/dist/dist-esm/react-composites/src/composites/MeetingComposite/adapter/MeetingBackedCallAdapter.d.ts.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/MeetingComposite/adapter/MeetingBackedCallAdapter.js +100 -0
- package/dist/dist-esm/react-composites/src/composites/MeetingComposite/adapter/MeetingBackedCallAdapter.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/MeetingComposite/adapter/MeetingBackedChatAdapter.d.ts +30 -0
- package/dist/dist-esm/react-composites/src/composites/MeetingComposite/adapter/MeetingBackedChatAdapter.d.ts.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/MeetingComposite/adapter/MeetingBackedChatAdapter.js +79 -0
- package/dist/dist-esm/react-composites/src/composites/MeetingComposite/adapter/MeetingBackedChatAdapter.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/MeetingComposite/index.d.ts +10 -0
- package/dist/dist-esm/react-composites/src/composites/MeetingComposite/index.d.ts.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/MeetingComposite/index.js +5 -0
- package/dist/dist-esm/react-composites/src/composites/MeetingComposite/index.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/MeetingComposite/state/MeetingAdapterState.d.ts +50 -0
- package/dist/dist-esm/react-composites/src/composites/MeetingComposite/state/MeetingAdapterState.d.ts.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/MeetingComposite/state/MeetingAdapterState.js +50 -0
- package/dist/dist-esm/react-composites/src/composites/MeetingComposite/state/MeetingAdapterState.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/MeetingComposite/state/MeetingCompositePage.d.ts +21 -0
- package/dist/dist-esm/react-composites/src/composites/MeetingComposite/state/MeetingCompositePage.d.ts.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/MeetingComposite/state/MeetingCompositePage.js +41 -0
- package/dist/dist-esm/react-composites/src/composites/MeetingComposite/state/MeetingCompositePage.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/MeetingComposite/state/MeetingEndReason.d.ts +8 -0
- package/dist/dist-esm/react-composites/src/composites/MeetingComposite/state/MeetingEndReason.d.ts.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/MeetingComposite/state/MeetingEndReason.js +4 -0
- package/dist/dist-esm/react-composites/src/composites/MeetingComposite/state/MeetingEndReason.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/MeetingComposite/state/MeetingParticipants.d.ts +35 -0
- package/dist/dist-esm/react-composites/src/composites/MeetingComposite/state/MeetingParticipants.d.ts.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/MeetingComposite/state/MeetingParticipants.js +51 -0
- package/dist/dist-esm/react-composites/src/composites/MeetingComposite/state/MeetingParticipants.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/MeetingComposite/state/MeetingState.d.ts +42 -0
- package/dist/dist-esm/react-composites/src/composites/MeetingComposite/state/MeetingState.d.ts.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/MeetingComposite/state/MeetingState.js +72 -0
- package/dist/dist-esm/react-composites/src/composites/MeetingComposite/state/MeetingState.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/MeetingComposite/styles/MeetingCompositeStyles.d.ts +6 -0
- package/dist/dist-esm/react-composites/src/composites/MeetingComposite/styles/MeetingCompositeStyles.d.ts.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/MeetingComposite/styles/MeetingCompositeStyles.js +17 -0
- package/dist/dist-esm/react-composites/src/composites/MeetingComposite/styles/MeetingCompositeStyles.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/MeetingComposite/styles/SidePane.styles.d.ts +38 -0
- package/dist/dist-esm/react-composites/src/composites/MeetingComposite/styles/SidePane.styles.d.ts.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/MeetingComposite/styles/SidePane.styles.js +63 -0
- package/dist/dist-esm/react-composites/src/composites/MeetingComposite/styles/SidePane.styles.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/index.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/index.d.ts.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/index.js +1 -0
- package/dist/dist-esm/react-composites/src/composites/index.js.map +1 -1
- package/package.json +7 -7
|
@@ -187,7 +187,7 @@ const fromFlatCommunicationIdentifier = (id) => {
|
|
|
187
187
|
// Copyright (c) Microsoft Corporation.
|
|
188
188
|
// Licensed under the MIT license.
|
|
189
189
|
// GENERATED FILE. DO NOT EDIT MANUALLY.
|
|
190
|
-
var telemetryVersion = '1.0.0-alpha
|
|
190
|
+
var telemetryVersion = '1.0.0-alpha+20211203.0008.0';
|
|
191
191
|
|
|
192
192
|
// Copyright (c) Microsoft Corporation.
|
|
193
193
|
/**
|
|
@@ -291,7 +291,7 @@ const getDiagnostics = (state, props) => { var _a; return (_a = state.calls[prop
|
|
|
291
291
|
|
|
292
292
|
// Copyright (c) Microsoft Corporation.
|
|
293
293
|
// Licensed under the MIT license.
|
|
294
|
-
var __awaiter$
|
|
294
|
+
var __awaiter$p = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
295
295
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
296
296
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
297
297
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -329,7 +329,7 @@ const _isPreviewOn = (deviceManager) => {
|
|
|
329
329
|
*
|
|
330
330
|
* @private
|
|
331
331
|
*/
|
|
332
|
-
const disposeAllLocalPreviewViews = (callClient) => __awaiter$
|
|
332
|
+
const disposeAllLocalPreviewViews = (callClient) => __awaiter$p(void 0, void 0, void 0, function* () {
|
|
333
333
|
const unparentedViews = callClient.getState().deviceManager.unparentedViews;
|
|
334
334
|
for (const view of unparentedViews) {
|
|
335
335
|
yield callClient.disposeView(undefined, undefined, view);
|
|
@@ -391,7 +391,7 @@ const devicesButtonSelector = reselect__namespace.createSelector([getDeviceManag
|
|
|
391
391
|
|
|
392
392
|
// Copyright (c) Microsoft Corporation.
|
|
393
393
|
// Licensed under the MIT license.
|
|
394
|
-
var __awaiter$
|
|
394
|
+
var __awaiter$o = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
395
395
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
396
396
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
397
397
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -415,7 +415,7 @@ const areStreamsEqual = (prevStream, newStream) => {
|
|
|
415
415
|
* @public
|
|
416
416
|
*/
|
|
417
417
|
const createDefaultCallingHandlers = memoizeOne__default['default']((callClient, callAgent, deviceManager, call) => {
|
|
418
|
-
const onStartLocalVideo = () => __awaiter$
|
|
418
|
+
const onStartLocalVideo = () => __awaiter$o(void 0, void 0, void 0, function* () {
|
|
419
419
|
// Before the call object creates a stream, dispose of any local preview streams.
|
|
420
420
|
// @TODO: is there any way to parent the unparented view to the call object instead
|
|
421
421
|
// of disposing and creating a new stream?
|
|
@@ -435,7 +435,7 @@ const createDefaultCallingHandlers = memoizeOne__default['default']((callClient,
|
|
|
435
435
|
yield call.startVideo(stream);
|
|
436
436
|
}
|
|
437
437
|
});
|
|
438
|
-
const onStopLocalVideo = (stream) => __awaiter$
|
|
438
|
+
const onStopLocalVideo = (stream) => __awaiter$o(void 0, void 0, void 0, function* () {
|
|
439
439
|
const callId = call === null || call === void 0 ? void 0 : call.id;
|
|
440
440
|
if (!callId) {
|
|
441
441
|
return;
|
|
@@ -448,7 +448,7 @@ const createDefaultCallingHandlers = memoizeOne__default['default']((callClient,
|
|
|
448
448
|
});
|
|
449
449
|
}
|
|
450
450
|
});
|
|
451
|
-
const onToggleCamera = (options) => __awaiter$
|
|
451
|
+
const onToggleCamera = (options) => __awaiter$o(void 0, void 0, void 0, function* () {
|
|
452
452
|
if (call && _isInCall(call.state)) {
|
|
453
453
|
const stream = call.localVideoStreams.find((stream) => stream.mediaStreamType === 'Video');
|
|
454
454
|
if (stream) {
|
|
@@ -478,19 +478,19 @@ const createDefaultCallingHandlers = memoizeOne__default['default']((callClient,
|
|
|
478
478
|
const onStartCall = (participants, options) => {
|
|
479
479
|
return callAgent ? callAgent.startCall(participants, options) : undefined;
|
|
480
480
|
};
|
|
481
|
-
const onSelectMicrophone = (device) => __awaiter$
|
|
481
|
+
const onSelectMicrophone = (device) => __awaiter$o(void 0, void 0, void 0, function* () {
|
|
482
482
|
if (!deviceManager) {
|
|
483
483
|
return;
|
|
484
484
|
}
|
|
485
485
|
return deviceManager.selectMicrophone(device);
|
|
486
486
|
});
|
|
487
|
-
const onSelectSpeaker = (device) => __awaiter$
|
|
487
|
+
const onSelectSpeaker = (device) => __awaiter$o(void 0, void 0, void 0, function* () {
|
|
488
488
|
if (!deviceManager) {
|
|
489
489
|
return;
|
|
490
490
|
}
|
|
491
491
|
return deviceManager.selectSpeaker(device);
|
|
492
492
|
});
|
|
493
|
-
const onSelectCamera = (device, options) => __awaiter$
|
|
493
|
+
const onSelectCamera = (device, options) => __awaiter$o(void 0, void 0, void 0, function* () {
|
|
494
494
|
if (!deviceManager) {
|
|
495
495
|
return;
|
|
496
496
|
}
|
|
@@ -513,17 +513,17 @@ const createDefaultCallingHandlers = memoizeOne__default['default']((callClient,
|
|
|
513
513
|
}, options);
|
|
514
514
|
}
|
|
515
515
|
});
|
|
516
|
-
const onToggleMicrophone = () => __awaiter$
|
|
516
|
+
const onToggleMicrophone = () => __awaiter$o(void 0, void 0, void 0, function* () {
|
|
517
517
|
if (!call || !_isInCall(call.state)) {
|
|
518
518
|
throw new Error(`Please invoke onToggleMicrophone after call is started`);
|
|
519
519
|
}
|
|
520
520
|
return call.isMuted ? yield call.unmute() : yield call.mute();
|
|
521
521
|
});
|
|
522
|
-
const onStartScreenShare = () => __awaiter$
|
|
523
|
-
const onStopScreenShare = () => __awaiter$
|
|
524
|
-
const onToggleScreenShare = () => __awaiter$
|
|
525
|
-
const onHangUp = () => __awaiter$
|
|
526
|
-
const onCreateLocalStreamView = (options) => __awaiter$
|
|
522
|
+
const onStartScreenShare = () => __awaiter$o(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.startScreenSharing()); });
|
|
523
|
+
const onStopScreenShare = () => __awaiter$o(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.stopScreenSharing()); });
|
|
524
|
+
const onToggleScreenShare = () => __awaiter$o(void 0, void 0, void 0, function* () { return (call === null || call === void 0 ? void 0 : call.isScreenSharingOn) ? yield onStopScreenShare() : yield onStartScreenShare(); });
|
|
525
|
+
const onHangUp = () => __awaiter$o(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.hangUp()); });
|
|
526
|
+
const onCreateLocalStreamView = (options) => __awaiter$o(void 0, void 0, void 0, function* () {
|
|
527
527
|
if (!call || call.localVideoStreams.length === 0) {
|
|
528
528
|
return;
|
|
529
529
|
}
|
|
@@ -537,7 +537,7 @@ const createDefaultCallingHandlers = memoizeOne__default['default']((callClient,
|
|
|
537
537
|
}
|
|
538
538
|
return callClient.createView(call.id, undefined, localStream, options);
|
|
539
539
|
});
|
|
540
|
-
const onCreateRemoteStreamView = (userId, options = { scalingMode: 'Crop' }) => __awaiter$
|
|
540
|
+
const onCreateRemoteStreamView = (userId, options = { scalingMode: 'Crop' }) => __awaiter$o(void 0, void 0, void 0, function* () {
|
|
541
541
|
if (!call) {
|
|
542
542
|
return;
|
|
543
543
|
}
|
|
@@ -561,7 +561,7 @@ const createDefaultCallingHandlers = memoizeOne__default['default']((callClient,
|
|
|
561
561
|
callClient.createView(call.id, participant.identifier, screenShareStream, { scalingMode: 'Fit' });
|
|
562
562
|
}
|
|
563
563
|
});
|
|
564
|
-
const onDisposeRemoteStreamView = (userId) => __awaiter$
|
|
564
|
+
const onDisposeRemoteStreamView = (userId) => __awaiter$o(void 0, void 0, void 0, function* () {
|
|
565
565
|
if (!call) {
|
|
566
566
|
return;
|
|
567
567
|
}
|
|
@@ -582,13 +582,13 @@ const createDefaultCallingHandlers = memoizeOne__default['default']((callClient,
|
|
|
582
582
|
callClient.disposeView(call.id, participant.identifier, screenShareStream);
|
|
583
583
|
}
|
|
584
584
|
});
|
|
585
|
-
const onDisposeLocalStreamView = () => __awaiter$
|
|
585
|
+
const onDisposeLocalStreamView = () => __awaiter$o(void 0, void 0, void 0, function* () {
|
|
586
586
|
// TODO: we need to remember which LocalVideoStream was used for LocalPreview and dispose that one. For now
|
|
587
587
|
// assume any unparented view is a LocalPreview and stop all since those are only used for LocalPreview
|
|
588
588
|
// currently.
|
|
589
589
|
yield disposeAllLocalPreviewViews(callClient);
|
|
590
590
|
});
|
|
591
|
-
const onRemoveParticipant = (userId) => __awaiter$
|
|
591
|
+
const onRemoveParticipant = (userId) => __awaiter$o(void 0, void 0, void 0, function* () {
|
|
592
592
|
yield (call === null || call === void 0 ? void 0 : call.removeParticipant(fromFlatCommunicationIdentifier(userId)));
|
|
593
593
|
});
|
|
594
594
|
return {
|
|
@@ -2526,7 +2526,7 @@ const ChatMessageComponentAsMessageBubble = (props) => {
|
|
|
2526
2526
|
|
|
2527
2527
|
// Copyright (c) Microsoft Corporation.
|
|
2528
2528
|
// Licensed under the MIT license.
|
|
2529
|
-
var __awaiter$
|
|
2529
|
+
var __awaiter$n = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2530
2530
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
2531
2531
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
2532
2532
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -2552,7 +2552,7 @@ const ChatMessageComponent = (props) => {
|
|
|
2552
2552
|
return React__default['default'].createElement(React__default['default'].Fragment, null);
|
|
2553
2553
|
}
|
|
2554
2554
|
else if (isEditing) {
|
|
2555
|
-
return (React__default['default'].createElement(ChatMessageComponentAsEditBox, { initialValue: (_a = props.message.content) !== null && _a !== void 0 ? _a : '', inlineEditButtons: props.inlineAcceptRejectEditButtons, strings: props.strings, onSubmit: (text) => __awaiter$
|
|
2555
|
+
return (React__default['default'].createElement(ChatMessageComponentAsEditBox, { initialValue: (_a = props.message.content) !== null && _a !== void 0 ? _a : '', inlineEditButtons: props.inlineAcceptRejectEditButtons, strings: props.strings, onSubmit: (text) => __awaiter$n(void 0, void 0, void 0, function* () {
|
|
2556
2556
|
props.onUpdateMessage &&
|
|
2557
2557
|
props.message.messageId &&
|
|
2558
2558
|
(yield props.onUpdateMessage(props.message.messageId, text));
|
|
@@ -2610,7 +2610,7 @@ const isNarrowWidth = (containerWidthRem) => containerWidthRem <= convertRemToPx
|
|
|
2610
2610
|
|
|
2611
2611
|
// Copyright (c) Microsoft Corporation.
|
|
2612
2612
|
// Licensed under the MIT license.
|
|
2613
|
-
var __awaiter$
|
|
2613
|
+
var __awaiter$m = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2614
2614
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
2615
2615
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
2616
2616
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -2787,7 +2787,7 @@ const getLastChatMessageIdWithStatus = (messages, status) => {
|
|
|
2787
2787
|
*/
|
|
2788
2788
|
const MessageThread = (props) => {
|
|
2789
2789
|
var _a;
|
|
2790
|
-
const { messages: newMessages, userId, styles, disableJumpToNewMessageButton = false, showMessageDate = false, showMessageStatus = false, numberOfChatMessagesToReload =
|
|
2790
|
+
const { messages: newMessages, userId, styles, disableJumpToNewMessageButton = false, showMessageDate = false, showMessageStatus = false, numberOfChatMessagesToReload = 5, onMessageSeen, onRenderMessageStatus, onRenderAvatar, onLoadPreviousChatMessages, onRenderJumpToNewMessageButton, onRenderMessage, onUpdateMessage, onDeleteMessage } = props;
|
|
2791
2791
|
const [messages, setMessages] = React.useState([]);
|
|
2792
2792
|
// We need this state to wait for one tick and scroll to bottom after messages have been initialized.
|
|
2793
2793
|
// Otherwise chatScrollDivRef.current.clientHeight is wrong if we scroll to bottom before messages are initialized.
|
|
@@ -2829,7 +2829,7 @@ const MessageThread = (props) => {
|
|
|
2829
2829
|
setChatMessagesInitialized(chatMessagesInitialized);
|
|
2830
2830
|
};
|
|
2831
2831
|
// we try to only send those message status if user is scrolled to the bottom.
|
|
2832
|
-
const sendMessageStatusIfAtBottom = React.useCallback(() => __awaiter$
|
|
2832
|
+
const sendMessageStatusIfAtBottom = React.useCallback(() => __awaiter$m(void 0, void 0, void 0, function* () {
|
|
2833
2833
|
if (!isAtBottomOfScrollRef.current ||
|
|
2834
2834
|
!document.hasFocus() ||
|
|
2835
2835
|
!messagesRef.current ||
|
|
@@ -2880,7 +2880,7 @@ const MessageThread = (props) => {
|
|
|
2880
2880
|
setIsAtBottomOfScrollRef(atBottom);
|
|
2881
2881
|
}, [scrollToBottom, sendMessageStatusIfAtBottom]);
|
|
2882
2882
|
// Infinite scrolling + threadInitialize function
|
|
2883
|
-
const fetchNewMessageWhenAtTop = React.useCallback(() => __awaiter$
|
|
2883
|
+
const fetchNewMessageWhenAtTop = React.useCallback(() => __awaiter$m(void 0, void 0, void 0, function* () {
|
|
2884
2884
|
if (chatScrollDivRef.current && !isLoadingChatMessagesRef.current) {
|
|
2885
2885
|
if (onLoadPreviousChatMessages) {
|
|
2886
2886
|
isLoadingChatMessagesRef.current = true;
|
|
@@ -3225,7 +3225,7 @@ const ParticipantItem = (props) => {
|
|
|
3225
3225
|
/**
|
|
3226
3226
|
* @private
|
|
3227
3227
|
*/
|
|
3228
|
-
const participantListStyle = react.mergeStyles({
|
|
3228
|
+
const participantListStyle$1 = react.mergeStyles({
|
|
3229
3229
|
height: '100%',
|
|
3230
3230
|
padding: '0.125rem'
|
|
3231
3231
|
});
|
|
@@ -3318,7 +3318,7 @@ const ParticipantList = (props) => {
|
|
|
3318
3318
|
return menuItems;
|
|
3319
3319
|
};
|
|
3320
3320
|
const participantItemStyles = react.merge(participantListItemStyle, (_a = props.styles) === null || _a === void 0 ? void 0 : _a.participantItemStyles);
|
|
3321
|
-
return (React__default['default'].createElement(react.Stack, { "data-ui-id": ids.participantList, className: react.mergeStyles(participantListStyle, (_b = props.styles) === null || _b === void 0 ? void 0 : _b.root) }, displayedParticipants.map((participant) => onRenderParticipant
|
|
3321
|
+
return (React__default['default'].createElement(react.Stack, { "data-ui-id": ids.participantList, className: react.mergeStyles(participantListStyle$1, (_b = props.styles) === null || _b === void 0 ? void 0 : _b.root) }, displayedParticipants.map((participant) => onRenderParticipant
|
|
3322
3322
|
? onRenderParticipant(participant)
|
|
3323
3323
|
: onRenderParticipantDefault(participant, strings, myUserId, onRemoveParticipant, onRenderAvatar, createParticipantMenuItems, participantItemStyles))));
|
|
3324
3324
|
};
|
|
@@ -3762,22 +3762,14 @@ const LARGE_FLOATING_MODAL_SIZE_REM = { width: 10, height: 7.5 };
|
|
|
3762
3762
|
*/
|
|
3763
3763
|
const floatingLocalVideoModalStyle = (theme, isNarrow) => {
|
|
3764
3764
|
return react.concatStyleSets({
|
|
3765
|
-
|
|
3766
|
-
|
|
3767
|
-
|
|
3768
|
-
|
|
3769
|
-
|
|
3770
|
-
|
|
3771
|
-
|
|
3772
|
-
|
|
3773
|
-
: `${LARGE_FLOATING_MODAL_SIZE_REM.height}rem`,
|
|
3774
|
-
position: 'absolute',
|
|
3775
|
-
bottom: '0.5rem',
|
|
3776
|
-
boxShadow: theme.effects.elevation8,
|
|
3777
|
-
borderRadius: theme.effects.roundedCorner4,
|
|
3778
|
-
overflow: 'hidden'
|
|
3779
|
-
}
|
|
3780
|
-
}, { main: theme.rtl ? { left: '0.5rem' } : { right: '0.5rem' } });
|
|
3765
|
+
main: localVideoTileContainerStyle(theme, isNarrow)
|
|
3766
|
+
}, { main: { boxShadow: theme.effects.elevation8 } });
|
|
3767
|
+
};
|
|
3768
|
+
/**
|
|
3769
|
+
* @private
|
|
3770
|
+
*/
|
|
3771
|
+
const localVideoTileContainerStyle = (theme, isNarrow) => {
|
|
3772
|
+
return Object.assign({ minWidth: isNarrow ? `${SMALL_FLOATING_MODAL_SIZE_REM.width}rem` : `${LARGE_FLOATING_MODAL_SIZE_REM.width}rem`, minHeight: isNarrow ? `${SMALL_FLOATING_MODAL_SIZE_REM.height}rem` : `${LARGE_FLOATING_MODAL_SIZE_REM.height}rem`, position: 'absolute', bottom: '0.5rem', borderRadius: theme.effects.roundedCorner4, overflow: 'hidden' }, (theme.rtl ? { left: '0.5rem' } : { right: '0.5rem' }));
|
|
3781
3773
|
};
|
|
3782
3774
|
/**
|
|
3783
3775
|
* @private
|
|
@@ -4059,11 +4051,14 @@ const VideoGallery = (props) => {
|
|
|
4059
4051
|
containerRef.current.id = `video-gallery-${uuid.v4()}`;
|
|
4060
4052
|
}
|
|
4061
4053
|
}, [containerRef]);
|
|
4054
|
+
const horizontalGalleryPresent = horizontalGalleryTiles && horizontalGalleryTiles.length > 0;
|
|
4062
4055
|
return (React__default['default'].createElement("div", { "data-ui-id": ids.videoGallery, ref: containerRef, className: react.mergeStyles(videoGalleryOuterDivStyle, styles === null || styles === void 0 ? void 0 : styles.root) },
|
|
4063
|
-
shouldFloatLocalVideo &&
|
|
4056
|
+
shouldFloatLocalVideo &&
|
|
4057
|
+
localParticipant &&
|
|
4058
|
+
(horizontalGalleryPresent ? (React__default['default'].createElement(react.Stack, { className: react.mergeStyles(localVideoTileContainerStyle(theme, isNarrow)) }, localVideoTile)) : (React__default['default'].createElement(react.Modal, { isOpen: true, isModeless: true, dragOptions: DRAG_OPTIONS, styles: floatingLocalVideoModalStyle(theme, isNarrow), layerProps: { hostId: (_e = containerRef.current) === null || _e === void 0 ? void 0 : _e.id } }, localVideoTile))),
|
|
4064
4059
|
React__default['default'].createElement(react.Stack, { horizontal: false, styles: videoGalleryContainerStyle, tokens: videoGalleryContainerTokens },
|
|
4065
4060
|
screenShareParticipant ? (remoteScreenShareComponent) : (localParticipant === null || localParticipant === void 0 ? void 0 : localParticipant.isScreenSharingOn) ? (localScreenShareStreamComponent) : (React__default['default'].createElement(GridLayout, { key: "grid-layout", styles: styles === null || styles === void 0 ? void 0 : styles.gridLayout }, gridTiles)),
|
|
4066
|
-
|
|
4061
|
+
horizontalGalleryPresent && (React__default['default'].createElement(ResponsiveHorizontalGallery, { key: "responsive-horizontal-gallery", containerStyles: horizontalGalleryContainerStyle(shouldFloatLocalVideo, isNarrow), horizontalGalleryStyles: react.concatStyleSets(horizontalGalleryStyle(isNarrow), styles === null || styles === void 0 ? void 0 : styles.horizontalGallery), childWidthRem: isNarrow ? SMALL_HORIZONTAL_GALLERY_TILE_SIZE_REM.width : LARGE_HORIZONTAL_GALLERY_TILE_SIZE_REM.width, buttonWidthRem: HORIZONTAL_GALLERY_BUTTON_WIDTH, gapWidthRem: HORIZONTAL_GALLERY_GAP }, horizontalGalleryTiles)))));
|
|
4067
4062
|
};
|
|
4068
4063
|
|
|
4069
4064
|
// Copyright (c) Microsoft Corporation.
|
|
@@ -4175,18 +4170,16 @@ const controlButtonStyles = {
|
|
|
4175
4170
|
flexContainer: {
|
|
4176
4171
|
flexFlow: 'column',
|
|
4177
4172
|
display: 'contents'
|
|
4173
|
+
},
|
|
4174
|
+
label: {
|
|
4175
|
+
fontSize: '0.625rem',
|
|
4176
|
+
fontWeight: '400',
|
|
4177
|
+
lineHeight: '1rem',
|
|
4178
|
+
cursor: 'pointer',
|
|
4179
|
+
display: 'block',
|
|
4180
|
+
margin: '0rem 0.25rem'
|
|
4178
4181
|
}
|
|
4179
4182
|
};
|
|
4180
|
-
/**
|
|
4181
|
-
* @private
|
|
4182
|
-
*/
|
|
4183
|
-
const controlButtonLabelStyles = {
|
|
4184
|
-
fontSize: '0.625rem',
|
|
4185
|
-
lineHeight: '1rem',
|
|
4186
|
-
cursor: 'pointer',
|
|
4187
|
-
display: 'block',
|
|
4188
|
-
margin: '0rem 0.25rem'
|
|
4189
|
-
};
|
|
4190
4183
|
/**
|
|
4191
4184
|
* making it Partial as IContextualMenuStyles has all its props non-optional and we only need title to be defined here.
|
|
4192
4185
|
*
|
|
@@ -4256,27 +4249,22 @@ const DefaultRenderIcon = (props) => {
|
|
|
4256
4249
|
* @public
|
|
4257
4250
|
*/
|
|
4258
4251
|
const ControlBarButton = (props) => {
|
|
4259
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o
|
|
4252
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
4260
4253
|
const componentStyles = react.concatStyleSets(controlButtonStyles, (_a = props.styles) !== null && _a !== void 0 ? _a : {});
|
|
4261
|
-
const theme = useTheme();
|
|
4262
4254
|
const labelText = (_d = (_b = props === null || props === void 0 ? void 0 : props.text) !== null && _b !== void 0 ? _b : (_c = props === null || props === void 0 ? void 0 : props.strings) === null || _c === void 0 ? void 0 : _c.label) !== null && _d !== void 0 ? _d : ((props === null || props === void 0 ? void 0 : props.checked) ? (_e = props === null || props === void 0 ? void 0 : props.strings) === null || _e === void 0 ? void 0 : _e.onLabel : (_f = props === null || props === void 0 ? void 0 : props.strings) === null || _f === void 0 ? void 0 : _f.offLabel);
|
|
4263
|
-
const
|
|
4264
|
-
|
|
4265
|
-
return (React__default['default'].createElement(react.Text, { key: props === null || props === void 0 ? void 0 : props.labelKey, className: react.mergeStyles(controlButtonLabelStyles, theme.palette.neutralPrimary, (_a = props === null || props === void 0 ? void 0 : props.styles) === null || _a === void 0 ? void 0 : _a.label) }, labelText));
|
|
4266
|
-
}, [labelText, props === null || props === void 0 ? void 0 : props.labelKey, (_g = props === null || props === void 0 ? void 0 : props.styles) === null || _g === void 0 ? void 0 : _g.label, theme]);
|
|
4267
|
-
const tooltipContent = (_j = (_h = props === null || props === void 0 ? void 0 : props.strings) === null || _h === void 0 ? void 0 : _h.tooltipContent) !== null && _j !== void 0 ? _j : ((props === null || props === void 0 ? void 0 : props.disabled)
|
|
4268
|
-
? (_k = props === null || props === void 0 ? void 0 : props.strings) === null || _k === void 0 ? void 0 : _k.tooltipDisabledContent
|
|
4255
|
+
const tooltipContent = (_h = (_g = props === null || props === void 0 ? void 0 : props.strings) === null || _g === void 0 ? void 0 : _g.tooltipContent) !== null && _h !== void 0 ? _h : ((props === null || props === void 0 ? void 0 : props.disabled)
|
|
4256
|
+
? (_j = props === null || props === void 0 ? void 0 : props.strings) === null || _j === void 0 ? void 0 : _j.tooltipDisabledContent
|
|
4269
4257
|
: (props === null || props === void 0 ? void 0 : props.checked)
|
|
4270
|
-
? (
|
|
4271
|
-
: (
|
|
4272
|
-
const tooltipId = ((
|
|
4258
|
+
? (_k = props === null || props === void 0 ? void 0 : props.strings) === null || _k === void 0 ? void 0 : _k.tooltipOnContent
|
|
4259
|
+
: (_l = props === null || props === void 0 ? void 0 : props.strings) === null || _l === void 0 ? void 0 : _l.tooltipOffContent);
|
|
4260
|
+
const tooltipId = ((_m = props.tooltipId) !== null && _m !== void 0 ? _m : props.labelKey) ? props.labelKey + '-tooltip' : undefined;
|
|
4273
4261
|
return (React__default['default'].createElement(ControlButtonTooltip, { content: tooltipContent, id: tooltipId },
|
|
4274
|
-
React__default['default'].createElement(react.DefaultButton, Object.assign({}, props, { styles: componentStyles, onRenderText: props.showLabel
|
|
4262
|
+
React__default['default'].createElement(react.DefaultButton, Object.assign({}, props, { styles: componentStyles, onRenderText: props.showLabel && props.onRenderText ? props.onRenderText : undefined, onRenderIcon: (_o = props.onRenderIcon) !== null && _o !== void 0 ? _o : DefaultRenderIcon }), props.showLabel ? labelText : React__default['default'].createElement(React__default['default'].Fragment, null))));
|
|
4275
4263
|
};
|
|
4276
4264
|
|
|
4277
4265
|
// Copyright (c) Microsoft Corporation.
|
|
4278
4266
|
// Licensed under the MIT license.
|
|
4279
|
-
var __awaiter$
|
|
4267
|
+
var __awaiter$l = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
4280
4268
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4281
4269
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4282
4270
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -4304,7 +4292,7 @@ const CameraButton = (props) => {
|
|
|
4304
4292
|
const [waitForCamera, setWaitForCamera] = React.useState(false);
|
|
4305
4293
|
const localeStrings = useLocale$1().strings.cameraButton;
|
|
4306
4294
|
const strings = Object.assign(Object.assign({}, localeStrings), props.strings);
|
|
4307
|
-
const onToggleClick = React.useCallback(() => __awaiter$
|
|
4295
|
+
const onToggleClick = React.useCallback(() => __awaiter$l(void 0, void 0, void 0, function* () {
|
|
4308
4296
|
// Throttle click on camera, need to await onToggleCamera then allow another click
|
|
4309
4297
|
if (onToggleCamera) {
|
|
4310
4298
|
setWaitForCamera(true);
|
|
@@ -4731,8 +4719,24 @@ const ScreenShareButton = (props) => {
|
|
|
4731
4719
|
var _a, _b, _c, _d;
|
|
4732
4720
|
const localeStrings = useLocale$1().strings.screenShareButton;
|
|
4733
4721
|
const strings = Object.assign(Object.assign({}, localeStrings), props.strings);
|
|
4734
|
-
|
|
4722
|
+
const theme = react.useTheme();
|
|
4723
|
+
const styles = screenshareButtonStyles(theme);
|
|
4724
|
+
return (React__default['default'].createElement(ControlBarButton, Object.assign({}, props, { styles: styles, onClick: (_a = props.onToggleScreenShare) !== null && _a !== void 0 ? _a : props.onClick, onRenderOnIcon: (_b = props.onRenderOnIcon) !== null && _b !== void 0 ? _b : onRenderScreenShareOnIcon, onRenderOffIcon: (_c = props.onRenderOffIcon) !== null && _c !== void 0 ? _c : onRenderScreenShareOffIcon, strings: strings, labelKey: (_d = props.labelKey) !== null && _d !== void 0 ? _d : 'screenShareButtonLabel' })));
|
|
4735
4725
|
};
|
|
4726
|
+
const screenshareButtonStyles = (theme) => ({
|
|
4727
|
+
rootChecked: {
|
|
4728
|
+
background: theme.palette.themePrimary,
|
|
4729
|
+
color: react.DefaultPalette.white,
|
|
4730
|
+
':focus::after': { outlineColor: `${react.DefaultPalette.white} !important` } // added !important to avoid override by FluentUI button styles
|
|
4731
|
+
},
|
|
4732
|
+
rootCheckedHovered: {
|
|
4733
|
+
background: theme.palette.themePrimary,
|
|
4734
|
+
color: react.DefaultPalette.white,
|
|
4735
|
+
':focus::after': { outlineColor: `${react.DefaultPalette.white} !important` } // added !important to avoid override by FluentUI button styles
|
|
4736
|
+
},
|
|
4737
|
+
labelHovered: { color: react.DefaultPalette.white },
|
|
4738
|
+
labelChecked: { color: react.DefaultPalette.white }
|
|
4739
|
+
});
|
|
4736
4740
|
|
|
4737
4741
|
// Copyright (c) Microsoft Corporation.
|
|
4738
4742
|
// Licensed under the MIT license.
|
|
@@ -5101,7 +5105,7 @@ const findSelector$1 = (component) => {
|
|
|
5101
5105
|
|
|
5102
5106
|
// Copyright (c) Microsoft Corporation.
|
|
5103
5107
|
// Licensed under the MIT license.
|
|
5104
|
-
var __awaiter$
|
|
5108
|
+
var __awaiter$k = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
5105
5109
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
5106
5110
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5107
5111
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -5123,38 +5127,38 @@ var __awaiter$g = (window && window.__awaiter) || function (thisArg, _arguments,
|
|
|
5123
5127
|
const createDefaultChatHandlers = memoizeOne__default['default']((chatClient, chatThreadClient) => {
|
|
5124
5128
|
let messageIterator = undefined;
|
|
5125
5129
|
return {
|
|
5126
|
-
onSendMessage: (content) => __awaiter$
|
|
5130
|
+
onSendMessage: (content) => __awaiter$k(void 0, void 0, void 0, function* () {
|
|
5127
5131
|
const sendMessageRequest = {
|
|
5128
5132
|
content,
|
|
5129
5133
|
senderDisplayName: chatClient.getState().displayName
|
|
5130
5134
|
};
|
|
5131
5135
|
yield chatThreadClient.sendMessage(sendMessageRequest);
|
|
5132
5136
|
}),
|
|
5133
|
-
onUpdateMessage: (messageId, content) => __awaiter$
|
|
5137
|
+
onUpdateMessage: (messageId, content) => __awaiter$k(void 0, void 0, void 0, function* () {
|
|
5134
5138
|
yield chatThreadClient.updateMessage(messageId, { content });
|
|
5135
5139
|
}),
|
|
5136
|
-
onDeleteMessage: (messageId) => __awaiter$
|
|
5140
|
+
onDeleteMessage: (messageId) => __awaiter$k(void 0, void 0, void 0, function* () {
|
|
5137
5141
|
yield chatThreadClient.deleteMessage(messageId);
|
|
5138
5142
|
}),
|
|
5139
5143
|
// This handler is designed for chatThread to consume
|
|
5140
|
-
onMessageSeen: (chatMessageId) => __awaiter$
|
|
5144
|
+
onMessageSeen: (chatMessageId) => __awaiter$k(void 0, void 0, void 0, function* () {
|
|
5141
5145
|
yield chatThreadClient.sendReadReceipt({ chatMessageId });
|
|
5142
5146
|
}),
|
|
5143
|
-
onTyping: () => __awaiter$
|
|
5147
|
+
onTyping: () => __awaiter$k(void 0, void 0, void 0, function* () {
|
|
5144
5148
|
yield chatThreadClient.sendTypingNotification();
|
|
5145
5149
|
}),
|
|
5146
|
-
onRemoveParticipant: (userId) => __awaiter$
|
|
5150
|
+
onRemoveParticipant: (userId) => __awaiter$k(void 0, void 0, void 0, function* () {
|
|
5147
5151
|
yield chatThreadClient.removeParticipant(fromFlatCommunicationIdentifier(userId));
|
|
5148
5152
|
}),
|
|
5149
|
-
updateThreadTopicName: (topicName) => __awaiter$
|
|
5153
|
+
updateThreadTopicName: (topicName) => __awaiter$k(void 0, void 0, void 0, function* () {
|
|
5150
5154
|
yield chatThreadClient.updateTopic(topicName);
|
|
5151
5155
|
}),
|
|
5152
|
-
onLoadPreviousChatMessages: (messagesToLoad) => __awaiter$
|
|
5156
|
+
onLoadPreviousChatMessages: (messagesToLoad) => __awaiter$k(void 0, void 0, void 0, function* () {
|
|
5153
5157
|
var _a;
|
|
5154
5158
|
if (messageIterator === undefined) {
|
|
5155
5159
|
// Lazy definition so that errors in the method call are reported correctly.
|
|
5156
5160
|
// Also allows recovery via retries in case of transient errors.
|
|
5157
|
-
messageIterator = chatThreadClient.listMessages();
|
|
5161
|
+
messageIterator = chatThreadClient.listMessages({ maxPageSize: 50 });
|
|
5158
5162
|
}
|
|
5159
5163
|
let remainingMessagesToGet = messagesToLoad;
|
|
5160
5164
|
let isAllChatMessagesLoaded = false;
|
|
@@ -5758,7 +5762,7 @@ const findSelector = (component) => {
|
|
|
5758
5762
|
|
|
5759
5763
|
// Copyright (c) Microsoft Corporation.
|
|
5760
5764
|
// Licensed under the MIT license.
|
|
5761
|
-
var __awaiter$
|
|
5765
|
+
var __awaiter$j = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
5762
5766
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
5763
5767
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5764
5768
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -5807,10 +5811,10 @@ class ProxyDeviceManager {
|
|
|
5807
5811
|
this.selectCamera = (videoDeviceInfo) => {
|
|
5808
5812
|
this._context.setDeviceManagerSelectedCamera(videoDeviceInfo);
|
|
5809
5813
|
};
|
|
5810
|
-
this.videoDevicesUpdated = () => __awaiter$
|
|
5814
|
+
this.videoDevicesUpdated = () => __awaiter$j(this, void 0, void 0, function* () {
|
|
5811
5815
|
this._context.setDeviceManagerCameras(dedupeById(yield this._deviceManager.getCameras()));
|
|
5812
5816
|
});
|
|
5813
|
-
this.audioDevicesUpdated = () => __awaiter$
|
|
5817
|
+
this.audioDevicesUpdated = () => __awaiter$j(this, void 0, void 0, function* () {
|
|
5814
5818
|
this._context.setDeviceManagerMicrophones(dedupeById(yield this._deviceManager.getMicrophones()));
|
|
5815
5819
|
this._context.setDeviceManagerSpeakers(dedupeById(yield this._deviceManager.getSpeakers()));
|
|
5816
5820
|
});
|
|
@@ -5933,7 +5937,7 @@ class CallError extends Error {
|
|
|
5933
5937
|
|
|
5934
5938
|
// Copyright (c) Microsoft Corporation.
|
|
5935
5939
|
// Licensed under the MIT license.
|
|
5936
|
-
var __awaiter$
|
|
5940
|
+
var __awaiter$i = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
5937
5941
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
5938
5942
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5939
5943
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -6422,7 +6426,7 @@ class CallContext$1 {
|
|
|
6422
6426
|
* @throws CallError. Exceptions thrown from `f` are tagged with the failed `target.
|
|
6423
6427
|
*/
|
|
6424
6428
|
withAsyncErrorTeedToState(action, target) {
|
|
6425
|
-
return (...args) => __awaiter$
|
|
6429
|
+
return (...args) => __awaiter$i(this, void 0, void 0, function* () {
|
|
6426
6430
|
try {
|
|
6427
6431
|
return yield action(...args);
|
|
6428
6432
|
}
|
|
@@ -6485,7 +6489,7 @@ const findOldestCallEnded = (calls) => {
|
|
|
6485
6489
|
|
|
6486
6490
|
// Copyright (c) Microsoft Corporation.
|
|
6487
6491
|
// Licensed under the MIT license.
|
|
6488
|
-
var __awaiter$
|
|
6492
|
+
var __awaiter$h = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
6489
6493
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
6490
6494
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
6491
6495
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -6505,42 +6509,42 @@ class ProxyCall {
|
|
|
6505
6509
|
switch (prop) {
|
|
6506
6510
|
case 'mute': {
|
|
6507
6511
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
|
6508
|
-
return __awaiter$
|
|
6512
|
+
return __awaiter$h(this, void 0, void 0, function* () {
|
|
6509
6513
|
return yield target.mute(...args);
|
|
6510
6514
|
});
|
|
6511
6515
|
}, 'Call.mute');
|
|
6512
6516
|
}
|
|
6513
6517
|
case 'unmute': {
|
|
6514
6518
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
|
6515
|
-
return __awaiter$
|
|
6519
|
+
return __awaiter$h(this, void 0, void 0, function* () {
|
|
6516
6520
|
return yield target.unmute(...args);
|
|
6517
6521
|
});
|
|
6518
6522
|
}, 'Call.unmute');
|
|
6519
6523
|
}
|
|
6520
6524
|
case 'startVideo': {
|
|
6521
6525
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
|
6522
|
-
return __awaiter$
|
|
6526
|
+
return __awaiter$h(this, void 0, void 0, function* () {
|
|
6523
6527
|
return yield target.startVideo(...args);
|
|
6524
6528
|
});
|
|
6525
6529
|
}, 'Call.startVideo');
|
|
6526
6530
|
}
|
|
6527
6531
|
case 'stopVideo': {
|
|
6528
6532
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
|
6529
|
-
return __awaiter$
|
|
6533
|
+
return __awaiter$h(this, void 0, void 0, function* () {
|
|
6530
6534
|
return yield target.stopVideo(...args);
|
|
6531
6535
|
});
|
|
6532
6536
|
}, 'Call.stopVideo');
|
|
6533
6537
|
}
|
|
6534
6538
|
case 'startScreenSharing': {
|
|
6535
6539
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
|
6536
|
-
return __awaiter$
|
|
6540
|
+
return __awaiter$h(this, void 0, void 0, function* () {
|
|
6537
6541
|
return yield target.startScreenSharing(...args);
|
|
6538
6542
|
});
|
|
6539
6543
|
}, 'Call.startScreenSharing');
|
|
6540
6544
|
}
|
|
6541
6545
|
case 'stopScreenSharing': {
|
|
6542
6546
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
|
6543
|
-
return __awaiter$
|
|
6547
|
+
return __awaiter$h(this, void 0, void 0, function* () {
|
|
6544
6548
|
return yield target.stopScreenSharing(...args);
|
|
6545
6549
|
});
|
|
6546
6550
|
}, 'Call.stopScreenSharing');
|
|
@@ -6738,7 +6742,7 @@ class RemoteVideoStreamSubscriber {
|
|
|
6738
6742
|
|
|
6739
6743
|
// Copyright (c) Microsoft Corporation.
|
|
6740
6744
|
// Licensed under the MIT license.
|
|
6741
|
-
var __awaiter$
|
|
6745
|
+
var __awaiter$g = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
6742
6746
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
6743
6747
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
6744
6748
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -6748,7 +6752,7 @@ var __awaiter$c = (window && window.__awaiter) || function (thisArg, _arguments,
|
|
|
6748
6752
|
});
|
|
6749
6753
|
};
|
|
6750
6754
|
function createViewRemoteVideo(context, internalContext, callId, participantId, stream, options) {
|
|
6751
|
-
return __awaiter$
|
|
6755
|
+
return __awaiter$g(this, void 0, void 0, function* () {
|
|
6752
6756
|
// Render RemoteVideoStream that is part of a Call
|
|
6753
6757
|
const streamId = stream.id;
|
|
6754
6758
|
let participantKey;
|
|
@@ -6768,7 +6772,8 @@ function createViewRemoteVideo(context, internalContext, callId, participantId,
|
|
|
6768
6772
|
return;
|
|
6769
6773
|
}
|
|
6770
6774
|
if (renderInfo.status === 'Rendering') {
|
|
6771
|
-
console
|
|
6775
|
+
// Do not log to console here as this is a very common situation due to UI rerenders while
|
|
6776
|
+
// the video rendering is in progress.
|
|
6772
6777
|
return;
|
|
6773
6778
|
}
|
|
6774
6779
|
if (renderInfo.status === 'Stopping') {
|
|
@@ -6808,7 +6813,7 @@ function createViewRemoteVideo(context, internalContext, callId, participantId,
|
|
|
6808
6813
|
});
|
|
6809
6814
|
}
|
|
6810
6815
|
function createViewLocalVideo(context, internalContext, callId, options) {
|
|
6811
|
-
return __awaiter$
|
|
6816
|
+
return __awaiter$g(this, void 0, void 0, function* () {
|
|
6812
6817
|
// Render LocalVideoStream that is part of a Call
|
|
6813
6818
|
const renderInfo = internalContext.getLocalRenderInfo(callId);
|
|
6814
6819
|
if (!renderInfo) {
|
|
@@ -6820,7 +6825,8 @@ function createViewLocalVideo(context, internalContext, callId, options) {
|
|
|
6820
6825
|
return;
|
|
6821
6826
|
}
|
|
6822
6827
|
if (renderInfo.status === 'Rendering') {
|
|
6823
|
-
console
|
|
6828
|
+
// Do not log to console here as this is a very common situation due to UI rerenders while
|
|
6829
|
+
// the video rendering is in progress.
|
|
6824
6830
|
return;
|
|
6825
6831
|
}
|
|
6826
6832
|
if (renderInfo.status === 'Stopping') {
|
|
@@ -6862,14 +6868,15 @@ function createViewLocalVideo(context, internalContext, callId, options) {
|
|
|
6862
6868
|
});
|
|
6863
6869
|
}
|
|
6864
6870
|
function createViewUnparentedVideo(context, internalContext, stream, options) {
|
|
6865
|
-
return __awaiter$
|
|
6871
|
+
return __awaiter$g(this, void 0, void 0, function* () {
|
|
6866
6872
|
const renderInfo = internalContext.getUnparentedRenderInfo(stream);
|
|
6867
6873
|
if (renderInfo && renderInfo.status === 'Rendered') {
|
|
6868
6874
|
console.warn('Unparented LocalVideoStream is already rendered');
|
|
6869
6875
|
return;
|
|
6870
6876
|
}
|
|
6871
6877
|
if (renderInfo && renderInfo.status === 'Rendering') {
|
|
6872
|
-
console
|
|
6878
|
+
// Do not log to console here as this is a very common situation due to UI rerenders while
|
|
6879
|
+
// the video rendering is in progress.
|
|
6873
6880
|
return;
|
|
6874
6881
|
}
|
|
6875
6882
|
if (renderInfo && renderInfo.status === 'Stopping') {
|
|
@@ -7683,7 +7690,7 @@ class InternalCallContext {
|
|
|
7683
7690
|
|
|
7684
7691
|
// Copyright (c) Microsoft Corporation.
|
|
7685
7692
|
// Licensed under the MIT license.
|
|
7686
|
-
var __awaiter$
|
|
7693
|
+
var __awaiter$f = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
7687
7694
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
7688
7695
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
7689
7696
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -7705,7 +7712,7 @@ class ProxyCallClient {
|
|
|
7705
7712
|
get(target, prop) {
|
|
7706
7713
|
switch (prop) {
|
|
7707
7714
|
case 'createCallAgent': {
|
|
7708
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
|
7715
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$f(this, void 0, void 0, function* () {
|
|
7709
7716
|
// createCallAgent will throw an exception if the previous callAgent was not disposed. If the previous
|
|
7710
7717
|
// callAgent was disposed then it would have unsubscribed to events so we can just create a new declarative
|
|
7711
7718
|
// callAgent if the createCallAgent succeeds.
|
|
@@ -7716,7 +7723,7 @@ class ProxyCallClient {
|
|
|
7716
7723
|
}), 'CallClient.createCallAgent');
|
|
7717
7724
|
}
|
|
7718
7725
|
case 'getDeviceManager': {
|
|
7719
|
-
return this._context.withAsyncErrorTeedToState(() => __awaiter$
|
|
7726
|
+
return this._context.withAsyncErrorTeedToState(() => __awaiter$f(this, void 0, void 0, function* () {
|
|
7720
7727
|
// As of writing, the SDK always returns the same instance of DeviceManager so we keep a reference of
|
|
7721
7728
|
// DeviceManager and if it does not change we return the cached DeclarativeDeviceManager. If it does not we'll
|
|
7722
7729
|
// throw an error that indicate we need to fix this issue as our implementation has diverged from the SDK.
|
|
@@ -7831,7 +7838,7 @@ const Constants = {
|
|
|
7831
7838
|
|
|
7832
7839
|
// Copyright (c) Microsoft Corporation.
|
|
7833
7840
|
// Licensed under the MIT license.
|
|
7834
|
-
var __awaiter$
|
|
7841
|
+
var __awaiter$e = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
7835
7842
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
7836
7843
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
7837
7844
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -8108,7 +8115,7 @@ class ChatContext$1 {
|
|
|
8108
8115
|
* @throws ChatError. Exceptions thrown from `f` are tagged with the failed `target.
|
|
8109
8116
|
*/
|
|
8110
8117
|
withAsyncErrorTeedToState(f, target) {
|
|
8111
|
-
return (...args) => __awaiter$
|
|
8118
|
+
return (...args) => __awaiter$e(this, void 0, void 0, function* () {
|
|
8112
8119
|
try {
|
|
8113
8120
|
return yield f(...args);
|
|
8114
8121
|
}
|
|
@@ -8211,7 +8218,7 @@ const convertChatMessage = (message, status = 'delivered', clientMessageId) => {
|
|
|
8211
8218
|
|
|
8212
8219
|
// Copyright (c) Microsoft Corporation.
|
|
8213
8220
|
// Licensed under the MIT license.
|
|
8214
|
-
var __awaiter$
|
|
8221
|
+
var __awaiter$d = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
8215
8222
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
8216
8223
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
8217
8224
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -8294,7 +8301,7 @@ class EventSubscriber {
|
|
|
8294
8301
|
this.fetchLastParticipantMessage(event.threadId, 'participantAdded');
|
|
8295
8302
|
};
|
|
8296
8303
|
// This is a hot fix that no participant message is received for onChatMessageReceived event, which should be handled by JS SDK
|
|
8297
|
-
this.fetchLastParticipantMessage = (threadId, actionType) => __awaiter$
|
|
8304
|
+
this.fetchLastParticipantMessage = (threadId, actionType) => __awaiter$d(this, void 0, void 0, function* () {
|
|
8298
8305
|
var e_1, _a;
|
|
8299
8306
|
try {
|
|
8300
8307
|
for (var _b = __asyncValues$1(this.chatClient
|
|
@@ -8380,7 +8387,7 @@ class EventSubscriber {
|
|
|
8380
8387
|
|
|
8381
8388
|
// Copyright (c) Microsoft Corporation.
|
|
8382
8389
|
// Licensed under the MIT license.
|
|
8383
|
-
var __awaiter$
|
|
8390
|
+
var __awaiter$c = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
8384
8391
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
8385
8392
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
8386
8393
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -8402,7 +8409,7 @@ const createDecoratedIterator = (iteratorCreator, context, decorateFn) => {
|
|
|
8402
8409
|
const threadsIterator = iteratorCreator(...args);
|
|
8403
8410
|
return {
|
|
8404
8411
|
next() {
|
|
8405
|
-
return __awaiter$
|
|
8412
|
+
return __awaiter$c(this, void 0, void 0, function* () {
|
|
8406
8413
|
const result = yield threadsIterator.next();
|
|
8407
8414
|
if (!result.done && result.value) {
|
|
8408
8415
|
decorateFn(result.value, context);
|
|
@@ -8417,7 +8424,7 @@ const createDecoratedIterator = (iteratorCreator, context, decorateFn) => {
|
|
|
8417
8424
|
const pages = threadsIterator.byPage(settings);
|
|
8418
8425
|
return {
|
|
8419
8426
|
next() {
|
|
8420
|
-
return __awaiter$
|
|
8427
|
+
return __awaiter$c(this, void 0, void 0, function* () {
|
|
8421
8428
|
const result = yield pages.next();
|
|
8422
8429
|
const page = result.value;
|
|
8423
8430
|
if (!result.done && result.value) {
|
|
@@ -8501,7 +8508,7 @@ const createDecoratedListParticipants = (chatThreadClient, context) => {
|
|
|
8501
8508
|
|
|
8502
8509
|
// Copyright (c) Microsoft Corporation.
|
|
8503
8510
|
// Licensed under the MIT license.
|
|
8504
|
-
var __awaiter$
|
|
8511
|
+
var __awaiter$b = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
8505
8512
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
8506
8513
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
8507
8514
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -8520,14 +8527,14 @@ class ProxyChatThreadClient {
|
|
|
8520
8527
|
return createDecoratedListMessages(chatThreadClient, this._context);
|
|
8521
8528
|
}
|
|
8522
8529
|
case 'getMessage': {
|
|
8523
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
|
8530
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$b(this, void 0, void 0, function* () {
|
|
8524
8531
|
const message = yield chatThreadClient.getMessage(...args);
|
|
8525
8532
|
this._context.setChatMessage(chatThreadClient.threadId, convertChatMessage(message));
|
|
8526
8533
|
return message;
|
|
8527
8534
|
}), 'ChatThreadClient.getMessage');
|
|
8528
8535
|
}
|
|
8529
8536
|
case 'sendMessage': {
|
|
8530
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
|
8537
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$b(this, void 0, void 0, function* () {
|
|
8531
8538
|
// Retry logic?
|
|
8532
8539
|
const { content } = args[0];
|
|
8533
8540
|
const clientMessageId = nanoid.nanoid(); // Generate a local short uuid for message
|
|
@@ -8565,7 +8572,7 @@ class ProxyChatThreadClient {
|
|
|
8565
8572
|
}), 'ChatThreadClient.sendMessage');
|
|
8566
8573
|
}
|
|
8567
8574
|
case 'addParticipants': {
|
|
8568
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
|
8575
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$b(this, void 0, void 0, function* () {
|
|
8569
8576
|
const result = yield chatThreadClient.addParticipants(...args);
|
|
8570
8577
|
const [addRequest] = args;
|
|
8571
8578
|
const participantsToAdd = addRequest.participants;
|
|
@@ -8574,7 +8581,7 @@ class ProxyChatThreadClient {
|
|
|
8574
8581
|
}), 'ChatThreadClient.addParticipants');
|
|
8575
8582
|
}
|
|
8576
8583
|
case 'deleteMessage': {
|
|
8577
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
|
8584
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$b(this, void 0, void 0, function* () {
|
|
8578
8585
|
// DeleteMessage is able to either delete local one(for failed message) or synced message
|
|
8579
8586
|
const [messageId] = args;
|
|
8580
8587
|
if (this._context.deleteLocalMessage(chatThreadClient.threadId, messageId)) {
|
|
@@ -8592,7 +8599,7 @@ class ProxyChatThreadClient {
|
|
|
8592
8599
|
return createDecoratedListReadReceipts(chatThreadClient, this._context);
|
|
8593
8600
|
}
|
|
8594
8601
|
case 'removeParticipant': {
|
|
8595
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
|
8602
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$b(this, void 0, void 0, function* () {
|
|
8596
8603
|
const result = yield chatThreadClient.removeParticipant(...args);
|
|
8597
8604
|
const [removeIdentifier] = args;
|
|
8598
8605
|
this._context.deleteParticipant(chatThreadClient.threadId, communicationCommon.getIdentifierKind(removeIdentifier));
|
|
@@ -8600,7 +8607,7 @@ class ProxyChatThreadClient {
|
|
|
8600
8607
|
}), 'ChatThreadClient.removeParticipant');
|
|
8601
8608
|
}
|
|
8602
8609
|
case 'updateMessage': {
|
|
8603
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
|
8610
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$b(this, void 0, void 0, function* () {
|
|
8604
8611
|
const result = yield chatThreadClient.updateMessage(...args);
|
|
8605
8612
|
const [messageId, updateOption] = args;
|
|
8606
8613
|
this._context.updateChatMessageContent(chatThreadClient.threadId, messageId, updateOption === null || updateOption === void 0 ? void 0 : updateOption.content);
|
|
@@ -8608,7 +8615,7 @@ class ProxyChatThreadClient {
|
|
|
8608
8615
|
}), 'ChatThreadClient.updateMessage');
|
|
8609
8616
|
}
|
|
8610
8617
|
case 'updateTopic': {
|
|
8611
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
|
8618
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$b(this, void 0, void 0, function* () {
|
|
8612
8619
|
const result = yield chatThreadClient.updateTopic(...args);
|
|
8613
8620
|
const [topic] = args;
|
|
8614
8621
|
this._context.updateThreadTopic(chatThreadClient.threadId, topic);
|
|
@@ -8616,7 +8623,7 @@ class ProxyChatThreadClient {
|
|
|
8616
8623
|
}), 'ChatThreadClient.updateTopic');
|
|
8617
8624
|
}
|
|
8618
8625
|
case 'getProperties': {
|
|
8619
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
|
8626
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$b(this, void 0, void 0, function* () {
|
|
8620
8627
|
const result = yield chatThreadClient.getProperties(...args);
|
|
8621
8628
|
this._context.updateThread(chatThreadClient.threadId, result);
|
|
8622
8629
|
return result;
|
|
@@ -8653,7 +8660,7 @@ const createDecoratedListThreads = (chatClient, context) => {
|
|
|
8653
8660
|
|
|
8654
8661
|
// Copyright (c) Microsoft Corporation.
|
|
8655
8662
|
// Licensed under the MIT license.
|
|
8656
|
-
var __awaiter$
|
|
8663
|
+
var __awaiter$a = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
8657
8664
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
8658
8665
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
8659
8666
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -8672,7 +8679,7 @@ const proxyChatClient = {
|
|
|
8672
8679
|
switch (prop) {
|
|
8673
8680
|
case 'createChatThread': {
|
|
8674
8681
|
return context.withAsyncErrorTeedToState(function (...args) {
|
|
8675
|
-
return __awaiter$
|
|
8682
|
+
return __awaiter$a(this, void 0, void 0, function* () {
|
|
8676
8683
|
const result = yield chatClient.createChatThread(...args);
|
|
8677
8684
|
const thread = result.chatThread;
|
|
8678
8685
|
if (thread) {
|
|
@@ -8685,7 +8692,7 @@ const proxyChatClient = {
|
|
|
8685
8692
|
}
|
|
8686
8693
|
case 'deleteChatThread': {
|
|
8687
8694
|
return context.withAsyncErrorTeedToState(function (...args) {
|
|
8688
|
-
return __awaiter$
|
|
8695
|
+
return __awaiter$a(this, void 0, void 0, function* () {
|
|
8689
8696
|
const result = yield chatClient.deleteChatThread(...args);
|
|
8690
8697
|
context.deleteThread(args[0]);
|
|
8691
8698
|
return result;
|
|
@@ -8705,7 +8712,7 @@ const proxyChatClient = {
|
|
|
8705
8712
|
}
|
|
8706
8713
|
case 'startRealtimeNotifications': {
|
|
8707
8714
|
return context.withAsyncErrorTeedToState(function (...args) {
|
|
8708
|
-
return __awaiter$
|
|
8715
|
+
return __awaiter$a(this, void 0, void 0, function* () {
|
|
8709
8716
|
const ret = yield chatClient.startRealtimeNotifications(...args);
|
|
8710
8717
|
if (!receiver.eventSubscriber) {
|
|
8711
8718
|
receiver.eventSubscriber = new EventSubscriber(chatClient, context);
|
|
@@ -8716,7 +8723,7 @@ const proxyChatClient = {
|
|
|
8716
8723
|
}
|
|
8717
8724
|
case 'stopRealtimeNotifications': {
|
|
8718
8725
|
return context.withAsyncErrorTeedToState(function (...args) {
|
|
8719
|
-
return __awaiter$
|
|
8726
|
+
return __awaiter$a(this, void 0, void 0, function* () {
|
|
8720
8727
|
const ret = yield chatClient.stopRealtimeNotifications(...args);
|
|
8721
8728
|
if (receiver.eventSubscriber) {
|
|
8722
8729
|
receiver.eventSubscriber.unsubscribe();
|
|
@@ -8780,7 +8787,7 @@ const createStatefulChatClientWithDeps = (chatClient, args, options) => {
|
|
|
8780
8787
|
|
|
8781
8788
|
// Copyright (c) Microsoft Corporation.
|
|
8782
8789
|
// Licensed under the MIT license.
|
|
8783
|
-
var __awaiter$
|
|
8790
|
+
var __awaiter$9 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
8784
8791
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
8785
8792
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
8786
8793
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -8885,7 +8892,7 @@ class AzureCommunicationChatAdapter {
|
|
|
8885
8892
|
}
|
|
8886
8893
|
fetchInitialData() {
|
|
8887
8894
|
var e_1, _a;
|
|
8888
|
-
return __awaiter$
|
|
8895
|
+
return __awaiter$9(this, void 0, void 0, function* () {
|
|
8889
8896
|
try {
|
|
8890
8897
|
yield this.chatThreadClient.getProperties();
|
|
8891
8898
|
}
|
|
@@ -8927,55 +8934,55 @@ class AzureCommunicationChatAdapter {
|
|
|
8927
8934
|
this.context.offStateChange(handler);
|
|
8928
8935
|
}
|
|
8929
8936
|
sendMessage(content) {
|
|
8930
|
-
return __awaiter$
|
|
8931
|
-
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
|
8937
|
+
return __awaiter$9(this, void 0, void 0, function* () {
|
|
8938
|
+
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$9(this, void 0, void 0, function* () {
|
|
8932
8939
|
yield this.handlers.onSendMessage(content);
|
|
8933
8940
|
}));
|
|
8934
8941
|
});
|
|
8935
8942
|
}
|
|
8936
8943
|
sendReadReceipt(chatMessageId) {
|
|
8937
|
-
return __awaiter$
|
|
8938
|
-
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
|
8944
|
+
return __awaiter$9(this, void 0, void 0, function* () {
|
|
8945
|
+
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$9(this, void 0, void 0, function* () {
|
|
8939
8946
|
yield this.handlers.onMessageSeen(chatMessageId);
|
|
8940
8947
|
}));
|
|
8941
8948
|
});
|
|
8942
8949
|
}
|
|
8943
8950
|
sendTypingIndicator() {
|
|
8944
|
-
return __awaiter$
|
|
8951
|
+
return __awaiter$9(this, void 0, void 0, function* () {
|
|
8945
8952
|
yield this.handlers.onTyping();
|
|
8946
8953
|
});
|
|
8947
8954
|
}
|
|
8948
8955
|
removeParticipant(userId) {
|
|
8949
|
-
return __awaiter$
|
|
8950
|
-
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
|
8956
|
+
return __awaiter$9(this, void 0, void 0, function* () {
|
|
8957
|
+
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$9(this, void 0, void 0, function* () {
|
|
8951
8958
|
yield this.handlers.onRemoveParticipant(userId);
|
|
8952
8959
|
}));
|
|
8953
8960
|
});
|
|
8954
8961
|
}
|
|
8955
8962
|
setTopic(topicName) {
|
|
8956
|
-
return __awaiter$
|
|
8957
|
-
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
|
8963
|
+
return __awaiter$9(this, void 0, void 0, function* () {
|
|
8964
|
+
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$9(this, void 0, void 0, function* () {
|
|
8958
8965
|
yield this.handlers.updateThreadTopicName(topicName);
|
|
8959
8966
|
}));
|
|
8960
8967
|
});
|
|
8961
8968
|
}
|
|
8962
8969
|
loadPreviousChatMessages(messagesToLoad) {
|
|
8963
|
-
return __awaiter$
|
|
8964
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
|
8970
|
+
return __awaiter$9(this, void 0, void 0, function* () {
|
|
8971
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$9(this, void 0, void 0, function* () {
|
|
8965
8972
|
return yield this.handlers.onLoadPreviousChatMessages(messagesToLoad);
|
|
8966
8973
|
}));
|
|
8967
8974
|
});
|
|
8968
8975
|
}
|
|
8969
8976
|
updateMessage(messageId, content) {
|
|
8970
|
-
return __awaiter$
|
|
8971
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
|
8977
|
+
return __awaiter$9(this, void 0, void 0, function* () {
|
|
8978
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$9(this, void 0, void 0, function* () {
|
|
8972
8979
|
return yield this.handlers.onUpdateMessage(messageId, content);
|
|
8973
8980
|
}));
|
|
8974
8981
|
});
|
|
8975
8982
|
}
|
|
8976
8983
|
deleteMessage(messageId) {
|
|
8977
|
-
return __awaiter$
|
|
8978
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
|
8984
|
+
return __awaiter$9(this, void 0, void 0, function* () {
|
|
8985
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$9(this, void 0, void 0, function* () {
|
|
8979
8986
|
return yield this.handlers.onDeleteMessage(messageId);
|
|
8980
8987
|
}));
|
|
8981
8988
|
});
|
|
@@ -9028,7 +9035,7 @@ class AzureCommunicationChatAdapter {
|
|
|
9028
9035
|
this.emitter.off(event, listener);
|
|
9029
9036
|
}
|
|
9030
9037
|
asyncTeeErrorToEventEmitter(f) {
|
|
9031
|
-
return __awaiter$
|
|
9038
|
+
return __awaiter$9(this, void 0, void 0, function* () {
|
|
9032
9039
|
try {
|
|
9033
9040
|
return yield f();
|
|
9034
9041
|
}
|
|
@@ -9070,7 +9077,7 @@ const convertEventType = (type) => {
|
|
|
9070
9077
|
*
|
|
9071
9078
|
* @public
|
|
9072
9079
|
*/
|
|
9073
|
-
const createAzureCommunicationChatAdapter = ({ endpoint: endpointUrl, userId, displayName, credential, threadId }) => __awaiter$
|
|
9080
|
+
const createAzureCommunicationChatAdapter = ({ endpoint: endpointUrl, userId, displayName, credential, threadId }) => __awaiter$9(void 0, void 0, void 0, function* () {
|
|
9074
9081
|
const chatClient = createStatefulChatClient({
|
|
9075
9082
|
userId,
|
|
9076
9083
|
displayName,
|
|
@@ -9091,7 +9098,7 @@ const createAzureCommunicationChatAdapter = ({ endpoint: endpointUrl, userId, di
|
|
|
9091
9098
|
*
|
|
9092
9099
|
* @public
|
|
9093
9100
|
*/
|
|
9094
|
-
const createAzureCommunicationChatAdapterFromClient = (chatClient, chatThreadClient) => __awaiter$
|
|
9101
|
+
const createAzureCommunicationChatAdapterFromClient = (chatClient, chatThreadClient) => __awaiter$9(void 0, void 0, void 0, function* () {
|
|
9095
9102
|
return new AzureCommunicationChatAdapter(chatClient, chatThreadClient);
|
|
9096
9103
|
});
|
|
9097
9104
|
const isChatError = (e) => {
|
|
@@ -9431,7 +9438,7 @@ const topicNameLabelStyle = react.mergeStyles({
|
|
|
9431
9438
|
/**
|
|
9432
9439
|
* @private
|
|
9433
9440
|
*/
|
|
9434
|
-
react.mergeStyles({
|
|
9441
|
+
const participantListWrapper = react.mergeStyles({
|
|
9435
9442
|
boxShadow: '0px 0.3px 0.9px rgba(0, 0, 0, 0.1), 0px 1.6px 3.6px rgba(0, 0, 0, 0.13)',
|
|
9436
9443
|
width: '20rem',
|
|
9437
9444
|
// max width at 50% of view so the People Pane is not squeezing the Message Pane to almost nothing when on small screen or high zoom in
|
|
@@ -9445,20 +9452,20 @@ const participantListContainerPadding = { childrenGap: '0.5rem' };
|
|
|
9445
9452
|
/**
|
|
9446
9453
|
* @private
|
|
9447
9454
|
*/
|
|
9448
|
-
react.mergeStyles({
|
|
9455
|
+
const listHeader = react.mergeStyles({
|
|
9449
9456
|
fontSize: '1rem',
|
|
9450
9457
|
margin: '1rem'
|
|
9451
9458
|
});
|
|
9452
9459
|
/**
|
|
9453
9460
|
* @private
|
|
9454
9461
|
*/
|
|
9455
|
-
react.mergeStyles({
|
|
9462
|
+
const participantListStack = react.mergeStyles({
|
|
9456
9463
|
height: '100%'
|
|
9457
9464
|
});
|
|
9458
9465
|
/**
|
|
9459
9466
|
* @private
|
|
9460
9467
|
*/
|
|
9461
|
-
react.mergeStyles({
|
|
9468
|
+
const participantListStyle = react.mergeStyles({
|
|
9462
9469
|
height: '100%',
|
|
9463
9470
|
overflow: 'auto'
|
|
9464
9471
|
});
|
|
@@ -9481,7 +9488,7 @@ const typingIndicatorChatCompositeStyles = {
|
|
|
9481
9488
|
|
|
9482
9489
|
// Copyright (c) Microsoft Corporation.
|
|
9483
9490
|
// Licensed under the MIT license.
|
|
9484
|
-
var __awaiter$
|
|
9491
|
+
var __awaiter$8 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
9485
9492
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
9486
9493
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
9487
9494
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -9502,7 +9509,7 @@ const AvatarPersona = (props) => {
|
|
|
9502
9509
|
const { userId, dataProvider } = props;
|
|
9503
9510
|
const [data, setData] = React__default['default'].useState();
|
|
9504
9511
|
React.useEffect(() => {
|
|
9505
|
-
(() => __awaiter$
|
|
9512
|
+
(() => __awaiter$8(void 0, void 0, void 0, function* () {
|
|
9506
9513
|
if (dataProvider && userId) {
|
|
9507
9514
|
const data = yield dataProvider(userId);
|
|
9508
9515
|
setData(data);
|
|
@@ -9640,16 +9647,17 @@ const usePropsFor$2 = (component) => {
|
|
|
9640
9647
|
* @private
|
|
9641
9648
|
*/
|
|
9642
9649
|
const ChatScreen = (props) => {
|
|
9643
|
-
const { onFetchAvatarPersonaData, onRenderMessage, onRenderTypingIndicator,
|
|
9644
|
-
// onFetchParticipantMenuItems, // Removed for GA release
|
|
9645
|
-
options, styles } = props;
|
|
9650
|
+
const { onFetchAvatarPersonaData, onRenderMessage, onRenderTypingIndicator, onFetchParticipantMenuItems, options, styles } = props;
|
|
9646
9651
|
const defaultNumberOfChatMessagesToReload = 5;
|
|
9647
9652
|
const sendBoxParentStyle = react.mergeStyles({ width: '100%' });
|
|
9648
9653
|
const adapter = useAdapter$1();
|
|
9649
9654
|
React.useEffect(() => {
|
|
9650
9655
|
adapter.fetchInitialData();
|
|
9651
9656
|
}, [adapter]);
|
|
9657
|
+
const locale = useLocale();
|
|
9658
|
+
const chatListHeader = locale.strings.chat.chatListHeader;
|
|
9652
9659
|
const messageThreadProps = usePropsFor$2(MessageThread);
|
|
9660
|
+
const participantListProps = usePropsFor$2(ParticipantList);
|
|
9653
9661
|
const sendBoxProps = usePropsFor$2(SendBox);
|
|
9654
9662
|
const typingIndicatorProps = usePropsFor$2(TypingIndicator);
|
|
9655
9663
|
const headerProps = useAdaptedSelector$1(getHeaderProps);
|
|
@@ -9668,7 +9676,12 @@ const ChatScreen = (props) => {
|
|
|
9668
9676
|
React__default['default'].createElement(MessageThread, Object.assign({}, messageThreadProps, { onRenderAvatar: onRenderAvatarCallback, onRenderMessage: onRenderMessage, numberOfChatMessagesToReload: defaultNumberOfChatMessagesToReload, styles: messageThreadStyles })),
|
|
9669
9677
|
React__default['default'].createElement(react.Stack.Item, { align: "center", className: sendBoxParentStyle },
|
|
9670
9678
|
React__default['default'].createElement("div", { style: { paddingLeft: '0.5rem', paddingRight: '0.5rem' } }, onRenderTypingIndicator ? (onRenderTypingIndicator(typingIndicatorProps.typingUsers)) : (React__default['default'].createElement(TypingIndicator, Object.assign({}, typingIndicatorProps, { styles: typingIndicatorStyles })))),
|
|
9671
|
-
React__default['default'].createElement(SendBox, Object.assign({}, sendBoxProps, { styles: sendBoxStyles }))))
|
|
9679
|
+
React__default['default'].createElement(SendBox, Object.assign({}, sendBoxProps, { styles: sendBoxStyles })))),
|
|
9680
|
+
(options === null || options === void 0 ? void 0 : options.participantPane) === true && (React__default['default'].createElement(react.Stack, { className: participantListWrapper },
|
|
9681
|
+
React__default['default'].createElement(react.Stack, { className: participantListStack },
|
|
9682
|
+
React__default['default'].createElement(react.Stack.Item, { className: listHeader }, chatListHeader),
|
|
9683
|
+
React__default['default'].createElement(react.FocusZone, { className: participantListStyle },
|
|
9684
|
+
React__default['default'].createElement(ParticipantList, Object.assign({}, participantListProps, { onRenderAvatar: (userId, options) => (React__default['default'].createElement(AvatarPersona, Object.assign({ "data-ui-id": "chat-composite-participant-custom-avatar", userId: userId }, options, { dataProvider: onFetchAvatarPersonaData }))), onFetchParticipantMenuItems: onFetchParticipantMenuItems })))))))));
|
|
9672
9685
|
};
|
|
9673
9686
|
|
|
9674
9687
|
// Copyright (c) Microsoft Corporation.
|
|
@@ -9893,7 +9906,7 @@ const getCallCompositePage = (call, previousCall) => {
|
|
|
9893
9906
|
|
|
9894
9907
|
// Copyright (c) Microsoft Corporation.
|
|
9895
9908
|
// Licensed under the MIT license.
|
|
9896
|
-
var __awaiter$
|
|
9909
|
+
var __awaiter$7 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
9897
9910
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
9898
9911
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
9899
9912
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -9912,59 +9925,59 @@ _component) => {
|
|
|
9912
9925
|
return createCompositeHandlers(useAdapter());
|
|
9913
9926
|
};
|
|
9914
9927
|
const createCompositeHandlers = memoizeOne__default['default']((adapter) => ({
|
|
9915
|
-
onCreateLocalStreamView: (options) => __awaiter$
|
|
9928
|
+
onCreateLocalStreamView: (options) => __awaiter$7(void 0, void 0, void 0, function* () {
|
|
9916
9929
|
yield adapter.createStreamView(undefined, options);
|
|
9917
9930
|
}),
|
|
9918
|
-
onCreateRemoteStreamView: (userId, options) => __awaiter$
|
|
9931
|
+
onCreateRemoteStreamView: (userId, options) => __awaiter$7(void 0, void 0, void 0, function* () {
|
|
9919
9932
|
yield adapter.createStreamView(userId, options);
|
|
9920
9933
|
}),
|
|
9921
|
-
onHangUp: () => __awaiter$
|
|
9934
|
+
onHangUp: () => __awaiter$7(void 0, void 0, void 0, function* () {
|
|
9922
9935
|
yield adapter.leaveCall();
|
|
9923
9936
|
}),
|
|
9924
|
-
onRemoveParticipant: (userId) => __awaiter$
|
|
9937
|
+
onRemoveParticipant: (userId) => __awaiter$7(void 0, void 0, void 0, function* () {
|
|
9925
9938
|
yield adapter.removeParticipant(userId);
|
|
9926
9939
|
}),
|
|
9927
|
-
onSelectCamera: (deviceInfo, options) => __awaiter$
|
|
9940
|
+
onSelectCamera: (deviceInfo, options) => __awaiter$7(void 0, void 0, void 0, function* () {
|
|
9928
9941
|
yield adapter.setCamera(deviceInfo, options);
|
|
9929
9942
|
}),
|
|
9930
|
-
onSelectMicrophone: (deviceInfo) => __awaiter$
|
|
9943
|
+
onSelectMicrophone: (deviceInfo) => __awaiter$7(void 0, void 0, void 0, function* () {
|
|
9931
9944
|
yield adapter.setMicrophone(deviceInfo);
|
|
9932
9945
|
}),
|
|
9933
|
-
onSelectSpeaker: (deviceInfo) => __awaiter$
|
|
9946
|
+
onSelectSpeaker: (deviceInfo) => __awaiter$7(void 0, void 0, void 0, function* () {
|
|
9934
9947
|
yield adapter.setSpeaker(deviceInfo);
|
|
9935
9948
|
}),
|
|
9936
9949
|
onStartCall: (participants) => {
|
|
9937
9950
|
const rawIds = participants.map((participant) => toFlatCommunicationIdentifier(participant));
|
|
9938
9951
|
return adapter.startCall(rawIds);
|
|
9939
9952
|
},
|
|
9940
|
-
onStartScreenShare: () => __awaiter$
|
|
9953
|
+
onStartScreenShare: () => __awaiter$7(void 0, void 0, void 0, function* () {
|
|
9941
9954
|
yield adapter.startScreenShare();
|
|
9942
9955
|
}),
|
|
9943
|
-
onStopScreenShare: () => __awaiter$
|
|
9956
|
+
onStopScreenShare: () => __awaiter$7(void 0, void 0, void 0, function* () {
|
|
9944
9957
|
yield adapter.stopScreenShare();
|
|
9945
9958
|
}),
|
|
9946
|
-
onToggleCamera: (options) => __awaiter$
|
|
9959
|
+
onToggleCamera: (options) => __awaiter$7(void 0, void 0, void 0, function* () {
|
|
9947
9960
|
isCameraOn(adapter.getState()) ? yield adapter.stopCamera() : yield adapter.startCamera(options);
|
|
9948
9961
|
}),
|
|
9949
|
-
onToggleMicrophone: () => __awaiter$
|
|
9962
|
+
onToggleMicrophone: () => __awaiter$7(void 0, void 0, void 0, function* () {
|
|
9950
9963
|
var _a;
|
|
9951
9964
|
return ((_a = adapter.getState().call) === null || _a === void 0 ? void 0 : _a.isMuted) ? yield adapter.unmute() : yield adapter.mute();
|
|
9952
9965
|
}),
|
|
9953
|
-
onToggleScreenShare: () => __awaiter$
|
|
9966
|
+
onToggleScreenShare: () => __awaiter$7(void 0, void 0, void 0, function* () {
|
|
9954
9967
|
var _b;
|
|
9955
9968
|
return ((_b = adapter.getState().call) === null || _b === void 0 ? void 0 : _b.isScreenSharingOn)
|
|
9956
9969
|
? yield adapter.stopScreenShare()
|
|
9957
9970
|
: yield adapter.startScreenShare();
|
|
9958
9971
|
}),
|
|
9959
|
-
onStartLocalVideo: () => __awaiter$
|
|
9972
|
+
onStartLocalVideo: () => __awaiter$7(void 0, void 0, void 0, function* () {
|
|
9960
9973
|
if (adapter.getState().call) {
|
|
9961
9974
|
return adapter.startCamera();
|
|
9962
9975
|
}
|
|
9963
9976
|
}),
|
|
9964
|
-
onDisposeLocalStreamView: () => __awaiter$
|
|
9977
|
+
onDisposeLocalStreamView: () => __awaiter$7(void 0, void 0, void 0, function* () {
|
|
9965
9978
|
return adapter.disposeStreamView();
|
|
9966
9979
|
}),
|
|
9967
|
-
onDisposeRemoteStreamView: (userId) => __awaiter$
|
|
9980
|
+
onDisposeRemoteStreamView: (userId) => __awaiter$7(void 0, void 0, void 0, function* () {
|
|
9968
9981
|
return adapter.disposeStreamView(userId);
|
|
9969
9982
|
})
|
|
9970
9983
|
}));
|
|
@@ -10034,6 +10047,7 @@ const getIsRecordingActive = (state) => { var _a; return !!((_a = state.call) ==
|
|
|
10034
10047
|
const getUserFacingDiagnostics = (state) => { var _a; return (_a = state.call) === null || _a === void 0 ? void 0 : _a.diagnostics; };
|
|
10035
10048
|
|
|
10036
10049
|
// Copyright (c) Microsoft Corporation.
|
|
10050
|
+
// Licensed under the MIT license.
|
|
10037
10051
|
const MINIMUM_TOUCH_TARGET_HEIGHT_REM = 3;
|
|
10038
10052
|
/** @private */
|
|
10039
10053
|
const controlBarContainerStyles = {
|
|
@@ -10071,17 +10085,6 @@ const groupCallLeaveButtonCompressedStyle = {
|
|
|
10071
10085
|
flexFlow: 'row'
|
|
10072
10086
|
}
|
|
10073
10087
|
};
|
|
10074
|
-
/**
|
|
10075
|
-
* @private
|
|
10076
|
-
*/
|
|
10077
|
-
const checkedButtonOverrideStyles = (theme, isChecked) => ({
|
|
10078
|
-
rootChecked: {
|
|
10079
|
-
background: theme.palette.themePrimary,
|
|
10080
|
-
color: react.DefaultPalette.white,
|
|
10081
|
-
':focus::after': { outlineColor: `${react.DefaultPalette.white} !important` } // added !important to avoid override by FluentUI button styles
|
|
10082
|
-
},
|
|
10083
|
-
label: isChecked ? { color: react.DefaultPalette.white } : {}
|
|
10084
|
-
});
|
|
10085
10088
|
/**
|
|
10086
10089
|
* Styles that can be applied to ensure flyout items have the minimum touch target size.
|
|
10087
10090
|
*
|
|
@@ -10170,14 +10173,12 @@ const CallControls = (props) => {
|
|
|
10170
10173
|
const participantsButtonProps = usePropsFor$1(ParticipantsButton);
|
|
10171
10174
|
const devicesButtonProps = usePropsFor$1(DevicesButton);
|
|
10172
10175
|
const hangUpButtonProps = usePropsFor$1(EndCallButton);
|
|
10173
|
-
const theme = useTheme();
|
|
10174
|
-
const screenShareButtonStyles = React.useMemo(() => mergeButtonBaseStyles(checkedButtonOverrideStyles(theme, screenShareButtonProps.checked)), [screenShareButtonProps.checked, theme.palette.themePrimary]);
|
|
10175
10176
|
const participantsButtonStyles = React.useMemo(() => mergeButtonBaseStyles(props.increaseFlyoutItemSize ? participantButtonWithIncreasedTouchTargets : {}), [props.increaseFlyoutItemSize]);
|
|
10176
10177
|
const devicesButtonStyles = React.useMemo(() => mergeButtonBaseStyles(props.increaseFlyoutItemSize ? devicesButtonWithIncreasedTouchTargets : {}), [props.increaseFlyoutItemSize]);
|
|
10177
10178
|
const compactMode = (options === null || options === void 0 ? void 0 : options.displayType) === 'compact';
|
|
10178
10179
|
const microphoneButton = (options === null || options === void 0 ? void 0 : options.microphoneButton) !== false && (React__default['default'].createElement(MicrophoneButton, Object.assign({ "data-ui-id": "call-composite-microphone-button" }, microphoneButtonProps, { showLabel: !compactMode, styles: controlButtonBaseStyle }, microphoneButtonStrings)));
|
|
10179
10180
|
const cameraButton = (options === null || options === void 0 ? void 0 : options.cameraButton) !== false && (React__default['default'].createElement(CameraButton, Object.assign({ "data-ui-id": "call-composite-camera-button" }, cameraButtonProps, { showLabel: !compactMode, styles: controlButtonBaseStyle })));
|
|
10180
|
-
const screenShareButton = (options === null || options === void 0 ? void 0 : options.screenShareButton) !== false && (React__default['default'].createElement(ScreenShareButton, Object.assign({ "data-ui-id": "call-composite-screenshare-button" }, screenShareButtonProps, {
|
|
10181
|
+
const screenShareButton = (options === null || options === void 0 ? void 0 : options.screenShareButton) !== false && (React__default['default'].createElement(ScreenShareButton, Object.assign({ "data-ui-id": "call-composite-screenshare-button" }, screenShareButtonProps, { showLabel: !compactMode, disabled: (options === null || options === void 0 ? void 0 : options.screenShareButton) !== true && ((_a = options === null || options === void 0 ? void 0 : options.screenShareButton) === null || _a === void 0 ? void 0 : _a.disabled) })));
|
|
10181
10182
|
const participantButton = (options === null || options === void 0 ? void 0 : options.participantsButton) !== false && (React__default['default'].createElement(ParticipantsButton, Object.assign({ "data-ui-id": "call-composite-participants-button" }, participantsButtonProps, { showLabel: !compactMode, callInvitationURL: callInvitationURL, onFetchParticipantMenuItems: onFetchParticipantMenuItems, disabled: (options === null || options === void 0 ? void 0 : options.participantsButton) !== true && ((_b = options === null || options === void 0 ? void 0 : options.participantsButton) === null || _b === void 0 ? void 0 : _b.disabled), styles: participantsButtonStyles })));
|
|
10182
10183
|
const devicesButton = (options === null || options === void 0 ? void 0 : options.devicesButton) !== false && (React__default['default'].createElement(DevicesButton
|
|
10183
10184
|
/* By setting `persistMenu?` to true, we prevent options menu from getting hidden every time a participant joins or leaves. */
|
|
@@ -10894,20 +10895,23 @@ const LocalDeviceSettings = (props) => {
|
|
|
10894
10895
|
: 'deniedOrUnknown', onChange: (event, option, index) => {
|
|
10895
10896
|
props.onSelectCamera(props.cameras[index !== null && index !== void 0 ? index : 0], localVideoViewOptions);
|
|
10896
10897
|
}, onRenderTitle: (props) => onRenderTitle('Camera', props) }),
|
|
10897
|
-
React__default['default'].createElement(react.
|
|
10898
|
-
|
|
10899
|
-
|
|
10900
|
-
|
|
10901
|
-
|
|
10902
|
-
|
|
10903
|
-
|
|
10904
|
-
|
|
10905
|
-
|
|
10906
|
-
|
|
10907
|
-
|
|
10908
|
-
|
|
10909
|
-
|
|
10910
|
-
|
|
10898
|
+
React__default['default'].createElement(react.Stack, null,
|
|
10899
|
+
React__default['default'].createElement(react.Label, { id: 'call-composite-local-sound-settings-label', className: react.mergeStyles(dropDownStyles(theme).label), disabled: !props.microphonePermissionGranted }, soundLabel),
|
|
10900
|
+
React__default['default'].createElement(react.Stack, { "data-ui-id": "call-composite-sound-settings", tokens: mainStackTokens },
|
|
10901
|
+
React__default['default'].createElement(react.Dropdown, { "aria-labelledby": 'call-composite-local-sound-settings-label', placeholder: defaultPlaceHolder, styles: dropDownStyles(theme), disabled: !props.microphonePermissionGranted, errorMessage: props.microphonePermissionGranted === undefined || props.microphonePermissionGranted
|
|
10902
|
+
? undefined
|
|
10903
|
+
: locale.strings.call.microphonePermissionDenied, options: props.microphonePermissionGranted
|
|
10904
|
+
? getDropDownList(props.microphones)
|
|
10905
|
+
: [{ key: 'deniedOrUnknown', text: '' }], defaultSelectedKey: props.microphonePermissionGranted
|
|
10906
|
+
? props.selectedMicrophone
|
|
10907
|
+
? props.selectedMicrophone.id
|
|
10908
|
+
: defaultDeviceId(props.microphones)
|
|
10909
|
+
: 'deniedOrUnknown', onChange: (event, option, index) => {
|
|
10910
|
+
props.onSelectMicrophone(props.microphones[index !== null && index !== void 0 ? index : 0]);
|
|
10911
|
+
}, onRenderTitle: (props) => onRenderTitle('Microphone', props) }),
|
|
10912
|
+
React__default['default'].createElement(react.Dropdown, { "aria-labelledby": 'call-composite-local-sound-settings-label', placeholder: defaultPlaceHolder, styles: dropDownStyles(theme), disabled: props.speakers.length === 0, options: getDropDownList(props.speakers), defaultSelectedKey: props.selectedSpeaker ? props.selectedSpeaker.id : defaultDeviceId(props.speakers), onChange: (event, option, index) => {
|
|
10913
|
+
props.onSelectSpeaker(props.speakers[index !== null && index !== void 0 ? index : 0]);
|
|
10914
|
+
}, onRenderTitle: (props) => onRenderTitle('Speaker', props) })))));
|
|
10911
10915
|
};
|
|
10912
10916
|
const defaultDeviceId = (devices) => {
|
|
10913
10917
|
if (devices.length === 0) {
|
|
@@ -11010,7 +11014,7 @@ const localPreviewTileStyle = {
|
|
|
11010
11014
|
|
|
11011
11015
|
// Copyright (c) Microsoft Corporation.
|
|
11012
11016
|
// Licensed under the MIT license.
|
|
11013
|
-
var __awaiter$
|
|
11017
|
+
var __awaiter$6 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
11014
11018
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
11015
11019
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
11016
11020
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -11030,7 +11034,7 @@ const LocalPreview = (props) => {
|
|
|
11030
11034
|
const { audio: microphonePermissionGranted, video: cameraPermissionGranted } = useSelector$1(devicePermissionSelector);
|
|
11031
11035
|
const isLocalMicrophoneEnabled = useSelector$1(getLocalMicrophoneEnabled);
|
|
11032
11036
|
const adapter = useAdapter();
|
|
11033
|
-
const onToggleMic = React.useCallback(() => __awaiter$
|
|
11037
|
+
const onToggleMic = React.useCallback(() => __awaiter$6(void 0, void 0, void 0, function* () {
|
|
11034
11038
|
isLocalMicrophoneEnabled ? adapter.mute() : adapter.unmute();
|
|
11035
11039
|
}), [adapter, isLocalMicrophoneEnabled]);
|
|
11036
11040
|
const theme = useTheme();
|
|
@@ -11354,7 +11358,7 @@ const mainScreenContainerStyleMobile = react.mergeStyles(Object.assign(Object.as
|
|
|
11354
11358
|
|
|
11355
11359
|
// Copyright (c) Microsoft Corporation.
|
|
11356
11360
|
// Licensed under the MIT license.
|
|
11357
|
-
var __awaiter$
|
|
11361
|
+
var __awaiter$5 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
11358
11362
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
11359
11363
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
11360
11364
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -11401,7 +11405,7 @@ const MainScreen = (props) => {
|
|
|
11401
11405
|
const CallComposite = (props) => {
|
|
11402
11406
|
const { adapter, callInvitationUrl, onFetchAvatarPersonaData, onFetchParticipantMenuItems, options, formFactor = 'desktop' } = props;
|
|
11403
11407
|
React.useEffect(() => {
|
|
11404
|
-
(() => __awaiter$
|
|
11408
|
+
(() => __awaiter$5(void 0, void 0, void 0, function* () {
|
|
11405
11409
|
yield adapter.askDevicePermission({ video: true, audio: true });
|
|
11406
11410
|
adapter.queryCameras();
|
|
11407
11411
|
adapter.queryMicrophones();
|
|
@@ -11492,7 +11496,7 @@ class DiagnosticsForwarder {
|
|
|
11492
11496
|
|
|
11493
11497
|
// Copyright (c) Microsoft Corporation.
|
|
11494
11498
|
// Licensed under the MIT license.
|
|
11495
|
-
var __awaiter = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
11499
|
+
var __awaiter$4 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
11496
11500
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
11497
11501
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
11498
11502
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -11630,29 +11634,29 @@ class AzureCommunicationCallAdapter {
|
|
|
11630
11634
|
this.callAgent.dispose();
|
|
11631
11635
|
}
|
|
11632
11636
|
queryCameras() {
|
|
11633
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
11634
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter(this, void 0, void 0, function* () {
|
|
11637
|
+
return __awaiter$4(this, void 0, void 0, function* () {
|
|
11638
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$4(this, void 0, void 0, function* () {
|
|
11635
11639
|
return this.deviceManager.getCameras();
|
|
11636
11640
|
}));
|
|
11637
11641
|
});
|
|
11638
11642
|
}
|
|
11639
11643
|
queryMicrophones() {
|
|
11640
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
11641
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter(this, void 0, void 0, function* () {
|
|
11644
|
+
return __awaiter$4(this, void 0, void 0, function* () {
|
|
11645
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$4(this, void 0, void 0, function* () {
|
|
11642
11646
|
return this.deviceManager.getMicrophones();
|
|
11643
11647
|
}));
|
|
11644
11648
|
});
|
|
11645
11649
|
}
|
|
11646
11650
|
querySpeakers() {
|
|
11647
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
11648
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter(this, void 0, void 0, function* () {
|
|
11651
|
+
return __awaiter$4(this, void 0, void 0, function* () {
|
|
11652
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$4(this, void 0, void 0, function* () {
|
|
11649
11653
|
return this.deviceManager.isSpeakerSelectionAvailable ? this.deviceManager.getSpeakers() : [];
|
|
11650
11654
|
}));
|
|
11651
11655
|
});
|
|
11652
11656
|
}
|
|
11653
11657
|
askDevicePermission(constrain) {
|
|
11654
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
11655
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter(this, void 0, void 0, function* () {
|
|
11658
|
+
return __awaiter$4(this, void 0, void 0, function* () {
|
|
11659
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$4(this, void 0, void 0, function* () {
|
|
11656
11660
|
yield this.deviceManager.askDevicePermission(constrain);
|
|
11657
11661
|
}));
|
|
11658
11662
|
});
|
|
@@ -11688,7 +11692,7 @@ class AzureCommunicationCallAdapter {
|
|
|
11688
11692
|
}
|
|
11689
11693
|
}
|
|
11690
11694
|
createStreamView(remoteUserId, options) {
|
|
11691
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
11695
|
+
return __awaiter$4(this, void 0, void 0, function* () {
|
|
11692
11696
|
if (remoteUserId === undefined) {
|
|
11693
11697
|
yield this.handlers.onCreateLocalStreamView(options);
|
|
11694
11698
|
}
|
|
@@ -11698,7 +11702,7 @@ class AzureCommunicationCallAdapter {
|
|
|
11698
11702
|
});
|
|
11699
11703
|
}
|
|
11700
11704
|
disposeStreamView(remoteUserId) {
|
|
11701
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
11705
|
+
return __awaiter$4(this, void 0, void 0, function* () {
|
|
11702
11706
|
if (remoteUserId === undefined) {
|
|
11703
11707
|
yield this.handlers.onDisposeLocalStreamView();
|
|
11704
11708
|
}
|
|
@@ -11709,7 +11713,7 @@ class AzureCommunicationCallAdapter {
|
|
|
11709
11713
|
}
|
|
11710
11714
|
leaveCall() {
|
|
11711
11715
|
var _a;
|
|
11712
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
11716
|
+
return __awaiter$4(this, void 0, void 0, function* () {
|
|
11713
11717
|
const callId = (_a = this.call) === null || _a === void 0 ? void 0 : _a.id;
|
|
11714
11718
|
yield this.handlers.onHangUp();
|
|
11715
11719
|
this.unsubscribeCallEvents();
|
|
@@ -11724,29 +11728,29 @@ class AzureCommunicationCallAdapter {
|
|
|
11724
11728
|
});
|
|
11725
11729
|
}
|
|
11726
11730
|
setCamera(device, options) {
|
|
11727
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
11728
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter(this, void 0, void 0, function* () {
|
|
11731
|
+
return __awaiter$4(this, void 0, void 0, function* () {
|
|
11732
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$4(this, void 0, void 0, function* () {
|
|
11729
11733
|
yield this.handlers.onSelectCamera(device, options);
|
|
11730
11734
|
}));
|
|
11731
11735
|
});
|
|
11732
11736
|
}
|
|
11733
11737
|
setMicrophone(device) {
|
|
11734
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
11735
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter(this, void 0, void 0, function* () {
|
|
11738
|
+
return __awaiter$4(this, void 0, void 0, function* () {
|
|
11739
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$4(this, void 0, void 0, function* () {
|
|
11736
11740
|
yield this.handlers.onSelectMicrophone(device);
|
|
11737
11741
|
}));
|
|
11738
11742
|
});
|
|
11739
11743
|
}
|
|
11740
11744
|
setSpeaker(device) {
|
|
11741
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
11742
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter(this, void 0, void 0, function* () {
|
|
11745
|
+
return __awaiter$4(this, void 0, void 0, function* () {
|
|
11746
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$4(this, void 0, void 0, function* () {
|
|
11743
11747
|
yield this.handlers.onSelectSpeaker(device);
|
|
11744
11748
|
}));
|
|
11745
11749
|
});
|
|
11746
11750
|
}
|
|
11747
11751
|
startCamera(options) {
|
|
11748
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
11749
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter(this, void 0, void 0, function* () {
|
|
11752
|
+
return __awaiter$4(this, void 0, void 0, function* () {
|
|
11753
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$4(this, void 0, void 0, function* () {
|
|
11750
11754
|
if (!isCameraOn(this.getState())) {
|
|
11751
11755
|
yield this.handlers.onToggleCamera(options);
|
|
11752
11756
|
}
|
|
@@ -11754,8 +11758,8 @@ class AzureCommunicationCallAdapter {
|
|
|
11754
11758
|
});
|
|
11755
11759
|
}
|
|
11756
11760
|
stopCamera() {
|
|
11757
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
11758
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter(this, void 0, void 0, function* () {
|
|
11761
|
+
return __awaiter$4(this, void 0, void 0, function* () {
|
|
11762
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$4(this, void 0, void 0, function* () {
|
|
11759
11763
|
if (isCameraOn(this.getState())) {
|
|
11760
11764
|
yield this.handlers.onToggleCamera();
|
|
11761
11765
|
}
|
|
@@ -11763,8 +11767,8 @@ class AzureCommunicationCallAdapter {
|
|
|
11763
11767
|
});
|
|
11764
11768
|
}
|
|
11765
11769
|
mute() {
|
|
11766
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
11767
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter(this, void 0, void 0, function* () {
|
|
11770
|
+
return __awaiter$4(this, void 0, void 0, function* () {
|
|
11771
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$4(this, void 0, void 0, function* () {
|
|
11768
11772
|
var _a, _b;
|
|
11769
11773
|
this.context.setIsLocalMicrophoneEnabled(false);
|
|
11770
11774
|
if (_isInCall((_a = this.call) === null || _a === void 0 ? void 0 : _a.state) && !((_b = this.call) === null || _b === void 0 ? void 0 : _b.isMuted)) {
|
|
@@ -11774,8 +11778,8 @@ class AzureCommunicationCallAdapter {
|
|
|
11774
11778
|
});
|
|
11775
11779
|
}
|
|
11776
11780
|
unmute() {
|
|
11777
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
11778
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter(this, void 0, void 0, function* () {
|
|
11781
|
+
return __awaiter$4(this, void 0, void 0, function* () {
|
|
11782
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$4(this, void 0, void 0, function* () {
|
|
11779
11783
|
var _a, _b;
|
|
11780
11784
|
this.context.setIsLocalMicrophoneEnabled(true);
|
|
11781
11785
|
if (_isInCall((_a = this.call) === null || _a === void 0 ? void 0 : _a.state) && ((_b = this.call) === null || _b === void 0 ? void 0 : _b.isMuted)) {
|
|
@@ -11785,8 +11789,8 @@ class AzureCommunicationCallAdapter {
|
|
|
11785
11789
|
});
|
|
11786
11790
|
}
|
|
11787
11791
|
startScreenShare() {
|
|
11788
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
11789
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter(this, void 0, void 0, function* () {
|
|
11792
|
+
return __awaiter$4(this, void 0, void 0, function* () {
|
|
11793
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$4(this, void 0, void 0, function* () {
|
|
11790
11794
|
var _a;
|
|
11791
11795
|
if (!((_a = this.call) === null || _a === void 0 ? void 0 : _a.isScreenSharingOn)) {
|
|
11792
11796
|
yield this.handlers.onToggleScreenShare();
|
|
@@ -11795,8 +11799,8 @@ class AzureCommunicationCallAdapter {
|
|
|
11795
11799
|
});
|
|
11796
11800
|
}
|
|
11797
11801
|
stopScreenShare() {
|
|
11798
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
11799
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter(this, void 0, void 0, function* () {
|
|
11802
|
+
return __awaiter$4(this, void 0, void 0, function* () {
|
|
11803
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$4(this, void 0, void 0, function* () {
|
|
11800
11804
|
var _a;
|
|
11801
11805
|
if ((_a = this.call) === null || _a === void 0 ? void 0 : _a.isScreenSharingOn) {
|
|
11802
11806
|
yield this.handlers.onToggleScreenShare();
|
|
@@ -11815,7 +11819,7 @@ class AzureCommunicationCallAdapter {
|
|
|
11815
11819
|
return this.handlers.onStartCall(idsToAdd);
|
|
11816
11820
|
}
|
|
11817
11821
|
removeParticipant(userId) {
|
|
11818
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
11822
|
+
return __awaiter$4(this, void 0, void 0, function* () {
|
|
11819
11823
|
this.handlers.onRemoveParticipant(userId);
|
|
11820
11824
|
});
|
|
11821
11825
|
}
|
|
@@ -11890,7 +11894,7 @@ class AzureCommunicationCallAdapter {
|
|
|
11890
11894
|
this.emitter.off(event, listener);
|
|
11891
11895
|
}
|
|
11892
11896
|
asyncTeeErrorToEventEmitter(f) {
|
|
11893
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
11897
|
+
return __awaiter$4(this, void 0, void 0, function* () {
|
|
11894
11898
|
try {
|
|
11895
11899
|
return yield f();
|
|
11896
11900
|
}
|
|
@@ -11910,7 +11914,7 @@ class AzureCommunicationCallAdapter {
|
|
|
11910
11914
|
*
|
|
11911
11915
|
* @public
|
|
11912
11916
|
*/
|
|
11913
|
-
const createAzureCommunicationCallAdapter = ({ userId, displayName, credential, locator }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
11917
|
+
const createAzureCommunicationCallAdapter = ({ userId, displayName, credential, locator }) => __awaiter$4(void 0, void 0, void 0, function* () {
|
|
11914
11918
|
const callClient = createStatefulCallClient({ userId });
|
|
11915
11919
|
const callAgent = yield callClient.createCallAgent(credential, { displayName });
|
|
11916
11920
|
const adapter = createAzureCommunicationCallAdapterFromClient(callClient, callAgent, locator);
|
|
@@ -11924,7 +11928,7 @@ const createAzureCommunicationCallAdapter = ({ userId, displayName, credential,
|
|
|
11924
11928
|
*
|
|
11925
11929
|
* @public
|
|
11926
11930
|
*/
|
|
11927
|
-
const createAzureCommunicationCallAdapterFromClient = (callClient, callAgent, locator) => __awaiter(void 0, void 0, void 0, function* () {
|
|
11931
|
+
const createAzureCommunicationCallAdapterFromClient = (callClient, callAgent, locator) => __awaiter$4(void 0, void 0, void 0, function* () {
|
|
11928
11932
|
const deviceManager = (yield callClient.getDeviceManager());
|
|
11929
11933
|
return new AzureCommunicationCallAdapter(callClient, locator, callAgent, deviceManager);
|
|
11930
11934
|
});
|
|
@@ -11932,6 +11936,1018 @@ const isCallError = (e) => {
|
|
|
11932
11936
|
return e['target'] !== undefined && e['innerError'] !== undefined;
|
|
11933
11937
|
};
|
|
11934
11938
|
|
|
11939
|
+
// Copyright (c) Microsoft Corporation.
|
|
11940
|
+
// Licensed under the MIT license.
|
|
11941
|
+
/**
|
|
11942
|
+
* @private
|
|
11943
|
+
*/
|
|
11944
|
+
const sidePaneContainerStyles = {
|
|
11945
|
+
root: {
|
|
11946
|
+
height: '100%',
|
|
11947
|
+
paddingTop: '0.5rem',
|
|
11948
|
+
paddingBottom: '0.5rem',
|
|
11949
|
+
width: '21.5rem'
|
|
11950
|
+
}
|
|
11951
|
+
};
|
|
11952
|
+
/**
|
|
11953
|
+
* @private
|
|
11954
|
+
*/
|
|
11955
|
+
const sidePaneContainerHiddenStyles = {
|
|
11956
|
+
root: Object.assign(Object.assign({}, sidePaneContainerStyles), { display: 'none' })
|
|
11957
|
+
};
|
|
11958
|
+
/**
|
|
11959
|
+
* @private
|
|
11960
|
+
*/
|
|
11961
|
+
const sidePaneContainerTokens = {
|
|
11962
|
+
childrenGap: '0.5rem'
|
|
11963
|
+
};
|
|
11964
|
+
/**
|
|
11965
|
+
* @private
|
|
11966
|
+
*/
|
|
11967
|
+
const sidePaneHeaderStyles = {
|
|
11968
|
+
root: {
|
|
11969
|
+
fontSize: '0.825rem',
|
|
11970
|
+
lineHeight: '1.25rem',
|
|
11971
|
+
padding: '0.25rem',
|
|
11972
|
+
fontWeight: '600'
|
|
11973
|
+
}
|
|
11974
|
+
};
|
|
11975
|
+
/**
|
|
11976
|
+
* @private
|
|
11977
|
+
*/
|
|
11978
|
+
const paneBodyContainer = { root: { flexDirection: 'column', display: 'flex' } };
|
|
11979
|
+
/**
|
|
11980
|
+
* @private
|
|
11981
|
+
*/
|
|
11982
|
+
const scrollableContainer = { root: { flexBasis: '0', flexGrow: '1', overflowY: 'auto' } };
|
|
11983
|
+
/**
|
|
11984
|
+
* @private
|
|
11985
|
+
*/
|
|
11986
|
+
const scrollableContainerContents = { root: { flexGrow: '1', flexBasis: '0' } };
|
|
11987
|
+
/**
|
|
11988
|
+
* @private
|
|
11989
|
+
*/
|
|
11990
|
+
const peopleSubheadingStyle = {
|
|
11991
|
+
root: {
|
|
11992
|
+
fontSize: '0.75rem'
|
|
11993
|
+
}
|
|
11994
|
+
};
|
|
11995
|
+
/**
|
|
11996
|
+
* @private
|
|
11997
|
+
*/
|
|
11998
|
+
const peoplePaneContainerTokens = {
|
|
11999
|
+
childrenGap: '0.5rem'
|
|
12000
|
+
};
|
|
12001
|
+
|
|
12002
|
+
var __awaiter$3 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
12003
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
12004
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
12005
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
12006
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
12007
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
12008
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
12009
|
+
});
|
|
12010
|
+
};
|
|
12011
|
+
const SidePane = (props) => {
|
|
12012
|
+
// We hide the side pane instead of not rendering the entire pane to persist certain elements
|
|
12013
|
+
// between renders. An example of this is composing a chat message - a chat message that has been
|
|
12014
|
+
// typed but not sent should not be lost if the side panel is closed and then reopened.
|
|
12015
|
+
const sidePaneStyles = props.hidden ? sidePaneContainerHiddenStyles : sidePaneContainerStyles;
|
|
12016
|
+
const theme = useTheme();
|
|
12017
|
+
const sidePaneCloseButtonStyles = {
|
|
12018
|
+
icon: { color: theme.palette.neutralSecondary },
|
|
12019
|
+
iconHovered: { color: theme.palette.neutralSecondary },
|
|
12020
|
+
iconPressed: { color: theme.palette.neutralSecondary }
|
|
12021
|
+
};
|
|
12022
|
+
return (React__default['default'].createElement(react.Stack.Item, { disableShrink: true, verticalFill: true, styles: sidePaneStyles, tokens: sidePaneContainerTokens },
|
|
12023
|
+
React__default['default'].createElement(react.Stack, { verticalFill: true, "data-ui-id": props.dataUiId },
|
|
12024
|
+
React__default['default'].createElement(react.Stack, { horizontal: true, horizontalAlign: "space-between", styles: sidePaneHeaderStyles },
|
|
12025
|
+
React__default['default'].createElement(react.Stack.Item, null, props.headingText),
|
|
12026
|
+
React__default['default'].createElement(react.CommandBarButton, { styles: sidePaneCloseButtonStyles, iconProps: { iconName: 'cancel' }, onClick: props.onClose })),
|
|
12027
|
+
React__default['default'].createElement(react.Stack.Item, { verticalFill: true, grow: true, styles: paneBodyContainer },
|
|
12028
|
+
React__default['default'].createElement(react.Stack, { horizontal: true, styles: scrollableContainer },
|
|
12029
|
+
React__default['default'].createElement(react.Stack.Item, { verticalFill: true, styles: scrollableContainerContents }, props.children))))));
|
|
12030
|
+
};
|
|
12031
|
+
/**
|
|
12032
|
+
* In a Meeting when a participant is removed, we must remove them from both
|
|
12033
|
+
* the call and the chat thread.
|
|
12034
|
+
*/
|
|
12035
|
+
const removeParticipantFromMeeting = (callAdapter, chatAdapter, participantId) => __awaiter$3(void 0, void 0, void 0, function* () {
|
|
12036
|
+
yield callAdapter.removeParticipant(participantId);
|
|
12037
|
+
yield chatAdapter.removeParticipant(participantId);
|
|
12038
|
+
});
|
|
12039
|
+
/**
|
|
12040
|
+
* @private
|
|
12041
|
+
*/
|
|
12042
|
+
const EmbeddedPeoplePane = (props) => {
|
|
12043
|
+
const { callAdapter, chatAdapter, inviteLink } = props;
|
|
12044
|
+
const participantListDefaultProps = usePropsFor$1(ParticipantList);
|
|
12045
|
+
const participantListProps = React.useMemo(() => {
|
|
12046
|
+
const onRemoveParticipant = (participantId) => __awaiter$3(void 0, void 0, void 0, function* () { return removeParticipantFromMeeting(callAdapter, chatAdapter, participantId); });
|
|
12047
|
+
return Object.assign(Object.assign({}, participantListDefaultProps), { onRemoveParticipant });
|
|
12048
|
+
}, [participantListDefaultProps, callAdapter, chatAdapter]);
|
|
12049
|
+
const theme = useTheme();
|
|
12050
|
+
const peopleSubheadingStyleThemed = react.concatStyleSets(peopleSubheadingStyle, {
|
|
12051
|
+
root: {
|
|
12052
|
+
color: theme.palette.neutralSecondary
|
|
12053
|
+
}
|
|
12054
|
+
});
|
|
12055
|
+
return (React__default['default'].createElement(SidePane, { hidden: props.hidden, headingText: 'People', onClose: props.onClose, dataUiId: 'meeting-composite-people-pane' },
|
|
12056
|
+
React__default['default'].createElement(react.Stack, { tokens: peoplePaneContainerTokens },
|
|
12057
|
+
inviteLink && (React__default['default'].createElement(react.DefaultButton, { text: "Copy invite link", iconProps: { iconName: 'Link' }, onClick: () => copy__default['default'](inviteLink) })),
|
|
12058
|
+
React__default['default'].createElement(react.Stack.Item, { styles: peopleSubheadingStyleThemed }, "In this call"),
|
|
12059
|
+
React__default['default'].createElement(ParticipantList, Object.assign({}, participantListProps)))));
|
|
12060
|
+
};
|
|
12061
|
+
/**
|
|
12062
|
+
* @private
|
|
12063
|
+
*/
|
|
12064
|
+
const EmbeddedChatPane = (props) => {
|
|
12065
|
+
return (React__default['default'].createElement(SidePane, { hidden: props.hidden, headingText: 'Chat', onClose: props.onClose, dataUiId: 'meeting-composite-chat-pane' },
|
|
12066
|
+
React__default['default'].createElement(ChatComposite, Object.assign({}, props.chatCompositeProps, { adapter: props.chatAdapter, fluentTheme: props.fluentTheme, options: { participantPane: false, topic: false } }))));
|
|
12067
|
+
};
|
|
12068
|
+
|
|
12069
|
+
// Copyright (c) Microsoft Corporation.
|
|
12070
|
+
const onRenderOnIcon$1 = () => React__default['default'].createElement(reactIcons.Chat20Filled, { key: 'chatOnIconKey', primaryFill: "currentColor" });
|
|
12071
|
+
const onRenderOffIcon$1 = () => React__default['default'].createElement(reactIcons.Chat20Regular, { key: 'chatOffIconKey', primaryFill: "currentColor" });
|
|
12072
|
+
/**
|
|
12073
|
+
* @private
|
|
12074
|
+
*/
|
|
12075
|
+
const ChatButton = (props) => {
|
|
12076
|
+
var _a, _b;
|
|
12077
|
+
const strings = Object.assign({ label: 'Chat' }, props.strings);
|
|
12078
|
+
return (React__default['default'].createElement(ControlBarButton, Object.assign({}, props, { labelKey: 'chatButtonLabelKey', strings: strings, onRenderOnIcon: (_a = props.onRenderOnIcon) !== null && _a !== void 0 ? _a : onRenderOnIcon$1, onRenderOffIcon: (_b = props.onRenderOffIcon) !== null && _b !== void 0 ? _b : onRenderOffIcon$1, onClick: props.onClick })));
|
|
12079
|
+
};
|
|
12080
|
+
|
|
12081
|
+
// Copyright (c) Microsoft Corporation.
|
|
12082
|
+
const onRenderOnIcon = () => React__default['default'].createElement(reactIcons.People20Filled, { key: 'peopleOnIconKey', primaryFill: "currentColor" });
|
|
12083
|
+
const onRenderOffIcon = () => React__default['default'].createElement(reactIcons.People20Regular, { key: 'peopleOffIconKey', primaryFill: "currentColor" });
|
|
12084
|
+
/**
|
|
12085
|
+
* @private
|
|
12086
|
+
*/
|
|
12087
|
+
const PeopleButton = (props) => {
|
|
12088
|
+
var _a, _b;
|
|
12089
|
+
const strings = Object.assign({ label: 'People' }, props.strings);
|
|
12090
|
+
return (React__default['default'].createElement(ControlBarButton, Object.assign({}, props, { strings: strings, labelKey: 'peopleButtonLabelKey', onRenderOnIcon: (_a = props.onRenderOnIcon) !== null && _a !== void 0 ? _a : onRenderOnIcon, onRenderOffIcon: (_b = props.onRenderOffIcon) !== null && _b !== void 0 ? _b : onRenderOffIcon, onClick: props.onClick })));
|
|
12091
|
+
};
|
|
12092
|
+
|
|
12093
|
+
// Copyright (c) Microsoft Corporation.
|
|
12094
|
+
/**
|
|
12095
|
+
* @private
|
|
12096
|
+
*/
|
|
12097
|
+
const MeetingCallControlBar = (props) => {
|
|
12098
|
+
// Disable the default participants button as meetings composite has its own participants button.
|
|
12099
|
+
let callControlsOptions = {
|
|
12100
|
+
participantsButton: false,
|
|
12101
|
+
screenShareButton: props.mobileView ? false : { disabled: props.disableButtonsForLobbyPage }
|
|
12102
|
+
};
|
|
12103
|
+
// Reduce the controls shown when mobile view is enabled.
|
|
12104
|
+
if (props.mobileView) {
|
|
12105
|
+
callControlsOptions = reduceCallControlsForMobile(callControlsOptions);
|
|
12106
|
+
}
|
|
12107
|
+
/**
|
|
12108
|
+
* Until mobile meetings is worked on, statically set the width of the
|
|
12109
|
+
* control bar such that all controls can be accessed.
|
|
12110
|
+
*/
|
|
12111
|
+
const temporaryMeetingControlBarStyles = props.mobileView ? { width: '23.5rem' } : undefined;
|
|
12112
|
+
return (React__default['default'].createElement(react.Stack, { horizontal: true, className: react.mergeStyles(temporaryMeetingControlBarStyles, callControlsContainerStyles, controlBarContainerStyles) },
|
|
12113
|
+
React__default['default'].createElement(react.Stack.Item, { grow: true },
|
|
12114
|
+
React__default['default'].createElement(CallAdapterProvider, { adapter: props.callAdapter },
|
|
12115
|
+
React__default['default'].createElement(CallControls, { options: callControlsOptions, increaseFlyoutItemSize: props.mobileView }))),
|
|
12116
|
+
React__default['default'].createElement(react.Stack.Item, null,
|
|
12117
|
+
React__default['default'].createElement(ChatButton, { checked: props.chatButtonChecked, showLabel: true, onClick: props.onChatButtonClicked, "data-ui-id": "meeting-composite-chat-button", disabled: props.disableButtonsForLobbyPage }),
|
|
12118
|
+
React__default['default'].createElement(PeopleButton, { checked: props.peopleButtonChecked, showLabel: true, onClick: props.onPeopleButtonClicked, "data-ui-id": "meeting-composite-people-button", disabled: props.disableButtonsForLobbyPage }))));
|
|
12119
|
+
};
|
|
12120
|
+
|
|
12121
|
+
// Copyright (c) Microsoft Corporation.
|
|
12122
|
+
// Licensed under the MIT license.
|
|
12123
|
+
/**
|
|
12124
|
+
* @private
|
|
12125
|
+
*/
|
|
12126
|
+
const compositeOuterContainerStyles = {
|
|
12127
|
+
root: {
|
|
12128
|
+
width: '100%',
|
|
12129
|
+
// This allows the composite to correctly contain the call composite by calculating a height for the available space.
|
|
12130
|
+
// Items inside the call composite that fill 100% of the height will now fill the height of this container instead
|
|
12131
|
+
// of the height of the child items.
|
|
12132
|
+
// If this css property is to be removed, test the participant pane correctly uses the scroll overflow when there a lot
|
|
12133
|
+
// of participants (i.e. beyond screen height) and where one participant is sharing their screen.
|
|
12134
|
+
flexWrap: 'wrap'
|
|
12135
|
+
}
|
|
12136
|
+
};
|
|
12137
|
+
|
|
12138
|
+
// Copyright (c) Microsoft Corporation.
|
|
12139
|
+
// Licensed under the MIT license.
|
|
12140
|
+
/**
|
|
12141
|
+
* @private
|
|
12142
|
+
*/
|
|
12143
|
+
function callPageToMeetingPage(page) {
|
|
12144
|
+
switch (page) {
|
|
12145
|
+
case 'call':
|
|
12146
|
+
return 'meeting';
|
|
12147
|
+
case 'leftCall':
|
|
12148
|
+
return 'leftMeeting';
|
|
12149
|
+
case 'removedFromCall':
|
|
12150
|
+
return 'removedFromMeeting';
|
|
12151
|
+
case 'joinCallFailedDueToNoNetwork':
|
|
12152
|
+
return 'joinMeetingFailedDueToNoNetwork';
|
|
12153
|
+
default:
|
|
12154
|
+
return page;
|
|
12155
|
+
}
|
|
12156
|
+
}
|
|
12157
|
+
/**
|
|
12158
|
+
* @private
|
|
12159
|
+
*/
|
|
12160
|
+
function meetingPageToCallPage(page) {
|
|
12161
|
+
switch (page) {
|
|
12162
|
+
case 'meeting':
|
|
12163
|
+
return 'call';
|
|
12164
|
+
case 'leftMeeting':
|
|
12165
|
+
return 'leftCall';
|
|
12166
|
+
case 'removedFromMeeting':
|
|
12167
|
+
return 'removedFromCall';
|
|
12168
|
+
case 'joinMeetingFailedDueToNoNetwork':
|
|
12169
|
+
return 'joinCallFailedDueToNoNetwork';
|
|
12170
|
+
default:
|
|
12171
|
+
return page;
|
|
12172
|
+
}
|
|
12173
|
+
}
|
|
12174
|
+
/**
|
|
12175
|
+
* @private
|
|
12176
|
+
*/
|
|
12177
|
+
const hasJoinedCall = (page, callStatus) => page === 'meeting' && callStatus === 'Connected';
|
|
12178
|
+
|
|
12179
|
+
// Copyright (c) Microsoft Corporation.
|
|
12180
|
+
// Licensed under the MIT license.
|
|
12181
|
+
/**
|
|
12182
|
+
* @private
|
|
12183
|
+
*/
|
|
12184
|
+
function meetingParticipantFromCallParticipant(callParticipant) {
|
|
12185
|
+
return {
|
|
12186
|
+
id: callParticipant.identifier,
|
|
12187
|
+
meetingEndReason: callParticipant.callEndReason,
|
|
12188
|
+
displayName: callParticipant.displayName,
|
|
12189
|
+
state: callParticipant.state,
|
|
12190
|
+
videoStreams: callParticipant.videoStreams,
|
|
12191
|
+
isMuted: callParticipant.isMuted,
|
|
12192
|
+
isSpeaking: callParticipant.isSpeaking
|
|
12193
|
+
};
|
|
12194
|
+
}
|
|
12195
|
+
/**
|
|
12196
|
+
* @private
|
|
12197
|
+
*/
|
|
12198
|
+
function callParticipantFromMeetingParticipant(meetingParticipant) {
|
|
12199
|
+
return {
|
|
12200
|
+
identifier: meetingParticipant.id,
|
|
12201
|
+
callEndReason: meetingParticipant.meetingEndReason,
|
|
12202
|
+
displayName: meetingParticipant.displayName,
|
|
12203
|
+
state: meetingParticipant.state,
|
|
12204
|
+
videoStreams: meetingParticipant.videoStreams,
|
|
12205
|
+
isMuted: meetingParticipant.isMuted,
|
|
12206
|
+
isSpeaking: meetingParticipant.isSpeaking
|
|
12207
|
+
};
|
|
12208
|
+
}
|
|
12209
|
+
/**
|
|
12210
|
+
* @private
|
|
12211
|
+
*/
|
|
12212
|
+
function meetingParticipantsFromCallParticipants(callParticipants) {
|
|
12213
|
+
const meetingParticipants = {};
|
|
12214
|
+
for (const [key, value] of Object.entries(callParticipants)) {
|
|
12215
|
+
meetingParticipants[key] = meetingParticipantFromCallParticipant(value);
|
|
12216
|
+
}
|
|
12217
|
+
return meetingParticipants;
|
|
12218
|
+
}
|
|
12219
|
+
/**
|
|
12220
|
+
* @private
|
|
12221
|
+
*/
|
|
12222
|
+
function callParticipantsFromMeetingParticipants(meetingParticipants) {
|
|
12223
|
+
const callParticipants = {};
|
|
12224
|
+
for (const [key, value] of Object.entries(meetingParticipants)) {
|
|
12225
|
+
callParticipants[key] = callParticipantFromMeetingParticipant(value);
|
|
12226
|
+
}
|
|
12227
|
+
return callParticipants;
|
|
12228
|
+
}
|
|
12229
|
+
|
|
12230
|
+
// Copyright (c) Microsoft Corporation.
|
|
12231
|
+
// Licensed under the MIT license.
|
|
12232
|
+
var __awaiter$2 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
12233
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
12234
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
12235
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
12236
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
12237
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
12238
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
12239
|
+
});
|
|
12240
|
+
};
|
|
12241
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
12242
|
+
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
|
|
12243
|
+
function callStateFromMeetingState(meetingState) {
|
|
12244
|
+
return {
|
|
12245
|
+
id: meetingState.id,
|
|
12246
|
+
callerInfo: meetingState.callerInfo,
|
|
12247
|
+
state: meetingState.state,
|
|
12248
|
+
callEndReason: meetingState.meetingEndReason,
|
|
12249
|
+
direction: 'Incoming',
|
|
12250
|
+
isMuted: meetingState.isMuted,
|
|
12251
|
+
isScreenSharingOn: meetingState.isScreenSharingOn,
|
|
12252
|
+
localVideoStreams: meetingState.localVideoStreams,
|
|
12253
|
+
transcription: meetingState.transcription,
|
|
12254
|
+
recording: meetingState.recording,
|
|
12255
|
+
screenShareRemoteParticipant: meetingState.screenShareRemoteParticipant,
|
|
12256
|
+
startTime: meetingState.startTime,
|
|
12257
|
+
endTime: meetingState.endTime,
|
|
12258
|
+
diagnostics: meetingState.diagnostics,
|
|
12259
|
+
remoteParticipants: callParticipantsFromMeetingParticipants(meetingState.participants),
|
|
12260
|
+
remoteParticipantsEnded: callParticipantsFromMeetingParticipants(meetingState.participantsEnded),
|
|
12261
|
+
dominantSpeakers: meetingState.dominantSpeakers
|
|
12262
|
+
};
|
|
12263
|
+
}
|
|
12264
|
+
function callAdapterStateFromMeetingAdapterState(meetingState) {
|
|
12265
|
+
return {
|
|
12266
|
+
isLocalPreviewMicrophoneEnabled: meetingState.isLocalPreviewMicrophoneEnabled,
|
|
12267
|
+
page: meetingPageToCallPage(meetingState.page),
|
|
12268
|
+
userId: meetingState.userId,
|
|
12269
|
+
displayName: meetingState.displayName,
|
|
12270
|
+
call: meetingState.meeting ? callStateFromMeetingState(meetingState.meeting) : undefined,
|
|
12271
|
+
devices: meetingState.devices,
|
|
12272
|
+
isTeamsCall: meetingState.isTeamsCall,
|
|
12273
|
+
latestErrors: {} //@TODO: latest errors not supported in meeting composite yet.
|
|
12274
|
+
};
|
|
12275
|
+
}
|
|
12276
|
+
/**
|
|
12277
|
+
* Facade around the MeetingAdapter to satisfy the call adapter interface.
|
|
12278
|
+
*
|
|
12279
|
+
* @private
|
|
12280
|
+
*/
|
|
12281
|
+
class MeetingBackedCallAdapter {
|
|
12282
|
+
constructor(meetingAdapter) {
|
|
12283
|
+
// For onStateChange we must convert meeting state to chat state. This involves creating a new handler to be passed into the onStateChange.
|
|
12284
|
+
// In order to unsubscribe the handler when offStateChange is called we must have a mapping of the original handler to the newly created handler.
|
|
12285
|
+
this.eventStore = new Map();
|
|
12286
|
+
this.on = (event, listener) => this.meetingAdapter.on(event, listener);
|
|
12287
|
+
this.off = (event, listener) => this.meetingAdapter.off(event, listener);
|
|
12288
|
+
this.onStateChange = (handler) => {
|
|
12289
|
+
const convertedHandler = (state) => {
|
|
12290
|
+
handler(callAdapterStateFromMeetingAdapterState(state));
|
|
12291
|
+
};
|
|
12292
|
+
this.meetingAdapter.onStateChange(convertedHandler);
|
|
12293
|
+
this.eventStore.set(handler, convertedHandler);
|
|
12294
|
+
};
|
|
12295
|
+
this.offStateChange = (handler) => {
|
|
12296
|
+
const convertedHandler = this.eventStore.get(handler);
|
|
12297
|
+
convertedHandler && this.meetingAdapter.offStateChange(convertedHandler);
|
|
12298
|
+
};
|
|
12299
|
+
this.getState = () => callAdapterStateFromMeetingAdapterState(this.meetingAdapter.getState());
|
|
12300
|
+
this.dispose = () => this.meetingAdapter.dispose();
|
|
12301
|
+
this.joinCall = (microphoneOn) => {
|
|
12302
|
+
return this.meetingAdapter.joinMeeting(microphoneOn);
|
|
12303
|
+
};
|
|
12304
|
+
this.leaveCall = () => __awaiter$2(this, void 0, void 0, function* () { return yield this.meetingAdapter.leaveMeeting(); });
|
|
12305
|
+
this.startCall = (participants) => {
|
|
12306
|
+
return this.meetingAdapter.startMeeting(participants);
|
|
12307
|
+
};
|
|
12308
|
+
this.setCamera = (sourceId, options) => __awaiter$2(this, void 0, void 0, function* () { return yield this.meetingAdapter.setCamera(sourceId, options); });
|
|
12309
|
+
this.setMicrophone = (sourceId) => __awaiter$2(this, void 0, void 0, function* () { return yield this.meetingAdapter.setMicrophone(sourceId); });
|
|
12310
|
+
this.setSpeaker = (sourceId) => __awaiter$2(this, void 0, void 0, function* () { return yield this.meetingAdapter.setSpeaker(sourceId); });
|
|
12311
|
+
this.askDevicePermission = (constraints) => __awaiter$2(this, void 0, void 0, function* () { return yield this.meetingAdapter.askDevicePermission(constraints); });
|
|
12312
|
+
this.queryCameras = () => __awaiter$2(this, void 0, void 0, function* () { return yield this.meetingAdapter.queryCameras(); });
|
|
12313
|
+
this.queryMicrophones = () => __awaiter$2(this, void 0, void 0, function* () { return yield this.meetingAdapter.queryMicrophones(); });
|
|
12314
|
+
this.querySpeakers = () => __awaiter$2(this, void 0, void 0, function* () { return yield this.meetingAdapter.querySpeakers(); });
|
|
12315
|
+
this.startCamera = (options) => __awaiter$2(this, void 0, void 0, function* () { return yield this.meetingAdapter.startCamera(options); });
|
|
12316
|
+
this.stopCamera = () => __awaiter$2(this, void 0, void 0, function* () { return yield this.meetingAdapter.stopCamera(); });
|
|
12317
|
+
this.mute = () => __awaiter$2(this, void 0, void 0, function* () { return yield this.meetingAdapter.mute(); });
|
|
12318
|
+
this.unmute = () => __awaiter$2(this, void 0, void 0, function* () { return yield this.meetingAdapter.unmute(); });
|
|
12319
|
+
this.startScreenShare = () => __awaiter$2(this, void 0, void 0, function* () { return yield this.meetingAdapter.startScreenShare(); });
|
|
12320
|
+
this.stopScreenShare = () => __awaiter$2(this, void 0, void 0, function* () { return yield this.meetingAdapter.stopScreenShare(); });
|
|
12321
|
+
this.removeParticipant = (userId) => __awaiter$2(this, void 0, void 0, function* () { return yield this.meetingAdapter.removeParticipant(userId); });
|
|
12322
|
+
this.createStreamView = (remoteUserId, options) => __awaiter$2(this, void 0, void 0, function* () { return yield this.meetingAdapter.createStreamView(remoteUserId, options); });
|
|
12323
|
+
this.disposeStreamView = (remoteUserId, options) => __awaiter$2(this, void 0, void 0, function* () { return yield this.meetingAdapter.disposeStreamView(remoteUserId, options); });
|
|
12324
|
+
this.meetingAdapter = meetingAdapter;
|
|
12325
|
+
}
|
|
12326
|
+
}
|
|
12327
|
+
|
|
12328
|
+
// Copyright (c) Microsoft Corporation.
|
|
12329
|
+
// Licensed under the MIT license.
|
|
12330
|
+
var __awaiter$1 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
12331
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
12332
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
12333
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
12334
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
12335
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
12336
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
12337
|
+
});
|
|
12338
|
+
};
|
|
12339
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
12340
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
12341
|
+
function chatThreadStateFromMeetingState(meetingState) {
|
|
12342
|
+
return {
|
|
12343
|
+
chatMessages: meetingState.chatMessages,
|
|
12344
|
+
participants: meetingState.participants,
|
|
12345
|
+
threadId: meetingState.threadId,
|
|
12346
|
+
properties: meetingState.properties,
|
|
12347
|
+
readReceipts: meetingState.readReceipts,
|
|
12348
|
+
typingIndicators: meetingState.typingIndicators,
|
|
12349
|
+
latestReadTime: meetingState.latestReadTime
|
|
12350
|
+
};
|
|
12351
|
+
}
|
|
12352
|
+
function ChatAdapterStateFromMeetingAdapterState(meetingState) {
|
|
12353
|
+
if (!meetingState.meeting) {
|
|
12354
|
+
throw 'Cannot get chat adapter state. Meeting state is undefined.';
|
|
12355
|
+
}
|
|
12356
|
+
return {
|
|
12357
|
+
userId: meetingState.userId,
|
|
12358
|
+
displayName: meetingState.displayName || '',
|
|
12359
|
+
thread: chatThreadStateFromMeetingState(meetingState.meeting),
|
|
12360
|
+
latestErrors: {} //@TODO: latest errors not supported in meeting composite yet.
|
|
12361
|
+
};
|
|
12362
|
+
}
|
|
12363
|
+
/**
|
|
12364
|
+
* Facade around the MeetingAdapter to satisfy the chat adapter interface.
|
|
12365
|
+
*
|
|
12366
|
+
* @private
|
|
12367
|
+
*/
|
|
12368
|
+
class MeetingBackedChatAdapter {
|
|
12369
|
+
constructor(meetingAdapter) {
|
|
12370
|
+
// For onStateChange we must convert meeting state to chat state. This involves creating a new handler to be passed into the onStateChange.
|
|
12371
|
+
// In order to unsubscribe the handler when offStateChange is called we must have a mapping of the original handler to the newly created handler.
|
|
12372
|
+
this.eventStore = new Map();
|
|
12373
|
+
this.fetchInitialData = () => __awaiter$1(this, void 0, void 0, function* () { return yield this.meetingAdapter.fetchInitialData(); });
|
|
12374
|
+
this.sendMessage = (content) => __awaiter$1(this, void 0, void 0, function* () { return yield this.meetingAdapter.sendMessage(content); });
|
|
12375
|
+
this.sendReadReceipt = (chatMessageId) => __awaiter$1(this, void 0, void 0, function* () { return yield this.meetingAdapter.sendReadReceipt(chatMessageId); });
|
|
12376
|
+
this.sendTypingIndicator = () => __awaiter$1(this, void 0, void 0, function* () { return yield this.meetingAdapter.sendTypingIndicator(); });
|
|
12377
|
+
this.removeParticipant = (userId) => __awaiter$1(this, void 0, void 0, function* () { return yield this.meetingAdapter.removeParticipant(userId); });
|
|
12378
|
+
this.loadPreviousChatMessages = (messagesToLoad) => __awaiter$1(this, void 0, void 0, function* () { return yield this.meetingAdapter.loadPreviousChatMessages(messagesToLoad); });
|
|
12379
|
+
this.dispose = () => this.meetingAdapter.dispose();
|
|
12380
|
+
this.onStateChange = (handler) => {
|
|
12381
|
+
const convertedHandler = (state) => {
|
|
12382
|
+
handler(ChatAdapterStateFromMeetingAdapterState(state));
|
|
12383
|
+
};
|
|
12384
|
+
this.meetingAdapter.onStateChange(convertedHandler);
|
|
12385
|
+
this.eventStore.set(handler, convertedHandler);
|
|
12386
|
+
};
|
|
12387
|
+
this.offStateChange = (handler) => {
|
|
12388
|
+
const convertedHandler = this.eventStore.get(handler);
|
|
12389
|
+
convertedHandler && this.meetingAdapter.offStateChange(convertedHandler);
|
|
12390
|
+
};
|
|
12391
|
+
this.getState = () => ChatAdapterStateFromMeetingAdapterState(this.meetingAdapter.getState());
|
|
12392
|
+
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
|
|
12393
|
+
this.on = (event, listener) => this.meetingAdapter.on(event, listener);
|
|
12394
|
+
this.off = (event, listener) => this.meetingAdapter.off(event, listener);
|
|
12395
|
+
this.updateMessage = (messageId, content) => __awaiter$1(this, void 0, void 0, function* () { return yield this.meetingAdapter.updateMessage(messageId, content); });
|
|
12396
|
+
this.deleteMessage = (messageId) => __awaiter$1(this, void 0, void 0, function* () { return yield this.meetingAdapter.deleteMessage(messageId); });
|
|
12397
|
+
this.clearErrors = (errorTypes) => {
|
|
12398
|
+
throw `Method not supported in meetings.`;
|
|
12399
|
+
};
|
|
12400
|
+
this.setTopic = (topicName) => __awaiter$1(this, void 0, void 0, function* () {
|
|
12401
|
+
throw `Chat Topics are not supported in meetings.`;
|
|
12402
|
+
});
|
|
12403
|
+
this.meetingAdapter = meetingAdapter;
|
|
12404
|
+
}
|
|
12405
|
+
}
|
|
12406
|
+
|
|
12407
|
+
// Copyright (c) Microsoft Corporation.
|
|
12408
|
+
/**
|
|
12409
|
+
* Meeting Composite brings together key components to provide a full meeting experience out of the box.
|
|
12410
|
+
*
|
|
12411
|
+
* @beta
|
|
12412
|
+
*/
|
|
12413
|
+
const MeetingComposite = (props) => {
|
|
12414
|
+
const { meetingAdapter, fluentTheme, formFactor = 'desktop' } = props;
|
|
12415
|
+
if (!meetingAdapter) {
|
|
12416
|
+
throw 'Meeting adapter is undefined';
|
|
12417
|
+
}
|
|
12418
|
+
const callAdapter = React.useMemo(() => new MeetingBackedCallAdapter(meetingAdapter), [meetingAdapter]);
|
|
12419
|
+
const chatAdapter = React.useMemo(() => new MeetingBackedChatAdapter(meetingAdapter), [meetingAdapter]);
|
|
12420
|
+
const [currentMeetingState, setCurrentMeetingState] = React.useState();
|
|
12421
|
+
const [currentPage, setCurrentPage] = React.useState();
|
|
12422
|
+
meetingAdapter.onStateChange((newState) => {
|
|
12423
|
+
var _a;
|
|
12424
|
+
setCurrentPage(newState.page);
|
|
12425
|
+
setCurrentMeetingState((_a = newState.meeting) === null || _a === void 0 ? void 0 : _a.state);
|
|
12426
|
+
});
|
|
12427
|
+
const [showChat, setShowChat] = React.useState(false);
|
|
12428
|
+
const [showPeople, setShowPeople] = React.useState(false);
|
|
12429
|
+
const closePane = React.useCallback(() => {
|
|
12430
|
+
setShowChat(false);
|
|
12431
|
+
setShowPeople(false);
|
|
12432
|
+
}, []);
|
|
12433
|
+
const toggleChat = React.useCallback(() => {
|
|
12434
|
+
setShowPeople(false);
|
|
12435
|
+
setShowChat(!showChat);
|
|
12436
|
+
}, [showChat]);
|
|
12437
|
+
const togglePeople = React.useCallback(() => {
|
|
12438
|
+
setShowChat(false);
|
|
12439
|
+
setShowPeople(!showPeople);
|
|
12440
|
+
}, [showPeople]);
|
|
12441
|
+
const isInLobbyOrConnecting = currentPage === 'lobby';
|
|
12442
|
+
const hasJoinedCall$1 = !!(currentPage && hasJoinedCall(currentPage, currentMeetingState !== null && currentMeetingState !== void 0 ? currentMeetingState : 'None'));
|
|
12443
|
+
return (React__default['default'].createElement(FluentThemeProvider, { fluentTheme: fluentTheme },
|
|
12444
|
+
React__default['default'].createElement(react.Stack, { verticalFill: true, grow: true, styles: compositeOuterContainerStyles },
|
|
12445
|
+
React__default['default'].createElement(react.Stack, { horizontal: true, grow: true },
|
|
12446
|
+
React__default['default'].createElement(react.Stack.Item, { grow: true },
|
|
12447
|
+
React__default['default'].createElement(CallComposite, Object.assign({}, props, { formFactor: formFactor, options: { callControls: false }, adapter: callAdapter, fluentTheme: fluentTheme }))),
|
|
12448
|
+
chatAdapter && hasJoinedCall$1 && (React__default['default'].createElement(EmbeddedChatPane, { chatCompositeProps: props, hidden: !showChat, chatAdapter: chatAdapter, fluentTheme: fluentTheme, onClose: closePane })),
|
|
12449
|
+
callAdapter && chatAdapter && hasJoinedCall$1 && (React__default['default'].createElement(CallAdapterProvider, { adapter: callAdapter },
|
|
12450
|
+
React__default['default'].createElement(EmbeddedPeoplePane, { hidden: !showPeople, inviteLink: props.meetingInvitationURL, onClose: closePane, chatAdapter: chatAdapter, callAdapter: callAdapter })))),
|
|
12451
|
+
(isInLobbyOrConnecting || hasJoinedCall$1) && (React__default['default'].createElement(MeetingCallControlBar, { callAdapter: callAdapter, chatButtonChecked: showChat, onChatButtonClicked: toggleChat, peopleButtonChecked: showPeople, onPeopleButtonClicked: togglePeople, mobileView: props.formFactor === 'mobile', disableButtonsForLobbyPage: isInLobbyOrConnecting })))));
|
|
12452
|
+
};
|
|
12453
|
+
|
|
12454
|
+
// Copyright (c) Microsoft Corporation.
|
|
12455
|
+
/**
|
|
12456
|
+
* Return properties from call state that are used in meeting state.
|
|
12457
|
+
*
|
|
12458
|
+
* @private
|
|
12459
|
+
*/
|
|
12460
|
+
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
|
12461
|
+
const meetingPropsFromCallState = (callState) => ({
|
|
12462
|
+
id: callState.id,
|
|
12463
|
+
callerInfo: callState.callerInfo,
|
|
12464
|
+
state: callState.state,
|
|
12465
|
+
isMuted: callState.isMuted,
|
|
12466
|
+
isScreenSharingOn: callState.isScreenSharingOn,
|
|
12467
|
+
localVideoStreams: callState.localVideoStreams,
|
|
12468
|
+
transcription: callState.transcription,
|
|
12469
|
+
recording: callState.recording,
|
|
12470
|
+
screenShareRemoteParticipant: callState.screenShareRemoteParticipant,
|
|
12471
|
+
startTime: callState.startTime,
|
|
12472
|
+
endTime: callState.endTime,
|
|
12473
|
+
meetingEndReason: callState.callEndReason,
|
|
12474
|
+
diagnostics: callState.diagnostics,
|
|
12475
|
+
dominantSpeakers: callState.dominantSpeakers,
|
|
12476
|
+
// For meetings we only use participants from the call in a meeting
|
|
12477
|
+
participants: meetingParticipantsFromCallParticipants(callState.remoteParticipants),
|
|
12478
|
+
participantsEnded: meetingParticipantsFromCallParticipants(callState.remoteParticipantsEnded)
|
|
12479
|
+
});
|
|
12480
|
+
/**
|
|
12481
|
+
* Return properties from chat state that are used in meeting state.
|
|
12482
|
+
*
|
|
12483
|
+
* @private
|
|
12484
|
+
*/
|
|
12485
|
+
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
|
12486
|
+
const meetingPropsFromChatState = (chatState) => ({
|
|
12487
|
+
chatMessages: chatState.chatMessages,
|
|
12488
|
+
threadId: chatState.threadId,
|
|
12489
|
+
properties: chatState.properties,
|
|
12490
|
+
readReceipts: chatState.readReceipts,
|
|
12491
|
+
typingIndicators: chatState.typingIndicators,
|
|
12492
|
+
latestReadTime: chatState.latestReadTime
|
|
12493
|
+
});
|
|
12494
|
+
/**
|
|
12495
|
+
* Helper function to return meeting state created from call and chat states
|
|
12496
|
+
*
|
|
12497
|
+
* @private
|
|
12498
|
+
*/
|
|
12499
|
+
function meetingStateFromBackingStates(callState, chatState) {
|
|
12500
|
+
return Object.assign(Object.assign({}, meetingPropsFromCallState(callState)), meetingPropsFromChatState(chatState));
|
|
12501
|
+
}
|
|
12502
|
+
/**
|
|
12503
|
+
* Helper function to return an updated meeting state with new chat state applied
|
|
12504
|
+
*
|
|
12505
|
+
* @private
|
|
12506
|
+
*/
|
|
12507
|
+
function mergeChatStateIntoMeetingState(meetingState, chatState) {
|
|
12508
|
+
return Object.assign(Object.assign({}, meetingState), meetingPropsFromChatState(chatState));
|
|
12509
|
+
}
|
|
12510
|
+
/**
|
|
12511
|
+
* Helper function to return an updated meeting state with new call state applied
|
|
12512
|
+
*
|
|
12513
|
+
* @private
|
|
12514
|
+
*/
|
|
12515
|
+
function mergeCallStateIntoMeetingState(meetingState, callState) {
|
|
12516
|
+
// If we have no existing meeting state, populate chat fields with defaults to merge and make a new state.
|
|
12517
|
+
// This is because calls are constructed before chat state is created.
|
|
12518
|
+
if (!meetingState) {
|
|
12519
|
+
return Object.assign({ chatMessages: {}, threadId: '', properties: {}, readReceipts: [], typingIndicators: [], latestReadTime: new Date(0) }, meetingPropsFromCallState(callState));
|
|
12520
|
+
}
|
|
12521
|
+
return Object.assign(Object.assign({}, meetingState), meetingPropsFromCallState(callState));
|
|
12522
|
+
}
|
|
12523
|
+
|
|
12524
|
+
// Copyright (c) Microsoft Corporation.
|
|
12525
|
+
/**
|
|
12526
|
+
* @private
|
|
12527
|
+
*/
|
|
12528
|
+
function meetingAdapterStateFromBackingStates(callAdapter, chatAdapter) {
|
|
12529
|
+
const callAdapterState = callAdapter.getState();
|
|
12530
|
+
const chatAdapterState = chatAdapter.getState();
|
|
12531
|
+
const meeting = callAdapterState.call
|
|
12532
|
+
? meetingStateFromBackingStates(callAdapterState.call, chatAdapterState.thread)
|
|
12533
|
+
: undefined;
|
|
12534
|
+
return {
|
|
12535
|
+
meeting,
|
|
12536
|
+
userId: callAdapterState.userId,
|
|
12537
|
+
page: callPageToMeetingPage(callAdapterState.page),
|
|
12538
|
+
displayName: callAdapterState.displayName,
|
|
12539
|
+
devices: callAdapterState.devices,
|
|
12540
|
+
isLocalPreviewMicrophoneEnabled: callAdapterState.isLocalPreviewMicrophoneEnabled,
|
|
12541
|
+
isTeamsCall: callAdapterState.isTeamsCall
|
|
12542
|
+
};
|
|
12543
|
+
}
|
|
12544
|
+
/**
|
|
12545
|
+
* @private
|
|
12546
|
+
*/
|
|
12547
|
+
function mergeChatAdapterStateIntoMeetingAdapterState(meetingAdapterState, chatAdapterState) {
|
|
12548
|
+
const newMeetingState = meetingAdapterState.meeting
|
|
12549
|
+
? mergeChatStateIntoMeetingState(meetingAdapterState.meeting, chatAdapterState.thread)
|
|
12550
|
+
: undefined;
|
|
12551
|
+
return Object.assign(Object.assign({}, meetingAdapterState), { meeting: newMeetingState });
|
|
12552
|
+
}
|
|
12553
|
+
/**
|
|
12554
|
+
* @private
|
|
12555
|
+
*/
|
|
12556
|
+
function mergeCallAdapterStateIntoMeetingAdapterState(meetingAdapterState, callAdapterState) {
|
|
12557
|
+
const newMeetingState = callAdapterState.call
|
|
12558
|
+
? mergeCallStateIntoMeetingState(meetingAdapterState.meeting, callAdapterState.call)
|
|
12559
|
+
: undefined;
|
|
12560
|
+
return {
|
|
12561
|
+
userId: callAdapterState.userId,
|
|
12562
|
+
page: callPageToMeetingPage(callAdapterState.page),
|
|
12563
|
+
displayName: callAdapterState.displayName,
|
|
12564
|
+
devices: callAdapterState.devices,
|
|
12565
|
+
meeting: newMeetingState,
|
|
12566
|
+
isLocalPreviewMicrophoneEnabled: callAdapterState.isLocalPreviewMicrophoneEnabled,
|
|
12567
|
+
isTeamsCall: callAdapterState.isTeamsCall
|
|
12568
|
+
};
|
|
12569
|
+
}
|
|
12570
|
+
|
|
12571
|
+
// Copyright (c) Microsoft Corporation.
|
|
12572
|
+
// Licensed under the MIT license.
|
|
12573
|
+
var __awaiter = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
12574
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
12575
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
12576
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
12577
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
12578
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
12579
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
12580
|
+
});
|
|
12581
|
+
};
|
|
12582
|
+
/** Context of meeting, which is a centralized context for all state updates */
|
|
12583
|
+
class MeetingContext {
|
|
12584
|
+
constructor(clientState) {
|
|
12585
|
+
this.emitter = new EventEmitter.EventEmitter();
|
|
12586
|
+
this.state = clientState;
|
|
12587
|
+
}
|
|
12588
|
+
onStateChange(handler) {
|
|
12589
|
+
this.emitter.on('stateChanged', handler);
|
|
12590
|
+
}
|
|
12591
|
+
offStateChange(handler) {
|
|
12592
|
+
this.emitter.off('stateChanged', handler);
|
|
12593
|
+
}
|
|
12594
|
+
setState(state) {
|
|
12595
|
+
this.state = state;
|
|
12596
|
+
this.emitter.emit('stateChanged', this.state);
|
|
12597
|
+
}
|
|
12598
|
+
getState() {
|
|
12599
|
+
return this.state;
|
|
12600
|
+
}
|
|
12601
|
+
updateClientState(clientState) {
|
|
12602
|
+
this.setState(clientState);
|
|
12603
|
+
}
|
|
12604
|
+
updateClientStateWithChatState(chatAdapterState) {
|
|
12605
|
+
this.updateClientState(mergeChatAdapterStateIntoMeetingAdapterState(this.state, chatAdapterState));
|
|
12606
|
+
}
|
|
12607
|
+
updateClientStateWithCallState(callAdapterState) {
|
|
12608
|
+
this.updateClientState(mergeCallAdapterStateIntoMeetingAdapterState(this.state, callAdapterState));
|
|
12609
|
+
}
|
|
12610
|
+
}
|
|
12611
|
+
/**
|
|
12612
|
+
* Meeting adapter backed by Azure Communication Services.
|
|
12613
|
+
* Created for easy use with the Meeting Composite.
|
|
12614
|
+
*/
|
|
12615
|
+
class AzureCommunicationMeetingAdapter {
|
|
12616
|
+
constructor(callAdapter, chatAdapter) {
|
|
12617
|
+
this.bindPublicMethods();
|
|
12618
|
+
this.callAdapter = callAdapter;
|
|
12619
|
+
this.chatAdapter = chatAdapter;
|
|
12620
|
+
this.context = new MeetingContext(meetingAdapterStateFromBackingStates(callAdapter, chatAdapter));
|
|
12621
|
+
const onChatStateChange = (newChatAdapterState) => {
|
|
12622
|
+
this.context.updateClientStateWithChatState(newChatAdapterState);
|
|
12623
|
+
};
|
|
12624
|
+
this.chatAdapter.onStateChange(onChatStateChange);
|
|
12625
|
+
this.onChatStateChange = onChatStateChange;
|
|
12626
|
+
const onCallStateChange = (newCallAdapterState) => {
|
|
12627
|
+
this.context.updateClientStateWithCallState(newCallAdapterState);
|
|
12628
|
+
};
|
|
12629
|
+
this.callAdapter.onStateChange(onCallStateChange);
|
|
12630
|
+
this.onCallStateChange = onCallStateChange;
|
|
12631
|
+
}
|
|
12632
|
+
bindPublicMethods() {
|
|
12633
|
+
this.joinMeeting.bind(this);
|
|
12634
|
+
this.leaveMeeting.bind(this);
|
|
12635
|
+
this.startMeeting.bind(this);
|
|
12636
|
+
this.onStateChange.bind(this);
|
|
12637
|
+
this.offStateChange.bind(this);
|
|
12638
|
+
this.getState.bind(this);
|
|
12639
|
+
this.dispose.bind(this);
|
|
12640
|
+
this.setCamera.bind(this);
|
|
12641
|
+
this.setMicrophone.bind(this);
|
|
12642
|
+
this.setSpeaker.bind(this);
|
|
12643
|
+
this.askDevicePermission.bind(this);
|
|
12644
|
+
this.queryCameras.bind(this);
|
|
12645
|
+
this.queryMicrophones.bind(this);
|
|
12646
|
+
this.querySpeakers.bind(this);
|
|
12647
|
+
this.startCamera.bind(this);
|
|
12648
|
+
this.stopCamera.bind(this);
|
|
12649
|
+
this.mute.bind(this);
|
|
12650
|
+
this.unmute.bind(this);
|
|
12651
|
+
this.startScreenShare.bind(this);
|
|
12652
|
+
this.stopScreenShare.bind(this);
|
|
12653
|
+
this.removeParticipant.bind(this);
|
|
12654
|
+
this.createStreamView.bind(this);
|
|
12655
|
+
this.disposeStreamView.bind(this);
|
|
12656
|
+
this.fetchInitialData.bind(this);
|
|
12657
|
+
this.sendMessage.bind(this);
|
|
12658
|
+
this.sendReadReceipt.bind(this);
|
|
12659
|
+
this.sendTypingIndicator.bind(this);
|
|
12660
|
+
this.loadPreviousChatMessages.bind(this);
|
|
12661
|
+
this.updateMessage.bind(this);
|
|
12662
|
+
this.deleteMessage.bind(this);
|
|
12663
|
+
this.on.bind(this);
|
|
12664
|
+
this.off.bind(this);
|
|
12665
|
+
}
|
|
12666
|
+
/** Join existing Meeting. */
|
|
12667
|
+
joinMeeting(microphoneOn) {
|
|
12668
|
+
return this.callAdapter.joinCall(microphoneOn);
|
|
12669
|
+
}
|
|
12670
|
+
/** Leave current Meeting. */
|
|
12671
|
+
leaveMeeting() {
|
|
12672
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
12673
|
+
yield this.chatAdapter.removeParticipant(toFlatCommunicationIdentifier(this.chatAdapter.getState().userId));
|
|
12674
|
+
yield this.callAdapter.leaveCall();
|
|
12675
|
+
});
|
|
12676
|
+
}
|
|
12677
|
+
/** Start a new Meeting. */
|
|
12678
|
+
startMeeting(participants) {
|
|
12679
|
+
return this.callAdapter.startCall(participants);
|
|
12680
|
+
}
|
|
12681
|
+
/**
|
|
12682
|
+
* Subscribe to state change events.
|
|
12683
|
+
* @param handler - handler to be called when the state changes. This is passed the new state.
|
|
12684
|
+
*/
|
|
12685
|
+
onStateChange(handler) {
|
|
12686
|
+
this.context.onStateChange(handler);
|
|
12687
|
+
}
|
|
12688
|
+
/**
|
|
12689
|
+
* Unsubscribe to state change events.
|
|
12690
|
+
* @param handler - handler to be no longer called when state changes.
|
|
12691
|
+
*/
|
|
12692
|
+
offStateChange(handler) {
|
|
12693
|
+
this.context.offStateChange(handler);
|
|
12694
|
+
}
|
|
12695
|
+
/** Get current Meeting state. */
|
|
12696
|
+
getState() {
|
|
12697
|
+
return this.context.getState();
|
|
12698
|
+
}
|
|
12699
|
+
/** Dispose of the current Meeting Adapter. */
|
|
12700
|
+
dispose() {
|
|
12701
|
+
this.chatAdapter.offStateChange(this.onChatStateChange);
|
|
12702
|
+
this.callAdapter.offStateChange(this.onCallStateChange);
|
|
12703
|
+
this.chatAdapter.dispose();
|
|
12704
|
+
this.callAdapter.dispose();
|
|
12705
|
+
}
|
|
12706
|
+
/** Remove a participant from the Meeting. */
|
|
12707
|
+
removeParticipant(userId) {
|
|
12708
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
12709
|
+
yield this.chatAdapter.removeParticipant(userId);
|
|
12710
|
+
yield this.callAdapter.removeParticipant(userId);
|
|
12711
|
+
});
|
|
12712
|
+
}
|
|
12713
|
+
setCamera(device, options) {
|
|
12714
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
12715
|
+
yield this.callAdapter.setCamera(device, options);
|
|
12716
|
+
});
|
|
12717
|
+
}
|
|
12718
|
+
/** Set the microphone to be used in the meeting. */
|
|
12719
|
+
setMicrophone(device) {
|
|
12720
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
12721
|
+
yield this.callAdapter.setMicrophone(device);
|
|
12722
|
+
});
|
|
12723
|
+
}
|
|
12724
|
+
/** Set the speaker to be used in the meeting. */
|
|
12725
|
+
setSpeaker(device) {
|
|
12726
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
12727
|
+
yield this.callAdapter.setSpeaker(device);
|
|
12728
|
+
});
|
|
12729
|
+
}
|
|
12730
|
+
askDevicePermission(constraints) {
|
|
12731
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
12732
|
+
yield this.callAdapter.askDevicePermission(constraints);
|
|
12733
|
+
});
|
|
12734
|
+
}
|
|
12735
|
+
/** Query for available cameras. */
|
|
12736
|
+
queryCameras() {
|
|
12737
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
12738
|
+
return yield this.callAdapter.queryCameras();
|
|
12739
|
+
});
|
|
12740
|
+
}
|
|
12741
|
+
/** Query for available microphones. */
|
|
12742
|
+
queryMicrophones() {
|
|
12743
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
12744
|
+
return yield this.callAdapter.queryMicrophones();
|
|
12745
|
+
});
|
|
12746
|
+
}
|
|
12747
|
+
/** Query for available speakers. */
|
|
12748
|
+
querySpeakers() {
|
|
12749
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
12750
|
+
return yield this.callAdapter.querySpeakers();
|
|
12751
|
+
});
|
|
12752
|
+
}
|
|
12753
|
+
/** Start the camera for the user in the Meeting. */
|
|
12754
|
+
startCamera(options) {
|
|
12755
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
12756
|
+
yield this.callAdapter.startCamera(options);
|
|
12757
|
+
});
|
|
12758
|
+
}
|
|
12759
|
+
/** Stop the camera for the user in the Meeting. */
|
|
12760
|
+
stopCamera() {
|
|
12761
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
12762
|
+
yield this.callAdapter.stopCamera();
|
|
12763
|
+
});
|
|
12764
|
+
}
|
|
12765
|
+
/** Mute the user in the Meeting. */
|
|
12766
|
+
mute() {
|
|
12767
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
12768
|
+
yield this.callAdapter.mute();
|
|
12769
|
+
});
|
|
12770
|
+
}
|
|
12771
|
+
/** Unmute the user in the Meeting. */
|
|
12772
|
+
unmute() {
|
|
12773
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
12774
|
+
yield this.callAdapter.unmute();
|
|
12775
|
+
});
|
|
12776
|
+
}
|
|
12777
|
+
/** Trigger the user to start screen share. */
|
|
12778
|
+
startScreenShare() {
|
|
12779
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
12780
|
+
yield this.callAdapter.startScreenShare();
|
|
12781
|
+
});
|
|
12782
|
+
}
|
|
12783
|
+
/** Stop the current active screen share. */
|
|
12784
|
+
stopScreenShare() {
|
|
12785
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
12786
|
+
yield this.callAdapter.stopScreenShare();
|
|
12787
|
+
});
|
|
12788
|
+
}
|
|
12789
|
+
/** Create a stream view for a remote participants video feed. */
|
|
12790
|
+
createStreamView(remoteUserId, options) {
|
|
12791
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
12792
|
+
yield this.callAdapter.createStreamView(remoteUserId, options);
|
|
12793
|
+
});
|
|
12794
|
+
}
|
|
12795
|
+
/** Dispose of a created stream view of a remote participants video feed. */
|
|
12796
|
+
disposeStreamView(remoteUserId, options) {
|
|
12797
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
12798
|
+
yield this.callAdapter.disposeStreamView(remoteUserId, options);
|
|
12799
|
+
});
|
|
12800
|
+
}
|
|
12801
|
+
/** Fetch initial Meeting data such as chat messages. */
|
|
12802
|
+
fetchInitialData() {
|
|
12803
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
12804
|
+
yield this.chatAdapter.fetchInitialData();
|
|
12805
|
+
});
|
|
12806
|
+
}
|
|
12807
|
+
/** Send a chat message. */
|
|
12808
|
+
sendMessage(content) {
|
|
12809
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
12810
|
+
yield this.chatAdapter.sendMessage(content);
|
|
12811
|
+
});
|
|
12812
|
+
}
|
|
12813
|
+
/** Send a chat read receipt. */
|
|
12814
|
+
sendReadReceipt(chatMessageId) {
|
|
12815
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
12816
|
+
yield this.chatAdapter.sendReadReceipt(chatMessageId);
|
|
12817
|
+
});
|
|
12818
|
+
}
|
|
12819
|
+
/** Send an isTyping indicator. */
|
|
12820
|
+
sendTypingIndicator() {
|
|
12821
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
12822
|
+
yield this.chatAdapter.sendTypingIndicator();
|
|
12823
|
+
});
|
|
12824
|
+
}
|
|
12825
|
+
/** Load previous Meeting chat messages. */
|
|
12826
|
+
loadPreviousChatMessages(messagesToLoad) {
|
|
12827
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
12828
|
+
return yield this.chatAdapter.loadPreviousChatMessages(messagesToLoad);
|
|
12829
|
+
});
|
|
12830
|
+
}
|
|
12831
|
+
/** Update an existing message. */
|
|
12832
|
+
updateMessage(messageId, content) {
|
|
12833
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
12834
|
+
return yield this.chatAdapter.updateMessage(messageId, content);
|
|
12835
|
+
});
|
|
12836
|
+
}
|
|
12837
|
+
/** Delete an existing message. */
|
|
12838
|
+
deleteMessage(messageId) {
|
|
12839
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
12840
|
+
return yield this.chatAdapter.deleteMessage(messageId);
|
|
12841
|
+
});
|
|
12842
|
+
}
|
|
12843
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
12844
|
+
on(event, listener) {
|
|
12845
|
+
switch (event) {
|
|
12846
|
+
case 'participantsJoined':
|
|
12847
|
+
this.callAdapter.on(event, listener);
|
|
12848
|
+
break;
|
|
12849
|
+
case 'participantsLeft':
|
|
12850
|
+
this.callAdapter.on('participantsLeft', listener);
|
|
12851
|
+
break;
|
|
12852
|
+
case 'meetingEnded':
|
|
12853
|
+
this.callAdapter.on('callEnded', listener);
|
|
12854
|
+
break;
|
|
12855
|
+
case 'isMutedChanged':
|
|
12856
|
+
this.callAdapter.on('isMutedChanged', listener);
|
|
12857
|
+
break;
|
|
12858
|
+
case 'callIdChanged':
|
|
12859
|
+
this.callAdapter.on('callIdChanged', listener);
|
|
12860
|
+
break;
|
|
12861
|
+
case 'isLocalScreenSharingActiveChanged':
|
|
12862
|
+
this.callAdapter.on('isLocalScreenSharingActiveChanged', listener);
|
|
12863
|
+
break;
|
|
12864
|
+
case 'displayNameChanged':
|
|
12865
|
+
this.callAdapter.on('displayNameChanged', listener);
|
|
12866
|
+
break;
|
|
12867
|
+
case 'isSpeakingChanged':
|
|
12868
|
+
this.callAdapter.on('isSpeakingChanged', listener);
|
|
12869
|
+
break;
|
|
12870
|
+
case 'messageReceived':
|
|
12871
|
+
this.chatAdapter.on('messageReceived', listener);
|
|
12872
|
+
break;
|
|
12873
|
+
case 'messageSent':
|
|
12874
|
+
this.chatAdapter.on('messageSent', listener);
|
|
12875
|
+
break;
|
|
12876
|
+
case 'messageRead':
|
|
12877
|
+
this.chatAdapter.on('messageRead', listener);
|
|
12878
|
+
break;
|
|
12879
|
+
case 'error':
|
|
12880
|
+
throw 'on(Error) not implemented yet.';
|
|
12881
|
+
default:
|
|
12882
|
+
throw `Unknown MeetingEvent: ${event}`;
|
|
12883
|
+
}
|
|
12884
|
+
}
|
|
12885
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
12886
|
+
off(event, listener) {
|
|
12887
|
+
switch (event) {
|
|
12888
|
+
case 'participantsJoined':
|
|
12889
|
+
this.callAdapter.off(event, listener);
|
|
12890
|
+
break;
|
|
12891
|
+
case 'participantsLeft':
|
|
12892
|
+
this.callAdapter.off('participantsLeft', listener);
|
|
12893
|
+
break;
|
|
12894
|
+
case 'meetingEnded':
|
|
12895
|
+
this.callAdapter.off('callEnded', listener);
|
|
12896
|
+
break;
|
|
12897
|
+
case 'isMutedChanged':
|
|
12898
|
+
this.callAdapter.off('isMutedChanged', listener);
|
|
12899
|
+
break;
|
|
12900
|
+
case 'callIdChanged':
|
|
12901
|
+
this.callAdapter.off('callIdChanged', listener);
|
|
12902
|
+
break;
|
|
12903
|
+
case 'isLocalScreenSharingActiveChanged':
|
|
12904
|
+
this.callAdapter.off('isLocalScreenSharingActiveChanged', listener);
|
|
12905
|
+
break;
|
|
12906
|
+
case 'displayNameChanged':
|
|
12907
|
+
this.callAdapter.off('displayNameChanged', listener);
|
|
12908
|
+
break;
|
|
12909
|
+
case 'isSpeakingChanged':
|
|
12910
|
+
this.callAdapter.off('isSpeakingChanged', listener);
|
|
12911
|
+
break;
|
|
12912
|
+
case 'messageReceived':
|
|
12913
|
+
this.chatAdapter.off('messageReceived', listener);
|
|
12914
|
+
break;
|
|
12915
|
+
case 'messageSent':
|
|
12916
|
+
this.chatAdapter.off('messageSent', listener);
|
|
12917
|
+
break;
|
|
12918
|
+
case 'messageRead':
|
|
12919
|
+
this.chatAdapter.off('messageRead', listener);
|
|
12920
|
+
break;
|
|
12921
|
+
case 'error':
|
|
12922
|
+
throw 'on(Error) not implemented yet.';
|
|
12923
|
+
default:
|
|
12924
|
+
throw `Unknown MeetingEvent: ${event}`;
|
|
12925
|
+
}
|
|
12926
|
+
}
|
|
12927
|
+
}
|
|
12928
|
+
/**
|
|
12929
|
+
* Create a meeting adapter backed by Azure Communication services
|
|
12930
|
+
* to plug into the Meeting Composite.
|
|
12931
|
+
*
|
|
12932
|
+
* @beta
|
|
12933
|
+
*/
|
|
12934
|
+
const createAzureCommunicationMeetingAdapter = ({ userId, displayName, credential, endpoint, chatThreadId, callLocator }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
12935
|
+
const callAdapter = yield createAzureCommunicationCallAdapter({
|
|
12936
|
+
userId,
|
|
12937
|
+
displayName,
|
|
12938
|
+
credential,
|
|
12939
|
+
locator: callLocator
|
|
12940
|
+
});
|
|
12941
|
+
const chatAdapter = yield createAzureCommunicationChatAdapter({
|
|
12942
|
+
endpoint,
|
|
12943
|
+
userId,
|
|
12944
|
+
displayName,
|
|
12945
|
+
credential,
|
|
12946
|
+
threadId: chatThreadId
|
|
12947
|
+
});
|
|
12948
|
+
return new AzureCommunicationMeetingAdapter(callAdapter, chatAdapter);
|
|
12949
|
+
});
|
|
12950
|
+
|
|
11935
12951
|
// Copyright (c) Microsoft Corporation.
|
|
11936
12952
|
/**
|
|
11937
12953
|
* Hook to obtain a selector for a specified component.
|
|
@@ -12038,6 +13054,7 @@ exports.ErrorBar = ErrorBar;
|
|
|
12038
13054
|
exports.FluentThemeProvider = FluentThemeProvider;
|
|
12039
13055
|
exports.GridLayout = GridLayout;
|
|
12040
13056
|
exports.LocalizationProvider = LocalizationProvider$1;
|
|
13057
|
+
exports.MeetingComposite = MeetingComposite;
|
|
12041
13058
|
exports.MessageStatusIndicator = MessageStatusIndicator;
|
|
12042
13059
|
exports.MessageThread = MessageThread;
|
|
12043
13060
|
exports.MicrophoneButton = MicrophoneButton;
|
|
@@ -12055,6 +13072,7 @@ exports.createAzureCommunicationCallAdapter = createAzureCommunicationCallAdapte
|
|
|
12055
13072
|
exports.createAzureCommunicationCallAdapterFromClient = createAzureCommunicationCallAdapterFromClient;
|
|
12056
13073
|
exports.createAzureCommunicationChatAdapter = createAzureCommunicationChatAdapter;
|
|
12057
13074
|
exports.createAzureCommunicationChatAdapterFromClient = createAzureCommunicationChatAdapterFromClient;
|
|
13075
|
+
exports.createAzureCommunicationMeetingAdapter = createAzureCommunicationMeetingAdapter;
|
|
12058
13076
|
exports.createDefaultCallingHandlers = createDefaultCallingHandlers;
|
|
12059
13077
|
exports.createDefaultChatHandlers = createDefaultChatHandlers;
|
|
12060
13078
|
exports.createStatefulCallClient = createStatefulCallClient;
|