@azure/communication-react 1.5.1-alpha-202302220019 → 1.5.1-beta.1
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/CHANGELOG.beta.md +86 -1
- package/CHANGELOG.json +686 -0
- package/dist/communication-react.d.ts +1 -32
- package/dist/dist-cjs/communication-react/index.js +173 -374
- package/dist/dist-cjs/communication-react/index.js.map +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallClientState.d.ts +1 -22
- package/dist/dist-esm/calling-stateful-client/src/CallClientState.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallContext.d.ts +0 -14
- package/dist/dist-esm/calling-stateful-client/src/CallContext.js +0 -44
- package/dist/dist-esm/calling-stateful-client/src/CallContext.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.d.ts +0 -1
- package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js +0 -21
- package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/Converter.js +0 -1
- package/dist/dist-esm/calling-stateful-client/src/Converter.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/DeviceManagerDeclarative.d.ts +1 -13
- package/dist/dist-esm/calling-stateful-client/src/DeviceManagerDeclarative.js +1 -8
- package/dist/dist-esm/calling-stateful-client/src/DeviceManagerDeclarative.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/InternalCallContext.d.ts +0 -4
- package/dist/dist-esm/calling-stateful-client/src/InternalCallContext.js +0 -28
- package/dist/dist-esm/calling-stateful-client/src/InternalCallContext.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.js +1 -1
- package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/StreamUtils.js +30 -50
- package/dist/dist-esm/calling-stateful-client/src/StreamUtils.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/index-public.d.ts +0 -1
- package/dist/dist-esm/calling-stateful-client/src/index-public.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ControlBarButton.js +1 -1
- package/dist/dist-esm/react-components/src/components/ControlBarButton.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js +1 -1
- package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideoLayout.js +3 -3
- package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideoLayout.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery.js +0 -13
- package/dist/dist-esm/react-components/src/components/VideoGallery.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoTile.js +12 -9
- package/dist/dist-esm/react-components/src/components/VideoTile.js.map +1 -1
- package/dist/dist-esm/react-components/src/localization/locales/de-DE/strings.json +103 -9
- package/dist/dist-esm/react-components/src/localization/locales/en-GB/strings.json +102 -8
- package/dist/dist-esm/react-components/src/localization/locales/es-ES/strings.json +102 -8
- package/dist/dist-esm/react-components/src/localization/locales/fr-FR/strings.json +103 -9
- package/dist/dist-esm/react-components/src/localization/locales/it-IT/strings.json +102 -8
- package/dist/dist-esm/react-components/src/localization/locales/ja-JP/strings.json +102 -8
- package/dist/dist-esm/react-components/src/localization/locales/ko-KR/strings.json +102 -8
- package/dist/dist-esm/react-components/src/localization/locales/nl-NL/strings.json +102 -8
- package/dist/dist-esm/react-components/src/localization/locales/pt-BR/strings.json +103 -9
- package/dist/dist-esm/react-components/src/localization/locales/ru-RU/strings.json +102 -8
- package/dist/dist-esm/react-components/src/localization/locales/tr-TR/strings.json +103 -9
- package/dist/dist-esm/react-components/src/localization/locales/zh-CN/strings.json +102 -8
- package/dist/dist-esm/react-components/src/localization/locales/zh-TW/strings.json +102 -8
- package/dist/dist-esm/react-components/src/theming/icons.js +6 -6
- package/dist/dist-esm/react-components/src/theming/icons.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/NetworkReconnectTile.js +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/NetworkReconnectTile.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Custom.d.ts +5 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Custom.js +31 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Custom.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/MediaGalleryUtils.d.ts +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/MediaGalleryUtils.js +3 -3
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/MediaGalleryUtils.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatControlBar.js +6 -8
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatControlBar.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CustomButton.d.ts +3 -16
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CustomButton.js +43 -49
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CustomButton.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/components/DesktopMoreButton.d.ts +0 -2
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/components/DesktopMoreButton.js +26 -47
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/components/DesktopMoreButton.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/components/MoreDrawer.js +4 -4
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/components/MoreDrawer.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/icons.js +4 -4
- package/dist/dist-esm/react-composites/src/composites/common/icons.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/de-DE/strings.json +17 -3
- package/dist/dist-esm/react-composites/src/composites/localization/locales/en-GB/strings.json +17 -3
- package/dist/dist-esm/react-composites/src/composites/localization/locales/es-ES/strings.json +17 -3
- package/dist/dist-esm/react-composites/src/composites/localization/locales/fr-FR/strings.json +17 -3
- package/dist/dist-esm/react-composites/src/composites/localization/locales/it-IT/strings.json +17 -3
- package/dist/dist-esm/react-composites/src/composites/localization/locales/ja-JP/strings.json +17 -3
- package/dist/dist-esm/react-composites/src/composites/localization/locales/ko-KR/strings.json +17 -3
- package/dist/dist-esm/react-composites/src/composites/localization/locales/nl-NL/strings.json +17 -3
- package/dist/dist-esm/react-composites/src/composites/localization/locales/pt-BR/strings.json +17 -3
- package/dist/dist-esm/react-composites/src/composites/localization/locales/ru-RU/strings.json +17 -3
- package/dist/dist-esm/react-composites/src/composites/localization/locales/tr-TR/strings.json +17 -3
- package/dist/dist-esm/react-composites/src/composites/localization/locales/zh-CN/strings.json +17 -3
- package/dist/dist-esm/react-composites/src/composites/localization/locales/zh-TW/strings.json +17 -3
- package/package.json +12 -12
- package/dist/dist-esm/calling-stateful-client/src/LocalVideoStreamVideoEffectsSubscriber.d.ts +0 -29
- package/dist/dist-esm/calling-stateful-client/src/LocalVideoStreamVideoEffectsSubscriber.js +0 -54
- package/dist/dist-esm/calling-stateful-client/src/LocalVideoStreamVideoEffectsSubscriber.js.map +0 -1
@@ -17,7 +17,6 @@ function createViewRemoteVideo(context, internalContext, callId, participantId,
|
|
17
17
|
return __awaiter(this, void 0, void 0, function* () {
|
18
18
|
// Render RemoteVideoStream that is part of a Call
|
19
19
|
const streamId = stream.id;
|
20
|
-
const streamType = stream.mediaStreamType;
|
21
20
|
let participantKey;
|
22
21
|
if (typeof participantId === 'string') {
|
23
22
|
participantKey = participantId;
|
@@ -25,7 +24,7 @@ function createViewRemoteVideo(context, internalContext, callId, participantId,
|
|
25
24
|
else {
|
26
25
|
participantKey = toFlatCommunicationIdentifier(participantId);
|
27
26
|
}
|
28
|
-
const streamLogInfo = { callId, participantKey, streamId
|
27
|
+
const streamLogInfo = { callId, participantKey, streamId };
|
29
28
|
_logEvent(callingStatefulLogger, {
|
30
29
|
name: EventNames.CREATING_REMOTE_VIEW,
|
31
30
|
level: 'info',
|
@@ -70,8 +69,7 @@ function createViewRemoteVideo(context, internalContext, callId, participantId,
|
|
70
69
|
_logEvent(callingStatefulLogger, {
|
71
70
|
name: EventNames.REMOTE_STREAM_STOPPING,
|
72
71
|
level: 'warning',
|
73
|
-
message: 'RemoteVideoStream was marked as stopping by dispose view. Resetting state to "Rendering".'
|
74
|
-
data: streamLogInfo
|
72
|
+
message: 'RemoteVideoStream was marked as stopping by dispose view. Resetting state to "Rendering".'
|
75
73
|
});
|
76
74
|
internalContext.setRemoteRenderInfo(callId, participantKey, streamId, renderInfo.stream, 'Rendering', renderInfo.renderer);
|
77
75
|
return;
|
@@ -142,22 +140,18 @@ function createViewRemoteVideo(context, internalContext, callId, participantId,
|
|
142
140
|
}
|
143
141
|
function createViewLocalVideo(context, internalContext, callId, options) {
|
144
142
|
return __awaiter(this, void 0, void 0, function* () {
|
145
|
-
// Render LocalVideoStream that is part of a Call
|
146
|
-
const renderInfo = internalContext.getLocalRenderInfo(callId);
|
147
|
-
const streamType = renderInfo === null || renderInfo === void 0 ? void 0 : renderInfo.stream.mediaStreamType;
|
148
|
-
const streamLogInfo = { callId, streamType };
|
149
143
|
_logEvent(callingStatefulLogger, {
|
150
144
|
name: EventNames.START_LOCAL_STREAM_RENDERING,
|
151
145
|
level: 'info',
|
152
|
-
message: 'Start creating view for local video.'
|
153
|
-
data: streamLogInfo
|
146
|
+
message: 'Start creating view for local video.'
|
154
147
|
});
|
148
|
+
// Render LocalVideoStream that is part of a Call
|
149
|
+
const renderInfo = internalContext.getLocalRenderInfo(callId);
|
155
150
|
if (!renderInfo) {
|
156
151
|
_logEvent(callingStatefulLogger, {
|
157
152
|
name: EventNames.LOCAL_STREAM_NOT_FOUND,
|
158
153
|
level: 'error',
|
159
|
-
message: 'LocalVideoStream not found in state.'
|
160
|
-
data: { callId }
|
154
|
+
message: 'LocalVideoStream not found in state.'
|
161
155
|
});
|
162
156
|
console.warn('LocalVideoStream not found in state');
|
163
157
|
return;
|
@@ -166,8 +160,7 @@ function createViewLocalVideo(context, internalContext, callId, options) {
|
|
166
160
|
_logEvent(callingStatefulLogger, {
|
167
161
|
name: EventNames.LOCAL_STREAM_ALREADY_RENDERED,
|
168
162
|
level: 'warning',
|
169
|
-
message: 'LocalVideoStream is already rendered.'
|
170
|
-
data: streamLogInfo
|
163
|
+
message: 'LocalVideoStream is already rendered.'
|
171
164
|
});
|
172
165
|
console.warn('LocalVideoStream is already rendered');
|
173
166
|
return;
|
@@ -178,8 +171,7 @@ function createViewLocalVideo(context, internalContext, callId, options) {
|
|
178
171
|
_logEvent(callingStatefulLogger, {
|
179
172
|
name: EventNames.LOCAL_STREAM_RENDERING,
|
180
173
|
level: 'warning',
|
181
|
-
message: 'LocalVideoStream is rendering.'
|
182
|
-
data: streamLogInfo
|
174
|
+
message: 'LocalVideoStream is rendering.'
|
183
175
|
});
|
184
176
|
return;
|
185
177
|
}
|
@@ -189,8 +181,7 @@ function createViewLocalVideo(context, internalContext, callId, options) {
|
|
189
181
|
_logEvent(callingStatefulLogger, {
|
190
182
|
name: EventNames.LOCAL_STREAM_STOPPING,
|
191
183
|
level: 'warning',
|
192
|
-
message: 'LocalVideoStream was marked as stopping by dispose view. Resetting state to "Rendering".'
|
193
|
-
data: streamLogInfo
|
184
|
+
message: 'LocalVideoStream was marked as stopping by dispose view. Resetting state to "Rendering".'
|
194
185
|
});
|
195
186
|
internalContext.setLocalRenderInfo(callId, renderInfo.stream, 'Rendering', renderInfo.renderer);
|
196
187
|
return;
|
@@ -207,9 +198,7 @@ function createViewLocalVideo(context, internalContext, callId, options) {
|
|
207
198
|
level: 'error',
|
208
199
|
message: 'Failed to create view.',
|
209
200
|
data: {
|
210
|
-
error: e
|
211
|
-
streamType,
|
212
|
-
callId
|
201
|
+
error: e
|
213
202
|
}
|
214
203
|
});
|
215
204
|
internalContext.setLocalRenderInfo(callId, renderInfo.stream, 'NotRendered', undefined);
|
@@ -225,7 +214,9 @@ function createViewLocalVideo(context, internalContext, callId, options) {
|
|
225
214
|
name: EventNames.LOCAL_RENDER_INFO_NOT_FOUND,
|
226
215
|
level: 'error',
|
227
216
|
message: 'Cannot find local render info after create the view. ',
|
228
|
-
data:
|
217
|
+
data: {
|
218
|
+
callId
|
219
|
+
}
|
229
220
|
});
|
230
221
|
renderer.dispose();
|
231
222
|
context.setLocalVideoStreamRendererView(callId, undefined);
|
@@ -238,7 +229,9 @@ function createViewLocalVideo(context, internalContext, callId, options) {
|
|
238
229
|
name: EventNames.LOCAL_CREATED_STREAM_STOPPING,
|
239
230
|
level: 'warning',
|
240
231
|
message: 'Render info status is stopping, dispose renderer.',
|
241
|
-
data:
|
232
|
+
data: {
|
233
|
+
callId
|
234
|
+
}
|
242
235
|
});
|
243
236
|
renderer.dispose();
|
244
237
|
internalContext.setLocalRenderInfo(callId, refreshedRenderInfo.stream, 'NotRendered', undefined);
|
@@ -253,7 +246,9 @@ function createViewLocalVideo(context, internalContext, callId, options) {
|
|
253
246
|
name: EventNames.LOCAL_VIEW_RENDER_SUCCEED,
|
254
247
|
level: 'info',
|
255
248
|
message: `Successfully render the local view.`,
|
256
|
-
data:
|
249
|
+
data: {
|
250
|
+
callId
|
251
|
+
}
|
257
252
|
});
|
258
253
|
return {
|
259
254
|
renderer,
|
@@ -313,7 +308,6 @@ function createViewUnparentedVideo(context, internalContext, stream, options) {
|
|
313
308
|
// Else the stream still exists and status is not telling us to stop rendering. Complete the render process by
|
314
309
|
// updating the state.
|
315
310
|
internalContext.setUnparentedRenderInfo(stream, localVideoStream, 'Rendered', renderer);
|
316
|
-
internalContext.subscribeToUnparentedViewVideoEffects(localVideoStream, context);
|
317
311
|
context.setDeviceManagerUnparentedView(stream, convertFromSDKToDeclarativeVideoStreamRendererView(view));
|
318
312
|
return {
|
319
313
|
renderer,
|
@@ -323,7 +317,6 @@ function createViewUnparentedVideo(context, internalContext, stream, options) {
|
|
323
317
|
}
|
324
318
|
function disposeViewRemoteVideo(context, internalContext, callId, participantId, stream) {
|
325
319
|
const streamId = stream.id;
|
326
|
-
const streamType = stream.mediaStreamType;
|
327
320
|
let participantKey;
|
328
321
|
if (typeof participantId === 'string') {
|
329
322
|
participantKey = participantId;
|
@@ -331,7 +324,7 @@ function disposeViewRemoteVideo(context, internalContext, callId, participantId,
|
|
331
324
|
else {
|
332
325
|
participantKey = toFlatCommunicationIdentifier(participantId);
|
333
326
|
}
|
334
|
-
const streamLogInfo = { callId, participantKey, streamId
|
327
|
+
const streamLogInfo = { callId, participantKey, streamId };
|
335
328
|
_logEvent(callingStatefulLogger, {
|
336
329
|
name: EventNames.START_DISPOSE_REMOTE_STREAM,
|
337
330
|
level: 'info',
|
@@ -405,15 +398,14 @@ function disposeViewRemoteVideo(context, internalContext, callId, participantId,
|
|
405
398
|
}
|
406
399
|
}
|
407
400
|
function disposeViewLocalVideo(context, internalContext, callId) {
|
408
|
-
const
|
409
|
-
const streamType = renderInfo === null || renderInfo === void 0 ? void 0 : renderInfo.stream.mediaStreamType;
|
410
|
-
const streamLogInfo = { callId, streamType };
|
401
|
+
const streamLogInfo = { callId };
|
411
402
|
_logEvent(callingStatefulLogger, {
|
412
403
|
name: EventNames.START_DISPOSE_LOCAL_STREAM,
|
413
404
|
level: 'info',
|
414
405
|
message: 'Start disposing local stream.',
|
415
406
|
data: streamLogInfo
|
416
407
|
});
|
408
|
+
const renderInfo = internalContext.getLocalRenderInfo(callId);
|
417
409
|
if (!renderInfo) {
|
418
410
|
_logEvent(callingStatefulLogger, {
|
419
411
|
name: EventNames.LOCAL_DISPOSE_INFO_NOT_FOUND,
|
@@ -428,8 +420,7 @@ function disposeViewLocalVideo(context, internalContext, callId) {
|
|
428
420
|
_logEvent(callingStatefulLogger, {
|
429
421
|
name: EventNames.LOCAL_STREAM_ALREADY_DISPOSED,
|
430
422
|
level: 'info',
|
431
|
-
message: 'LocalVideoStream is already disposed.'
|
432
|
-
data: streamLogInfo
|
423
|
+
message: 'LocalVideoStream is already disposed.'
|
433
424
|
});
|
434
425
|
return;
|
435
426
|
}
|
@@ -481,13 +472,10 @@ function disposeViewLocalVideo(context, internalContext, callId) {
|
|
481
472
|
}
|
482
473
|
}
|
483
474
|
function disposeViewUnparentedVideo(context, internalContext, stream) {
|
484
|
-
const streamType = stream.mediaStreamType;
|
485
|
-
const streamLogInfo = { streamType };
|
486
475
|
_logEvent(callingStatefulLogger, {
|
487
476
|
name: EventNames.START_DISPOSE_LOCAL_STREAM,
|
488
477
|
level: 'info',
|
489
|
-
message: 'Start disposing unparented local stream.'
|
490
|
-
data: streamLogInfo
|
478
|
+
message: 'Start disposing unparented local stream.'
|
491
479
|
});
|
492
480
|
context.deleteDeviceManagerUnparentedView(stream);
|
493
481
|
const renderInfo = internalContext.getUnparentedRenderInfo(stream);
|
@@ -495,8 +483,7 @@ function disposeViewUnparentedVideo(context, internalContext, stream) {
|
|
495
483
|
_logEvent(callingStatefulLogger, {
|
496
484
|
name: EventNames.LOCAL_DISPOSE_INFO_NOT_FOUND,
|
497
485
|
level: 'error',
|
498
|
-
message: 'Cannot find render info when disposing unparented local stream.'
|
499
|
-
data: streamLogInfo
|
486
|
+
message: 'Cannot find render info when disposing unparented local stream.'
|
500
487
|
});
|
501
488
|
return;
|
502
489
|
}
|
@@ -504,8 +491,7 @@ function disposeViewUnparentedVideo(context, internalContext, stream) {
|
|
504
491
|
_logEvent(callingStatefulLogger, {
|
505
492
|
name: EventNames.LOCAL_STREAM_STOPPING,
|
506
493
|
level: 'info',
|
507
|
-
message: 'Unparented local stream is still rendering. Changing status to stopping.'
|
508
|
-
data: streamLogInfo
|
494
|
+
message: 'Unparented local stream is still rendering. Changing status to stopping.'
|
509
495
|
});
|
510
496
|
internalContext.setUnparentedRenderInfo(stream, renderInfo.stream, 'Stopping', undefined);
|
511
497
|
}
|
@@ -516,8 +502,7 @@ function disposeViewUnparentedVideo(context, internalContext, stream) {
|
|
516
502
|
_logEvent(callingStatefulLogger, {
|
517
503
|
name: EventNames.DISPOSING_LOCAL_RENDERER,
|
518
504
|
level: 'info',
|
519
|
-
message: 'Disposing unparented local view renderer.'
|
520
|
-
data: streamLogInfo
|
505
|
+
message: 'Disposing unparented local view renderer.'
|
521
506
|
});
|
522
507
|
renderInfo.renderer.dispose();
|
523
508
|
}
|
@@ -525,8 +510,7 @@ function disposeViewUnparentedVideo(context, internalContext, stream) {
|
|
525
510
|
_logEvent(callingStatefulLogger, {
|
526
511
|
name: EventNames.LOCAL_RENDERER_NOT_FOUND,
|
527
512
|
level: 'error',
|
528
|
-
message: 'Cannot find renderer when disposing unparented local stream.'
|
529
|
-
data: streamLogInfo
|
513
|
+
message: 'Cannot find renderer when disposing unparented local stream.'
|
530
514
|
});
|
531
515
|
}
|
532
516
|
}
|
@@ -534,7 +518,6 @@ function disposeViewUnparentedVideo(context, internalContext, stream) {
|
|
534
518
|
* @private
|
535
519
|
*/
|
536
520
|
export function createView(context, internalContext, callId, participantId, stream, options) {
|
537
|
-
const streamType = stream.mediaStreamType;
|
538
521
|
if ('id' in stream && callId && participantId) {
|
539
522
|
// Render RemoteVideoStream that is part of a Call
|
540
523
|
return createViewRemoteVideo(context, internalContext, callId, participantId, stream, options);
|
@@ -553,8 +536,7 @@ export function createView(context, internalContext, callId, participantId, stre
|
|
553
536
|
_logEvent(callingStatefulLogger, {
|
554
537
|
name: EventNames.CREATE_STREAM_INVALID_PARAMS,
|
555
538
|
level: 'warning',
|
556
|
-
message: 'Create View invalid combination of parameters.'
|
557
|
-
data: { streamType }
|
539
|
+
message: 'Create View invalid combination of parameters.'
|
558
540
|
});
|
559
541
|
return Promise.resolve(undefined);
|
560
542
|
}
|
@@ -563,7 +545,6 @@ export function createView(context, internalContext, callId, participantId, stre
|
|
563
545
|
* @private
|
564
546
|
*/
|
565
547
|
export function disposeView(context, internalContext, callId, participantId, stream) {
|
566
|
-
const streamType = stream.mediaStreamType;
|
567
548
|
if ('id' in stream && callId && participantId) {
|
568
549
|
// Stop rendering RemoteVideoStream that is part of a Call
|
569
550
|
disposeViewRemoteVideo(context, internalContext, callId, participantId, stream);
|
@@ -582,8 +563,7 @@ export function disposeView(context, internalContext, callId, participantId, str
|
|
582
563
|
_logEvent(callingStatefulLogger, {
|
583
564
|
name: EventNames.DISPOSE_STREAM_INVALID_PARAMS,
|
584
565
|
level: 'warning',
|
585
|
-
message: 'Dispose View invalid combination of parameters.'
|
586
|
-
data: { streamType }
|
566
|
+
message: 'Dispose View invalid combination of parameters.'
|
587
567
|
});
|
588
568
|
return;
|
589
569
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"StreamUtils.js","sourceRoot":"","sources":["../../../../../calling-stateful-client/src/StreamUtils.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAElC,OAAO,EAEL,gBAAgB,EAChB,mBAAmB,EAEpB,MAAM,8BAA8B,CAAC;AAItC,OAAO,EACL,6CAA6C,EAC7C,+CAA+C,EAC/C,kDAAkD,EACnD,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,6BAA6B,EAAE,SAAS,EAAE,gCAAgC;AACnF,OAAO,EAAE,qBAAqB,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAY7D,SAAe,qBAAqB,CAClC,OAAoB,EACpB,eAAoC,EACpC,MAAc,EACd,aAAmD,EACnD,MAA8B,EAC9B,OAA2B;;QAE3B,kDAAkD;QAClD,MAAM,QAAQ,GAAG,MAAM,CAAC,EAAE,CAAC;QAC3B,MAAM,UAAU,GAAG,MAAM,CAAC,eAAe,CAAC;QAC1C,IAAI,cAAc,CAAC;QACnB,IAAI,OAAO,aAAa,KAAK,QAAQ,EAAE;YACrC,cAAc,GAAG,aAAa,CAAC;SAChC;aAAM;YACL,cAAc,GAAG,6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import {\n CreateViewOptions,\n LocalVideoStream,\n VideoStreamRenderer,\n VideoStreamRendererView\n} from '@azure/communication-calling';\nimport { CommunicationIdentifierKind } from '@azure/communication-common';\nimport { LocalVideoStreamState, RemoteVideoStreamState } from './CallClientState';\nimport { CallContext } from './CallContext';\nimport {\n convertSdkLocalStreamToDeclarativeLocalStream,\n convertSdkRemoteStreamToDeclarativeRemoteStream,\n convertFromSDKToDeclarativeVideoStreamRendererView\n} from './Converter';\nimport { InternalCallContext } from './InternalCallContext';\nimport { toFlatCommunicationIdentifier, _logEvent } from '@internal/acs-ui-common';\nimport { callingStatefulLogger, EventNames } from './Logger';\n\n/**\n * Return result from {@link StatefulCallClient.createView}.\n *\n * @public\n */\nexport type CreateViewResult = {\n renderer: VideoStreamRenderer;\n view: VideoStreamRendererView;\n};\n\nasync function createViewRemoteVideo(\n context: CallContext,\n internalContext: InternalCallContext,\n callId: string,\n participantId: CommunicationIdentifierKind | string,\n stream: RemoteVideoStreamState,\n options?: CreateViewOptions\n): Promise<CreateViewResult | undefined> {\n // Render RemoteVideoStream that is part of a Call\n const streamId = stream.id;\n const streamType = stream.mediaStreamType;\n let participantKey;\n if (typeof participantId === 'string') {\n participantKey = participantId;\n } else {\n participantKey = toFlatCommunicationIdentifier(participantId);\n }\n const streamLogInfo = { callId, participantKey, streamId, streamType };\n\n _logEvent(callingStatefulLogger, {\n name: EventNames.CREATING_REMOTE_VIEW,\n level: 'info',\n message: 'Start creating view for remote video.',\n data: streamLogInfo\n });\n const renderInfo = internalContext.getRemoteRenderInfoForParticipant(callId, participantKey, streamId);\n\n if (!renderInfo) {\n _logEvent(callingStatefulLogger, {\n name: EventNames.REMOTE_STREAM_NOT_FOUND,\n level: 'error',\n message: 'RemoteVideoStream not found in state.',\n data: streamLogInfo\n });\n console.warn('RemoteVideoStream not found in state');\n return;\n }\n\n if (renderInfo.status === 'Rendered') {\n _logEvent(callingStatefulLogger, {\n name: EventNames.REMOTE_STREAM_ALREADY_RENDERED,\n level: 'warning',\n message: 'RemoteVideoStream is already rendered.',\n data: streamLogInfo\n });\n console.warn('RemoteVideoStream is already rendered');\n return;\n }\n\n if (renderInfo.status === 'Rendering') {\n // Do not log to console here as this is a very common situation due to UI rerenders while\n // the video rendering is in progress.\n _logEvent(callingStatefulLogger, {\n name: EventNames.REMOTE_STREAM_RENDERING,\n level: 'warning',\n message: 'RemoteVideoStream is rendering.',\n data: streamLogInfo\n });\n return;\n }\n\n // \"Stopping\" only happens if the stream was in \"rendering\" but `disposeView` was called.\n // Now that `createView` has been re-called, we can flip the state back to \"rendering\".\n if (renderInfo.status === 'Stopping') {\n _logEvent(callingStatefulLogger, {\n name: EventNames.REMOTE_STREAM_STOPPING,\n level: 'warning',\n message: 'RemoteVideoStream was marked as stopping by dispose view. Resetting state to \"Rendering\".',\n data: streamLogInfo\n });\n internalContext.setRemoteRenderInfo(\n callId,\n participantKey,\n streamId,\n renderInfo.stream,\n 'Rendering',\n renderInfo.renderer\n );\n return;\n }\n\n const renderer = new VideoStreamRenderer(renderInfo.stream);\n\n internalContext.setRemoteRenderInfo(callId, participantKey, streamId, renderInfo.stream, 'Rendering', undefined);\n\n let view;\n try {\n view = await renderer.createView(options);\n } catch (e) {\n _logEvent(callingStatefulLogger, {\n name: EventNames.CREATE_REMOTE_STREAM_FAIL,\n level: 'error',\n message: 'Failed to create remote view',\n data: streamLogInfo\n });\n internalContext.setRemoteRenderInfo(callId, participantKey, streamId, renderInfo.stream, 'NotRendered', undefined);\n throw e;\n }\n\n // Since render could take some time, we need to check if the stream is still valid and if we received a signal to\n // stop rendering.\n const refreshedRenderInfo = internalContext.getRemoteRenderInfoForParticipant(callId, participantKey, streamId);\n if (!refreshedRenderInfo) {\n // RenderInfo was removed. This should not happen unless stream was removed from the call so dispose the renderer\n // and clean up state.\n _logEvent(callingStatefulLogger, {\n name: EventNames.REMOTE_RENDER_INFO_NOT_FOUND,\n level: 'error',\n message: 'Cannot find remote render info after create the view.',\n data: streamLogInfo\n });\n renderer.dispose();\n context.setRemoteVideoStreamRendererView(callId, participantKey, streamId, undefined);\n return;\n }\n\n if (refreshedRenderInfo.status === 'Stopping') {\n // Stop render was called on this stream after we had started rendering. We will dispose this view and do not\n // put the view into the state.\n _logEvent(callingStatefulLogger, {\n name: EventNames.REMOTE_CREATED_STREAM_STOPPING,\n level: 'warning',\n message: 'Render info status is stopping, dispose renderer.',\n data: streamLogInfo\n });\n renderer.dispose();\n internalContext.setRemoteRenderInfo(\n callId,\n participantKey,\n streamId,\n refreshedRenderInfo.stream,\n 'NotRendered',\n undefined\n );\n context.setRemoteVideoStreamRendererView(callId, participantKey, streamId, undefined);\n return;\n }\n\n // Else the stream still exists and status is not telling us to stop rendering. Complete the render process by\n // updating the state.\n internalContext.setRemoteRenderInfo(\n callId,\n participantKey,\n streamId,\n refreshedRenderInfo.stream,\n 'Rendered',\n renderer\n );\n context.setRemoteVideoStreamRendererView(\n callId,\n participantKey,\n streamId,\n convertFromSDKToDeclarativeVideoStreamRendererView(view)\n );\n _logEvent(callingStatefulLogger, {\n name: EventNames.REMOTE_VIEW_RENDER_SUCCEED,\n level: 'info',\n message: `Successfully render the remote view.`,\n data: {\n streamLogInfo\n }\n });\n\n return {\n renderer,\n view\n };\n}\n\nasync function createViewLocalVideo(\n context: CallContext,\n internalContext: InternalCallContext,\n callId: string,\n options?: CreateViewOptions\n): Promise<CreateViewResult | undefined> {\n // Render LocalVideoStream that is part of a Call\n const renderInfo = internalContext.getLocalRenderInfo(callId);\n\n const streamType = renderInfo?.stream.mediaStreamType;\n\n const streamLogInfo = { callId, streamType };\n\n _logEvent(callingStatefulLogger, {\n name: EventNames.START_LOCAL_STREAM_RENDERING,\n level: 'info',\n message: 'Start creating view for local video.',\n data: streamLogInfo\n });\n\n if (!renderInfo) {\n _logEvent(callingStatefulLogger, {\n name: EventNames.LOCAL_STREAM_NOT_FOUND,\n level: 'error',\n message: 'LocalVideoStream not found in state.',\n data: { callId }\n });\n console.warn('LocalVideoStream not found in state');\n return;\n }\n\n if (renderInfo.status === 'Rendered') {\n _logEvent(callingStatefulLogger, {\n name: EventNames.LOCAL_STREAM_ALREADY_RENDERED,\n level: 'warning',\n message: 'LocalVideoStream is already rendered.',\n data: streamLogInfo\n });\n console.warn('LocalVideoStream is already rendered');\n return;\n }\n\n if (renderInfo.status === 'Rendering') {\n // Do not log to console here as this is a very common situation due to UI rerenders while\n // the video rendering is in progress.\n _logEvent(callingStatefulLogger, {\n name: EventNames.LOCAL_STREAM_RENDERING,\n level: 'warning',\n message: 'LocalVideoStream is rendering.',\n data: streamLogInfo\n });\n return;\n }\n\n // \"Stopping\" only happens if the stream was in \"rendering\" but `disposeView` was called.\n // Now that `createView` has been re-called, we can flip the state back to \"rendering\".\n if (renderInfo.status === 'Stopping') {\n _logEvent(callingStatefulLogger, {\n name: EventNames.LOCAL_STREAM_STOPPING,\n level: 'warning',\n message: 'LocalVideoStream was marked as stopping by dispose view. Resetting state to \"Rendering\".',\n data: streamLogInfo\n });\n internalContext.setLocalRenderInfo(callId, renderInfo.stream, 'Rendering', renderInfo.renderer);\n return;\n }\n\n const renderer = new VideoStreamRenderer(renderInfo.stream);\n\n internalContext.setLocalRenderInfo(callId, renderInfo.stream, 'Rendering', renderer);\n\n let view;\n try {\n view = await renderer.createView(options);\n } catch (e) {\n _logEvent(callingStatefulLogger, {\n name: EventNames.CREATE_LOCAL_STREAM_FAIL,\n level: 'error',\n message: 'Failed to create view.',\n data: {\n error: e,\n streamType,\n callId\n }\n });\n internalContext.setLocalRenderInfo(callId, renderInfo.stream, 'NotRendered', undefined);\n throw e;\n }\n\n // Since render could take some time, we need to check if the stream is still valid and if we received a signal to\n // stop rendering.\n const refreshedRenderInfo = internalContext.getLocalRenderInfo(callId);\n if (!refreshedRenderInfo) {\n // RenderInfo was removed. This should not happen unless stream was removed from the call so dispose the renderer\n // and clean up the state.\n _logEvent(callingStatefulLogger, {\n name: EventNames.LOCAL_RENDER_INFO_NOT_FOUND,\n level: 'error',\n message: 'Cannot find local render info after create the view. ',\n data: streamLogInfo\n });\n renderer.dispose();\n context.setLocalVideoStreamRendererView(callId, undefined);\n return;\n }\n\n if (refreshedRenderInfo.status === 'Stopping') {\n // Stop render was called on this stream after we had started rendering. We will dispose this view and do not\n // put the view into the state.\n _logEvent(callingStatefulLogger, {\n name: EventNames.LOCAL_CREATED_STREAM_STOPPING,\n level: 'warning',\n message: 'Render info status is stopping, dispose renderer.',\n data: streamLogInfo\n });\n renderer.dispose();\n internalContext.setLocalRenderInfo(callId, refreshedRenderInfo.stream, 'NotRendered', undefined);\n context.setLocalVideoStreamRendererView(callId, undefined);\n return;\n }\n\n // Else The stream still exists and status is not telling us to stop rendering. Complete the render process by\n // updating the state.\n internalContext.setLocalRenderInfo(callId, refreshedRenderInfo.stream, 'Rendered', renderer);\n context.setLocalVideoStreamRendererView(callId, convertFromSDKToDeclarativeVideoStreamRendererView(view));\n _logEvent(callingStatefulLogger, {\n name: EventNames.LOCAL_VIEW_RENDER_SUCCEED,\n level: 'info',\n message: `Successfully render the local view.`,\n data: streamLogInfo\n });\n\n return {\n renderer,\n view\n };\n}\n\nasync function createViewUnparentedVideo(\n context: CallContext,\n internalContext: InternalCallContext,\n stream: LocalVideoStreamState,\n options?: CreateViewOptions\n): Promise<CreateViewResult | undefined> {\n const renderInfo = internalContext.getUnparentedRenderInfo(stream);\n\n if (renderInfo && renderInfo.status === 'Rendered') {\n console.warn('Unparented LocalVideoStream is already rendered');\n return;\n }\n\n if (renderInfo && renderInfo.status === 'Rendering') {\n // Do not log to console here as this is a very common situation due to UI rerenders while\n // the video rendering is in progress.\n return;\n }\n\n if (renderInfo && renderInfo.status === 'Stopping') {\n console.warn('Unparented LocalVideoStream is in the middle of stopping');\n return;\n }\n\n const localVideoStream = new LocalVideoStream(stream.source);\n const renderer = new VideoStreamRenderer(localVideoStream);\n\n internalContext.setUnparentedRenderInfo(stream, localVideoStream, 'Rendering', undefined);\n\n let view: VideoStreamRendererView;\n try {\n view = await renderer.createView(options);\n } catch (e) {\n // Special case for unparented views. Since they are not tied to anything and created by us based on the calls to\n // this function we'll delete it to clean up the data since keeping it around doesn't help us and if developer wants\n // to create a new view they can check that the view is not rendered and call this function again.\n internalContext.deleteUnparentedRenderInfo(stream);\n throw e;\n }\n\n // Since render could take some time, we need to check if the stream is still valid and if we received a signal to\n // stop rendering.\n const refreshedRenderInfo = internalContext.getUnparentedRenderInfo(stream);\n if (!refreshedRenderInfo) {\n // Unparented stream's RenderInfo was deleted. Currently this shouldn't happen but if it does we'll just dispose the\n // renderer and clean up state. If developer wanted the stream they could call this function again and that should\n // generate new working state via this function.\n renderer.dispose();\n context.deleteDeviceManagerUnparentedView(stream);\n return;\n }\n\n if (refreshedRenderInfo.status === 'Stopping') {\n // Stop render was called on this stream after we had started rendering. We will dispose this view and do not\n // put the view into the state. Special case for unparented views, delete them from state when stopped to free up\n // the memory since we were the ones generating this and not tied to any Call state.\n internalContext.deleteUnparentedRenderInfo(stream);\n context.deleteDeviceManagerUnparentedView(stream);\n return;\n }\n // Else the stream still exists and status is not telling us to stop rendering. Complete the render process by\n // updating the state.\n internalContext.setUnparentedRenderInfo(stream, localVideoStream, 'Rendered', renderer);\n internalContext.subscribeToUnparentedViewVideoEffects(localVideoStream, context);\n context.setDeviceManagerUnparentedView(stream, convertFromSDKToDeclarativeVideoStreamRendererView(view));\n\n return {\n renderer,\n view\n };\n}\n\nfunction disposeViewRemoteVideo(\n context: CallContext,\n internalContext: InternalCallContext,\n callId: string,\n participantId: CommunicationIdentifierKind | string,\n stream: RemoteVideoStreamState\n): void {\n const streamId = stream.id;\n const streamType = stream.mediaStreamType;\n let participantKey;\n if (typeof participantId === 'string') {\n participantKey = participantId;\n } else {\n participantKey = toFlatCommunicationIdentifier(participantId);\n }\n\n const streamLogInfo = { callId, participantKey, streamId, streamType };\n\n _logEvent(callingStatefulLogger, {\n name: EventNames.START_DISPOSE_REMOTE_STREAM,\n level: 'info',\n message: 'Start disposing remote stream.',\n data: streamLogInfo\n });\n\n context.setRemoteVideoStreamRendererView(callId, participantKey, streamId, undefined);\n\n const renderInfo = internalContext.getRemoteRenderInfoForParticipant(callId, participantKey, streamId);\n if (!renderInfo) {\n _logEvent(callingStatefulLogger, {\n name: EventNames.REMOTE_DISPOSE_INFO_NOT_FOUND,\n level: 'error',\n message: 'Cannot find render info when disposing remote stream.',\n data: streamLogInfo\n });\n return;\n }\n\n // Nothing to dispose of or clean up -- we can safely exit early here.\n if (renderInfo.status === 'NotRendered') {\n _logEvent(callingStatefulLogger, {\n name: EventNames.REMOTE_STREAM_ALREADY_DISPOSED,\n level: 'info',\n message: 'RemoteVideoStream is already disposed.',\n data: streamLogInfo\n });\n return;\n }\n\n // Status is already marked as \"stopping\" so we can exit early here. This is because stopping only occurs\n // when the stream is being created in createView but hasn't been completed being created yet. The createView\n // method will see the \"stopping\" status and perform the cleanup\n if (renderInfo.status === 'Stopping') {\n _logEvent(callingStatefulLogger, {\n name: EventNames.REMOTE_STREAM_STOPPING,\n level: 'info',\n message: 'Remote stream is already stopping.',\n data: streamLogInfo\n });\n return;\n }\n\n // If the stream is in the middle of being rendered (i.e. has state \"Rendering\"), we need the status as\n // \"stopping\" without performing any cleanup. This will tell the `createView` method that it should stop\n // rendering and clean up the state once the view has finished being created.\n if (renderInfo.status === 'Rendering') {\n _logEvent(callingStatefulLogger, {\n name: EventNames.REMOTE_STREAM_STOPPING,\n level: 'info',\n message: 'Remote stream is still rendering. Changing status to stopping.',\n data: streamLogInfo\n });\n internalContext.setRemoteRenderInfo(callId, participantKey, streamId, renderInfo.stream, 'Stopping', undefined);\n return;\n }\n\n // Else the state must be in the \"Rendered\" state, so we can dispose the renderer and clean up the state.\n internalContext.setRemoteRenderInfo(callId, participantKey, streamId, renderInfo.stream, 'NotRendered', undefined);\n\n if (renderInfo.renderer) {\n _logEvent(callingStatefulLogger, {\n name: EventNames.DISPOSING_REMOTE_RENDERER,\n level: 'info',\n message: 'Disposing remote view renderer.',\n data: streamLogInfo\n });\n renderInfo.renderer.dispose();\n } else {\n _logEvent(callingStatefulLogger, {\n name: EventNames.REMOTE_RENDERER_NOT_FOUND,\n level: 'error',\n message: 'Cannot find remote view renderer.',\n data: streamLogInfo\n });\n }\n}\n\nfunction disposeViewLocalVideo(context: CallContext, internalContext: InternalCallContext, callId: string): void {\n const renderInfo = internalContext.getLocalRenderInfo(callId);\n const streamType = renderInfo?.stream.mediaStreamType;\n const streamLogInfo = { callId, streamType };\n\n _logEvent(callingStatefulLogger, {\n name: EventNames.START_DISPOSE_LOCAL_STREAM,\n level: 'info',\n message: 'Start disposing local stream.',\n data: streamLogInfo\n });\n\n if (!renderInfo) {\n _logEvent(callingStatefulLogger, {\n name: EventNames.LOCAL_DISPOSE_INFO_NOT_FOUND,\n level: 'error',\n message: 'Cannot find render info when disposing local stream.',\n data: streamLogInfo\n });\n return;\n }\n\n // Nothing to dispose of or clean up -- we can safely exit early here.\n if (renderInfo.status === 'NotRendered') {\n _logEvent(callingStatefulLogger, {\n name: EventNames.LOCAL_STREAM_ALREADY_DISPOSED,\n level: 'info',\n message: 'LocalVideoStream is already disposed.',\n data: streamLogInfo\n });\n return;\n }\n\n // Status is already marked as \"stopping\" so we can exit early here. This is because stopping only occurs\n // when the stream is being created in createView but hasn't been completed being created yet. The createView\n // method will see the \"stopping\" status and perform the cleanup\n if (renderInfo.status === 'Stopping') {\n _logEvent(callingStatefulLogger, {\n name: EventNames.LOCAL_STREAM_STOPPING,\n level: 'info',\n message: 'Local stream is already stopping.',\n data: streamLogInfo\n });\n return;\n }\n\n // If the stream is in the middle of being rendered (i.e. has state \"Rendering\"), we need the status as\n // \"stopping\" without performing any cleanup. This will tell the `createView` method that it should stop\n // rendering and clean up the state once the view has finished being created.\n if (renderInfo.status === 'Rendering') {\n _logEvent(callingStatefulLogger, {\n name: EventNames.REMOTE_STREAM_STOPPING,\n level: 'info',\n message: 'Remote stream is still rendering. Changing status to stopping.',\n data: streamLogInfo\n });\n internalContext.setLocalRenderInfo(callId, renderInfo.stream, 'Stopping', renderInfo.renderer);\n return;\n }\n\n if (renderInfo.renderer) {\n _logEvent(callingStatefulLogger, {\n name: EventNames.DISPOSING_LOCAL_RENDERER,\n level: 'info',\n message: 'Disposing local view renderer.',\n data: streamLogInfo\n });\n renderInfo.renderer.dispose();\n\n // We will after disposing of the renderer tell the internal context and context that the\n // local view is gone so we need to update their states.\n internalContext.setLocalRenderInfo(callId, renderInfo.stream, 'NotRendered', undefined);\n context.setLocalVideoStreamRendererView(callId, undefined);\n } else {\n _logEvent(callingStatefulLogger, {\n name: EventNames.LOCAL_RENDERER_NOT_FOUND,\n level: 'error',\n message: 'Cannot find renderer when disposing local stream.',\n data: streamLogInfo\n });\n }\n}\n\nfunction disposeViewUnparentedVideo(\n context: CallContext,\n internalContext: InternalCallContext,\n stream: LocalVideoStreamState\n): void {\n const streamType = stream.mediaStreamType;\n const streamLogInfo = { streamType };\n\n _logEvent(callingStatefulLogger, {\n name: EventNames.START_DISPOSE_LOCAL_STREAM,\n level: 'info',\n message: 'Start disposing unparented local stream.',\n data: streamLogInfo\n });\n\n context.deleteDeviceManagerUnparentedView(stream);\n\n const renderInfo = internalContext.getUnparentedRenderInfo(stream);\n if (!renderInfo) {\n _logEvent(callingStatefulLogger, {\n name: EventNames.LOCAL_DISPOSE_INFO_NOT_FOUND,\n level: 'error',\n message: 'Cannot find render info when disposing unparented local stream.',\n data: streamLogInfo\n });\n return;\n }\n\n if (renderInfo.status === 'Rendering') {\n _logEvent(callingStatefulLogger, {\n name: EventNames.LOCAL_STREAM_STOPPING,\n level: 'info',\n message: 'Unparented local stream is still rendering. Changing status to stopping.',\n data: streamLogInfo\n });\n internalContext.setUnparentedRenderInfo(stream, renderInfo.stream, 'Stopping', undefined);\n } else {\n internalContext.deleteUnparentedRenderInfo(stream);\n }\n\n if (renderInfo.renderer) {\n _logEvent(callingStatefulLogger, {\n name: EventNames.DISPOSING_LOCAL_RENDERER,\n level: 'info',\n message: 'Disposing unparented local view renderer.',\n data: streamLogInfo\n });\n renderInfo.renderer.dispose();\n } else {\n _logEvent(callingStatefulLogger, {\n name: EventNames.LOCAL_RENDERER_NOT_FOUND,\n level: 'error',\n message: 'Cannot find renderer when disposing unparented local stream.',\n data: streamLogInfo\n });\n }\n}\n\n/**\n * @private\n */\nexport function createView(\n context: CallContext,\n internalContext: InternalCallContext,\n callId: string | undefined,\n participantId: CommunicationIdentifierKind | string | undefined,\n stream: LocalVideoStreamState | RemoteVideoStreamState,\n options?: CreateViewOptions\n): Promise<CreateViewResult | undefined> {\n const streamType = stream.mediaStreamType;\n\n if ('id' in stream && callId && participantId) {\n // Render RemoteVideoStream that is part of a Call\n return createViewRemoteVideo(context, internalContext, callId, participantId, stream, options);\n } else if (!('id' in stream) && callId) {\n // Render LocalVideoStream that is part of a Call\n return createViewLocalVideo(context, internalContext, callId, options);\n } else if (!('id' in stream) && !callId) {\n // Render LocalVideoStream that is not part of a Call\n // Because it is not part of the call we don't tee errors to state naturally (e.g. via a Call Client function such as startVideo).\n // We do not have a startLocalPreviewVideo function, so as a workaround we ensure any errors are propagated here.\n return context.withAsyncErrorTeedToState(\n async () => await createViewUnparentedVideo(context, internalContext, stream, options),\n 'Call.startVideo'\n )();\n } else {\n _logEvent(callingStatefulLogger, {\n name: EventNames.CREATE_STREAM_INVALID_PARAMS,\n level: 'warning',\n message: 'Create View invalid combination of parameters.',\n data: { streamType }\n });\n return Promise.resolve(undefined);\n }\n}\n\n/**\n * @private\n */\nexport function disposeView(\n context: CallContext,\n internalContext: InternalCallContext,\n callId: string | undefined,\n participantId: CommunicationIdentifierKind | string | undefined,\n stream: LocalVideoStreamState | RemoteVideoStreamState\n): void {\n const streamType = stream.mediaStreamType;\n if ('id' in stream && callId && participantId) {\n // Stop rendering RemoteVideoStream that is part of a Call\n disposeViewRemoteVideo(context, internalContext, callId, participantId, stream);\n } else if (!('id' in stream) && callId) {\n // Stop rendering LocalVideoStream that is part of a Call\n disposeViewLocalVideo(context, internalContext, callId);\n } else if (!('id' in stream) && !callId) {\n // Stop rendering LocalVideoStream that is not part of a Call\n // Because it is not part of the call we don't tee errors to state naturally (e.g. via a Call Client function such as startVideo).\n // We do not have a stopLocalPreviewVideo function, so as a workaround we ensure any errors are propagated here.\n context.withErrorTeedToState(\n () => disposeViewUnparentedVideo(context, internalContext, stream),\n 'Call.stopVideo'\n )();\n } else {\n _logEvent(callingStatefulLogger, {\n name: EventNames.DISPOSE_STREAM_INVALID_PARAMS,\n level: 'warning',\n message: 'Dispose View invalid combination of parameters.',\n data: { streamType }\n });\n return;\n }\n}\n\n/**\n * @private\n * Only stops videos that are tied to a Call.\n */\nexport function disposeAllViewsFromCall(\n context: CallContext,\n internalContext: InternalCallContext,\n callId: string\n): void {\n const callStreams = internalContext.getRemoteRenderInfoForCall(callId);\n if (callStreams) {\n for (const [participantKey, participantStreams] of callStreams.entries()) {\n for (const [_, remoteStreamAndRenderer] of participantStreams.entries()) {\n // We don't want to accept SDK stream as parameter but we also don't cache the declarative stream so we have to\n // convert the SDK stream to declarative stream which is not pretty so this could use some further refactoring.\n disposeView(\n context,\n internalContext,\n callId,\n participantKey,\n convertSdkRemoteStreamToDeclarativeRemoteStream(remoteStreamAndRenderer.stream)\n );\n }\n }\n }\n const localStreamAndRenderer = internalContext.getLocalRenderInfo(callId);\n if (localStreamAndRenderer && localStreamAndRenderer.renderer) {\n // We don't want to accept SDK stream as parameter but we also don't cache the declarative stream so we have to\n // convert the SDK stream to declarative stream which is not pretty so this could use some further refactoring.\n disposeView(\n context,\n internalContext,\n callId,\n undefined,\n convertSdkLocalStreamToDeclarativeLocalStream(localStreamAndRenderer.stream)\n );\n }\n}\n\n/**\n * @private\n */\nexport function disposeAllViews(context: CallContext, internalContext: InternalCallContext): void {\n const callIds = internalContext.getCallIds();\n for (const callId of callIds) {\n disposeAllViewsFromCall(context, internalContext, callId);\n }\n}\n\"../../acs-ui-common/src\""]}
|
1
|
+
{"version":3,"file":"StreamUtils.js","sourceRoot":"","sources":["../../../../../calling-stateful-client/src/Stre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AAM,CAAC,cAAc,EAAE,kBAAkB,CAAC,IAAI,WAAW,CAAC,OAAO,EAAE,EAAE;YACxE,KAAK,MAAM,CAAC,CAAC,EAAE,uBAAuB,CAAC,IAAI,kBAAkB,CAAC,OAAO,EAAE,EAAE;gBACvE,+GAA+G;gBAC/G,+GAA+G;gBAC/G,WAAW,CACT,OAAO,EACP,eAAe,EACf,MAAM,EACN,cAAc,EACd,+CAA+C,CAAC,uBAAuB,CAAC,MAAM,CAAC,CAChF,CAAC;aACH;SACF;KACF;IACD,MAAM,sBAAsB,GAAG,eAAe,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC;IAC1E,IAAI,sBAAsB,IAAI,sBAAsB,CAAC,QAAQ,EAAE;QAC7D,+GAA+G;QAC/G,+GAA+G;QAC/G,WAAW,CACT,OAAO,EACP,eAAe,EACf,MAAM,EACN,SAAS,EACT,6CAA6C,CAAC,sBAAsB,CAAC,MAAM,CAAC,CAC7E,CAAC;KACH;AACH,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,OAAoB,EAAE,eAAoC;IACxF,MAAM,OAAO,GAAG,eAAe,CAAC,UAAU,EAAE,CAAC;IAC7C,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE;QAC5B,uBAAuB,CAAC,OAAO,EAAE,eAAe,EAAE,MAAM,CAAC,CAAC;KAC3D;AACH,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n CreateViewOptions,\n LocalVideoStream,\n VideoStreamRenderer,\n VideoStreamRendererView\n} from '@azure/communication-calling';\nimport { CommunicationIdentifierKind } from '@azure/communication-common';\nimport { LocalVideoStreamState, RemoteVideoStreamState } from './CallClientState';\nimport { CallContext } from './CallContext';\nimport {\n convertSdkLocalStreamToDeclarativeLocalStream,\n convertSdkRemoteStreamToDeclarativeRemoteStream,\n convertFromSDKToDeclarativeVideoStreamRendererView\n} from './Converter';\nimport { InternalCallContext } from './InternalCallContext';\nimport { toFlatCommunicationIdentifier, _logEvent } from '@internal/acs-ui-common';\nimport { callingStatefulLogger, EventNames } from './Logger';\n\n/**\n * Return result from {@link StatefulCallClient.createView}.\n *\n * @public\n */\nexport type CreateViewResult = {\n renderer: VideoStreamRenderer;\n view: VideoStreamRendererView;\n};\n\nasync function createViewRemoteVideo(\n context: CallContext,\n internalContext: InternalCallContext,\n callId: string,\n participantId: CommunicationIdentifierKind | string,\n stream: RemoteVideoStreamState,\n options?: CreateViewOptions\n): Promise<CreateViewResult | undefined> {\n // Render RemoteVideoStream that is part of a Call\n const streamId = stream.id;\n let participantKey;\n if (typeof participantId === 'string') {\n participantKey = participantId;\n } else {\n participantKey = toFlatCommunicationIdentifier(participantId);\n }\n const streamLogInfo = { callId, participantKey, streamId };\n\n _logEvent(callingStatefulLogger, {\n name: EventNames.CREATING_REMOTE_VIEW,\n level: 'info',\n message: 'Start creating view for remote video.',\n data: streamLogInfo\n });\n const renderInfo = internalContext.getRemoteRenderInfoForParticipant(callId, participantKey, streamId);\n\n if (!renderInfo) {\n _logEvent(callingStatefulLogger, {\n name: EventNames.REMOTE_STREAM_NOT_FOUND,\n level: 'error',\n message: 'RemoteVideoStream not found in state.',\n data: streamLogInfo\n });\n console.warn('RemoteVideoStream not found in state');\n return;\n }\n\n if (renderInfo.status === 'Rendered') {\n _logEvent(callingStatefulLogger, {\n name: EventNames.REMOTE_STREAM_ALREADY_RENDERED,\n level: 'warning',\n message: 'RemoteVideoStream is already rendered.',\n data: streamLogInfo\n });\n console.warn('RemoteVideoStream is already rendered');\n return;\n }\n\n if (renderInfo.status === 'Rendering') {\n // Do not log to console here as this is a very common situation due to UI rerenders while\n // the video rendering is in progress.\n _logEvent(callingStatefulLogger, {\n name: EventNames.REMOTE_STREAM_RENDERING,\n level: 'warning',\n message: 'RemoteVideoStream is rendering.',\n data: streamLogInfo\n });\n return;\n }\n\n // \"Stopping\" only happens if the stream was in \"rendering\" but `disposeView` was called.\n // Now that `createView` has been re-called, we can flip the state back to \"rendering\".\n if (renderInfo.status === 'Stopping') {\n _logEvent(callingStatefulLogger, {\n name: EventNames.REMOTE_STREAM_STOPPING,\n level: 'warning',\n message: 'RemoteVideoStream was marked as stopping by dispose view. Resetting state to \"Rendering\".'\n });\n internalContext.setRemoteRenderInfo(\n callId,\n participantKey,\n streamId,\n renderInfo.stream,\n 'Rendering',\n renderInfo.renderer\n );\n return;\n }\n\n const renderer = new VideoStreamRenderer(renderInfo.stream);\n\n internalContext.setRemoteRenderInfo(callId, participantKey, streamId, renderInfo.stream, 'Rendering', undefined);\n\n let view;\n try {\n view = await renderer.createView(options);\n } catch (e) {\n _logEvent(callingStatefulLogger, {\n name: EventNames.CREATE_REMOTE_STREAM_FAIL,\n level: 'error',\n message: 'Failed to create remote view',\n data: streamLogInfo\n });\n internalContext.setRemoteRenderInfo(callId, participantKey, streamId, renderInfo.stream, 'NotRendered', undefined);\n throw e;\n }\n\n // Since render could take some time, we need to check if the stream is still valid and if we received a signal to\n // stop rendering.\n const refreshedRenderInfo = internalContext.getRemoteRenderInfoForParticipant(callId, participantKey, streamId);\n if (!refreshedRenderInfo) {\n // RenderInfo was removed. This should not happen unless stream was removed from the call so dispose the renderer\n // and clean up state.\n _logEvent(callingStatefulLogger, {\n name: EventNames.REMOTE_RENDER_INFO_NOT_FOUND,\n level: 'error',\n message: 'Cannot find remote render info after create the view.',\n data: streamLogInfo\n });\n renderer.dispose();\n context.setRemoteVideoStreamRendererView(callId, participantKey, streamId, undefined);\n return;\n }\n\n if (refreshedRenderInfo.status === 'Stopping') {\n // Stop render was called on this stream after we had started rendering. We will dispose this view and do not\n // put the view into the state.\n _logEvent(callingStatefulLogger, {\n name: EventNames.REMOTE_CREATED_STREAM_STOPPING,\n level: 'warning',\n message: 'Render info status is stopping, dispose renderer.',\n data: streamLogInfo\n });\n renderer.dispose();\n internalContext.setRemoteRenderInfo(\n callId,\n participantKey,\n streamId,\n refreshedRenderInfo.stream,\n 'NotRendered',\n undefined\n );\n context.setRemoteVideoStreamRendererView(callId, participantKey, streamId, undefined);\n return;\n }\n\n // Else the stream still exists and status is not telling us to stop rendering. Complete the render process by\n // updating the state.\n internalContext.setRemoteRenderInfo(\n callId,\n participantKey,\n streamId,\n refreshedRenderInfo.stream,\n 'Rendered',\n renderer\n );\n context.setRemoteVideoStreamRendererView(\n callId,\n participantKey,\n streamId,\n convertFromSDKToDeclarativeVideoStreamRendererView(view)\n );\n _logEvent(callingStatefulLogger, {\n name: EventNames.REMOTE_VIEW_RENDER_SUCCEED,\n level: 'info',\n message: `Successfully render the remote view.`,\n data: {\n streamLogInfo\n }\n });\n\n return {\n renderer,\n view\n };\n}\n\nasync function createViewLocalVideo(\n context: CallContext,\n internalContext: InternalCallContext,\n callId: string,\n options?: CreateViewOptions\n): Promise<CreateViewResult | undefined> {\n _logEvent(callingStatefulLogger, {\n name: EventNames.START_LOCAL_STREAM_RENDERING,\n level: 'info',\n message: 'Start creating view for local video.'\n });\n // Render LocalVideoStream that is part of a Call\n const renderInfo = internalContext.getLocalRenderInfo(callId);\n\n if (!renderInfo) {\n _logEvent(callingStatefulLogger, {\n name: EventNames.LOCAL_STREAM_NOT_FOUND,\n level: 'error',\n message: 'LocalVideoStream not found in state.'\n });\n console.warn('LocalVideoStream not found in state');\n return;\n }\n\n if (renderInfo.status === 'Rendered') {\n _logEvent(callingStatefulLogger, {\n name: EventNames.LOCAL_STREAM_ALREADY_RENDERED,\n level: 'warning',\n message: 'LocalVideoStream is already rendered.'\n });\n console.warn('LocalVideoStream is already rendered');\n return;\n }\n\n if (renderInfo.status === 'Rendering') {\n // Do not log to console here as this is a very common situation due to UI rerenders while\n // the video rendering is in progress.\n _logEvent(callingStatefulLogger, {\n name: EventNames.LOCAL_STREAM_RENDERING,\n level: 'warning',\n message: 'LocalVideoStream is rendering.'\n });\n return;\n }\n\n // \"Stopping\" only happens if the stream was in \"rendering\" but `disposeView` was called.\n // Now that `createView` has been re-called, we can flip the state back to \"rendering\".\n if (renderInfo.status === 'Stopping') {\n _logEvent(callingStatefulLogger, {\n name: EventNames.LOCAL_STREAM_STOPPING,\n level: 'warning',\n message: 'LocalVideoStream was marked as stopping by dispose view. Resetting state to \"Rendering\".'\n });\n internalContext.setLocalRenderInfo(callId, renderInfo.stream, 'Rendering', renderInfo.renderer);\n return;\n }\n\n const renderer = new VideoStreamRenderer(renderInfo.stream);\n\n internalContext.setLocalRenderInfo(callId, renderInfo.stream, 'Rendering', renderer);\n\n let view;\n try {\n view = await renderer.createView(options);\n } catch (e) {\n _logEvent(callingStatefulLogger, {\n name: EventNames.CREATE_LOCAL_STREAM_FAIL,\n level: 'error',\n message: 'Failed to create view.',\n data: {\n error: e\n }\n });\n internalContext.setLocalRenderInfo(callId, renderInfo.stream, 'NotRendered', undefined);\n throw e;\n }\n\n // Since render could take some time, we need to check if the stream is still valid and if we received a signal to\n // stop rendering.\n const refreshedRenderInfo = internalContext.getLocalRenderInfo(callId);\n if (!refreshedRenderInfo) {\n // RenderInfo was removed. This should not happen unless stream was removed from the call so dispose the renderer\n // and clean up the state.\n _logEvent(callingStatefulLogger, {\n name: EventNames.LOCAL_RENDER_INFO_NOT_FOUND,\n level: 'error',\n message: 'Cannot find local render info after create the view. ',\n data: {\n callId\n }\n });\n renderer.dispose();\n context.setLocalVideoStreamRendererView(callId, undefined);\n return;\n }\n\n if (refreshedRenderInfo.status === 'Stopping') {\n // Stop render was called on this stream after we had started rendering. We will dispose this view and do not\n // put the view into the state.\n _logEvent(callingStatefulLogger, {\n name: EventNames.LOCAL_CREATED_STREAM_STOPPING,\n level: 'warning',\n message: 'Render info status is stopping, dispose renderer.',\n data: {\n callId\n }\n });\n renderer.dispose();\n internalContext.setLocalRenderInfo(callId, refreshedRenderInfo.stream, 'NotRendered', undefined);\n context.setLocalVideoStreamRendererView(callId, undefined);\n return;\n }\n\n // Else The stream still exists and status is not telling us to stop rendering. Complete the render process by\n // updating the state.\n internalContext.setLocalRenderInfo(callId, refreshedRenderInfo.stream, 'Rendered', renderer);\n context.setLocalVideoStreamRendererView(callId, convertFromSDKToDeclarativeVideoStreamRendererView(view));\n _logEvent(callingStatefulLogger, {\n name: EventNames.LOCAL_VIEW_RENDER_SUCCEED,\n level: 'info',\n message: `Successfully render the local view.`,\n data: {\n callId\n }\n });\n\n return {\n renderer,\n view\n };\n}\n\nasync function createViewUnparentedVideo(\n context: CallContext,\n internalContext: InternalCallContext,\n stream: LocalVideoStreamState,\n options?: CreateViewOptions\n): Promise<CreateViewResult | undefined> {\n const renderInfo = internalContext.getUnparentedRenderInfo(stream);\n\n if (renderInfo && renderInfo.status === 'Rendered') {\n console.warn('Unparented LocalVideoStream is already rendered');\n return;\n }\n\n if (renderInfo && renderInfo.status === 'Rendering') {\n // Do not log to console here as this is a very common situation due to UI rerenders while\n // the video rendering is in progress.\n return;\n }\n\n if (renderInfo && renderInfo.status === 'Stopping') {\n console.warn('Unparented LocalVideoStream is in the middle of stopping');\n return;\n }\n\n const localVideoStream = new LocalVideoStream(stream.source);\n const renderer = new VideoStreamRenderer(localVideoStream);\n\n internalContext.setUnparentedRenderInfo(stream, localVideoStream, 'Rendering', undefined);\n\n let view: VideoStreamRendererView;\n try {\n view = await renderer.createView(options);\n } catch (e) {\n // Special case for unparented views. Since they are not tied to anything and created by us based on the calls to\n // this function we'll delete it to clean up the data since keeping it around doesn't help us and if developer wants\n // to create a new view they can check that the view is not rendered and call this function again.\n internalContext.deleteUnparentedRenderInfo(stream);\n throw e;\n }\n\n // Since render could take some time, we need to check if the stream is still valid and if we received a signal to\n // stop rendering.\n const refreshedRenderInfo = internalContext.getUnparentedRenderInfo(stream);\n if (!refreshedRenderInfo) {\n // Unparented stream's RenderInfo was deleted. Currently this shouldn't happen but if it does we'll just dispose the\n // renderer and clean up state. If developer wanted the stream they could call this function again and that should\n // generate new working state via this function.\n renderer.dispose();\n context.deleteDeviceManagerUnparentedView(stream);\n return;\n }\n\n if (refreshedRenderInfo.status === 'Stopping') {\n // Stop render was called on this stream after we had started rendering. We will dispose this view and do not\n // put the view into the state. Special case for unparented views, delete them from state when stopped to free up\n // the memory since we were the ones generating this and not tied to any Call state.\n internalContext.deleteUnparentedRenderInfo(stream);\n context.deleteDeviceManagerUnparentedView(stream);\n return;\n }\n\n // Else the stream still exists and status is not telling us to stop rendering. Complete the render process by\n // updating the state.\n internalContext.setUnparentedRenderInfo(stream, localVideoStream, 'Rendered', renderer);\n context.setDeviceManagerUnparentedView(stream, convertFromSDKToDeclarativeVideoStreamRendererView(view));\n\n return {\n renderer,\n view\n };\n}\n\nfunction disposeViewRemoteVideo(\n context: CallContext,\n internalContext: InternalCallContext,\n callId: string,\n participantId: CommunicationIdentifierKind | string,\n stream: RemoteVideoStreamState\n): void {\n const streamId = stream.id;\n\n let participantKey;\n if (typeof participantId === 'string') {\n participantKey = participantId;\n } else {\n participantKey = toFlatCommunicationIdentifier(participantId);\n }\n\n const streamLogInfo = { callId, participantKey, streamId };\n\n _logEvent(callingStatefulLogger, {\n name: EventNames.START_DISPOSE_REMOTE_STREAM,\n level: 'info',\n message: 'Start disposing remote stream.',\n data: streamLogInfo\n });\n\n context.setRemoteVideoStreamRendererView(callId, participantKey, streamId, undefined);\n\n const renderInfo = internalContext.getRemoteRenderInfoForParticipant(callId, participantKey, streamId);\n if (!renderInfo) {\n _logEvent(callingStatefulLogger, {\n name: EventNames.REMOTE_DISPOSE_INFO_NOT_FOUND,\n level: 'error',\n message: 'Cannot find render info when disposing remote stream.',\n data: streamLogInfo\n });\n return;\n }\n\n // Nothing to dispose of or clean up -- we can safely exit early here.\n if (renderInfo.status === 'NotRendered') {\n _logEvent(callingStatefulLogger, {\n name: EventNames.REMOTE_STREAM_ALREADY_DISPOSED,\n level: 'info',\n message: 'RemoteVideoStream is already disposed.',\n data: streamLogInfo\n });\n return;\n }\n\n // Status is already marked as \"stopping\" so we can exit early here. This is because stopping only occurs\n // when the stream is being created in createView but hasn't been completed being created yet. The createView\n // method will see the \"stopping\" status and perform the cleanup\n if (renderInfo.status === 'Stopping') {\n _logEvent(callingStatefulLogger, {\n name: EventNames.REMOTE_STREAM_STOPPING,\n level: 'info',\n message: 'Remote stream is already stopping.',\n data: streamLogInfo\n });\n return;\n }\n\n // If the stream is in the middle of being rendered (i.e. has state \"Rendering\"), we need the status as\n // \"stopping\" without performing any cleanup. This will tell the `createView` method that it should stop\n // rendering and clean up the state once the view has finished being created.\n if (renderInfo.status === 'Rendering') {\n _logEvent(callingStatefulLogger, {\n name: EventNames.REMOTE_STREAM_STOPPING,\n level: 'info',\n message: 'Remote stream is still rendering. Changing status to stopping.',\n data: streamLogInfo\n });\n internalContext.setRemoteRenderInfo(callId, participantKey, streamId, renderInfo.stream, 'Stopping', undefined);\n return;\n }\n\n // Else the state must be in the \"Rendered\" state, so we can dispose the renderer and clean up the state.\n internalContext.setRemoteRenderInfo(callId, participantKey, streamId, renderInfo.stream, 'NotRendered', undefined);\n\n if (renderInfo.renderer) {\n _logEvent(callingStatefulLogger, {\n name: EventNames.DISPOSING_REMOTE_RENDERER,\n level: 'info',\n message: 'Disposing remote view renderer.',\n data: streamLogInfo\n });\n renderInfo.renderer.dispose();\n } else {\n _logEvent(callingStatefulLogger, {\n name: EventNames.REMOTE_RENDERER_NOT_FOUND,\n level: 'error',\n message: 'Cannot find remote view renderer.',\n data: streamLogInfo\n });\n }\n}\n\nfunction disposeViewLocalVideo(context: CallContext, internalContext: InternalCallContext, callId: string): void {\n const streamLogInfo = { callId };\n\n _logEvent(callingStatefulLogger, {\n name: EventNames.START_DISPOSE_LOCAL_STREAM,\n level: 'info',\n message: 'Start disposing local stream.',\n data: streamLogInfo\n });\n\n const renderInfo = internalContext.getLocalRenderInfo(callId);\n if (!renderInfo) {\n _logEvent(callingStatefulLogger, {\n name: EventNames.LOCAL_DISPOSE_INFO_NOT_FOUND,\n level: 'error',\n message: 'Cannot find render info when disposing local stream.',\n data: streamLogInfo\n });\n return;\n }\n\n // Nothing to dispose of or clean up -- we can safely exit early here.\n if (renderInfo.status === 'NotRendered') {\n _logEvent(callingStatefulLogger, {\n name: EventNames.LOCAL_STREAM_ALREADY_DISPOSED,\n level: 'info',\n message: 'LocalVideoStream is already disposed.'\n });\n return;\n }\n\n // Status is already marked as \"stopping\" so we can exit early here. This is because stopping only occurs\n // when the stream is being created in createView but hasn't been completed being created yet. The createView\n // method will see the \"stopping\" status and perform the cleanup\n if (renderInfo.status === 'Stopping') {\n _logEvent(callingStatefulLogger, {\n name: EventNames.LOCAL_STREAM_STOPPING,\n level: 'info',\n message: 'Local stream is already stopping.',\n data: streamLogInfo\n });\n return;\n }\n\n // If the stream is in the middle of being rendered (i.e. has state \"Rendering\"), we need the status as\n // \"stopping\" without performing any cleanup. This will tell the `createView` method that it should stop\n // rendering and clean up the state once the view has finished being created.\n if (renderInfo.status === 'Rendering') {\n _logEvent(callingStatefulLogger, {\n name: EventNames.REMOTE_STREAM_STOPPING,\n level: 'info',\n message: 'Remote stream is still rendering. Changing status to stopping.',\n data: streamLogInfo\n });\n internalContext.setLocalRenderInfo(callId, renderInfo.stream, 'Stopping', renderInfo.renderer);\n return;\n }\n\n if (renderInfo.renderer) {\n _logEvent(callingStatefulLogger, {\n name: EventNames.DISPOSING_LOCAL_RENDERER,\n level: 'info',\n message: 'Disposing local view renderer.',\n data: streamLogInfo\n });\n renderInfo.renderer.dispose();\n\n // We will after disposing of the renderer tell the internal context and context that the\n // local view is gone so we need to update their states.\n internalContext.setLocalRenderInfo(callId, renderInfo.stream, 'NotRendered', undefined);\n context.setLocalVideoStreamRendererView(callId, undefined);\n } else {\n _logEvent(callingStatefulLogger, {\n name: EventNames.LOCAL_RENDERER_NOT_FOUND,\n level: 'error',\n message: 'Cannot find renderer when disposing local stream.',\n data: streamLogInfo\n });\n }\n}\n\nfunction disposeViewUnparentedVideo(\n context: CallContext,\n internalContext: InternalCallContext,\n stream: LocalVideoStreamState\n): void {\n _logEvent(callingStatefulLogger, {\n name: EventNames.START_DISPOSE_LOCAL_STREAM,\n level: 'info',\n message: 'Start disposing unparented local stream.'\n });\n\n context.deleteDeviceManagerUnparentedView(stream);\n\n const renderInfo = internalContext.getUnparentedRenderInfo(stream);\n if (!renderInfo) {\n _logEvent(callingStatefulLogger, {\n name: EventNames.LOCAL_DISPOSE_INFO_NOT_FOUND,\n level: 'error',\n message: 'Cannot find render info when disposing unparented local stream.'\n });\n return;\n }\n\n if (renderInfo.status === 'Rendering') {\n _logEvent(callingStatefulLogger, {\n name: EventNames.LOCAL_STREAM_STOPPING,\n level: 'info',\n message: 'Unparented local stream is still rendering. Changing status to stopping.'\n });\n internalContext.setUnparentedRenderInfo(stream, renderInfo.stream, 'Stopping', undefined);\n } else {\n internalContext.deleteUnparentedRenderInfo(stream);\n }\n\n if (renderInfo.renderer) {\n _logEvent(callingStatefulLogger, {\n name: EventNames.DISPOSING_LOCAL_RENDERER,\n level: 'info',\n message: 'Disposing unparented local view renderer.'\n });\n renderInfo.renderer.dispose();\n } else {\n _logEvent(callingStatefulLogger, {\n name: EventNames.LOCAL_RENDERER_NOT_FOUND,\n level: 'error',\n message: 'Cannot find renderer when disposing unparented local stream.'\n });\n }\n}\n\n/**\n * @private\n */\nexport function createView(\n context: CallContext,\n internalContext: InternalCallContext,\n callId: string | undefined,\n participantId: CommunicationIdentifierKind | string | undefined,\n stream: LocalVideoStreamState | RemoteVideoStreamState,\n options?: CreateViewOptions\n): Promise<CreateViewResult | undefined> {\n if ('id' in stream && callId && participantId) {\n // Render RemoteVideoStream that is part of a Call\n return createViewRemoteVideo(context, internalContext, callId, participantId, stream, options);\n } else if (!('id' in stream) && callId) {\n // Render LocalVideoStream that is part of a Call\n return createViewLocalVideo(context, internalContext, callId, options);\n } else if (!('id' in stream) && !callId) {\n // Render LocalVideoStream that is not part of a Call\n // Because it is not part of the call we don't tee errors to state naturally (e.g. via a Call Client function such as startVideo).\n // We do not have a startLocalPreviewVideo function, so as a workaround we ensure any errors are propagated here.\n return context.withAsyncErrorTeedToState(\n async () => await createViewUnparentedVideo(context, internalContext, stream, options),\n 'Call.startVideo'\n )();\n } else {\n _logEvent(callingStatefulLogger, {\n name: EventNames.CREATE_STREAM_INVALID_PARAMS,\n level: 'warning',\n message: 'Create View invalid combination of parameters.'\n });\n return Promise.resolve(undefined);\n }\n}\n\n/**\n * @private\n */\nexport function disposeView(\n context: CallContext,\n internalContext: InternalCallContext,\n callId: string | undefined,\n participantId: CommunicationIdentifierKind | string | undefined,\n stream: LocalVideoStreamState | RemoteVideoStreamState\n): void {\n if ('id' in stream && callId && participantId) {\n // Stop rendering RemoteVideoStream that is part of a Call\n disposeViewRemoteVideo(context, internalContext, callId, participantId, stream);\n } else if (!('id' in stream) && callId) {\n // Stop rendering LocalVideoStream that is part of a Call\n disposeViewLocalVideo(context, internalContext, callId);\n } else if (!('id' in stream) && !callId) {\n // Stop rendering LocalVideoStream that is not part of a Call\n // Because it is not part of the call we don't tee errors to state naturally (e.g. via a Call Client function such as startVideo).\n // We do not have a stopLocalPreviewVideo function, so as a workaround we ensure any errors are propagated here.\n context.withErrorTeedToState(\n () => disposeViewUnparentedVideo(context, internalContext, stream),\n 'Call.stopVideo'\n )();\n } else {\n _logEvent(callingStatefulLogger, {\n name: EventNames.DISPOSE_STREAM_INVALID_PARAMS,\n level: 'warning',\n message: 'Dispose View invalid combination of parameters.'\n });\n return;\n }\n}\n\n/**\n * @private\n * Only stops videos that are tied to a Call.\n */\nexport function disposeAllViewsFromCall(\n context: CallContext,\n internalContext: InternalCallContext,\n callId: string\n): void {\n const callStreams = internalContext.getRemoteRenderInfoForCall(callId);\n if (callStreams) {\n for (const [participantKey, participantStreams] of callStreams.entries()) {\n for (const [_, remoteStreamAndRenderer] of participantStreams.entries()) {\n // We don't want to accept SDK stream as parameter but we also don't cache the declarative stream so we have to\n // convert the SDK stream to declarative stream which is not pretty so this could use some further refactoring.\n disposeView(\n context,\n internalContext,\n callId,\n participantKey,\n convertSdkRemoteStreamToDeclarativeRemoteStream(remoteStreamAndRenderer.stream)\n );\n }\n }\n }\n const localStreamAndRenderer = internalContext.getLocalRenderInfo(callId);\n if (localStreamAndRenderer && localStreamAndRenderer.renderer) {\n // We don't want to accept SDK stream as parameter but we also don't cache the declarative stream so we have to\n // convert the SDK stream to declarative stream which is not pretty so this could use some further refactoring.\n disposeView(\n context,\n internalContext,\n callId,\n undefined,\n convertSdkLocalStreamToDeclarativeLocalStream(localStreamAndRenderer.stream)\n );\n }\n}\n\n/**\n * @private\n */\nexport function disposeAllViews(context: CallContext, internalContext: InternalCallContext): void {\n const callIds = internalContext.getCallIds();\n for (const callId of callIds) {\n disposeAllViewsFromCall(context, internalContext, callId);\n }\n}\n\"../../acs-ui-common/src\""]}
|
@@ -5,5 +5,4 @@ export type { CallAgentState, CallClientState, CallError, CallErrors, CallErrorT
|
|
5
5
|
export type { CreateViewResult } from './StreamUtils';
|
6
6
|
export type { DeclarativeCallAgent, IncomingCallManagement } from './CallAgentDeclarative';
|
7
7
|
export type { DeclarativeIncomingCall } from './IncomingCallDeclarative';
|
8
|
-
export type { LocalVideoStreamVideoEffectsState } from './CallClientState';
|
9
8
|
//# sourceMappingURL=index-public.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index-public.js","sourceRoot":"","sources":["../../../../../calling-stateful-client/src/index-public.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nexport { createStatefulCallClient } from './StatefulCallClient';\nexport type { StatefulCallClient, StatefulCallClientArgs, StatefulCallClientOptions } from './StatefulCallClient';\nexport type { StatefulDeviceManager } from './DeviceManagerDeclarative';\nexport type {\n CallAgentState,\n CallClientState,\n CallError,\n CallErrors,\n CallErrorTarget,\n CallState,\n DeviceManagerState,\n DiagnosticsCallFeatureState,\n IncomingCallState,\n LocalVideoStreamState,\n MediaDiagnosticsState,\n NetworkDiagnosticsState,\n RecordingCallFeatureState as RecordingCallFeature,\n RemoteParticipantState,\n RemoteVideoStreamState,\n TranscriptionCallFeatureState as TranscriptionCallFeature,\n VideoStreamRendererViewState\n} from './CallClientState';\nexport type { CreateViewResult } from './StreamUtils';\n/* @conditional-compile-remove(one-to-n-calling) */\nexport type { DeclarativeCallAgent, IncomingCallManagement } from './CallAgentDeclarative';\n/* @conditional-compile-remove(one-to-n-calling) */\nexport type { DeclarativeIncomingCall } from './IncomingCallDeclarative';\n
|
1
|
+
{"version":3,"file":"index-public.js","sourceRoot":"","sources":["../../../../../calling-stateful-client/src/index-public.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nexport { createStatefulCallClient } from './StatefulCallClient';\nexport type { StatefulCallClient, StatefulCallClientArgs, StatefulCallClientOptions } from './StatefulCallClient';\nexport type { StatefulDeviceManager } from './DeviceManagerDeclarative';\nexport type {\n CallAgentState,\n CallClientState,\n CallError,\n CallErrors,\n CallErrorTarget,\n CallState,\n DeviceManagerState,\n DiagnosticsCallFeatureState,\n IncomingCallState,\n LocalVideoStreamState,\n MediaDiagnosticsState,\n NetworkDiagnosticsState,\n RecordingCallFeatureState as RecordingCallFeature,\n RemoteParticipantState,\n RemoteVideoStreamState,\n TranscriptionCallFeatureState as TranscriptionCallFeature,\n VideoStreamRendererViewState\n} from './CallClientState';\nexport type { CreateViewResult } from './StreamUtils';\n/* @conditional-compile-remove(one-to-n-calling) */\nexport type { DeclarativeCallAgent, IncomingCallManagement } from './CallAgentDeclarative';\n/* @conditional-compile-remove(one-to-n-calling) */\nexport type { DeclarativeIncomingCall } from './IncomingCallDeclarative';\n"]}
|
@@ -31,6 +31,6 @@ export const ControlBarButton = (props) => {
|
|
31
31
|
: (_l = props === null || props === void 0 ? void 0 : props.strings) === null || _l === void 0 ? void 0 : _l.tooltipOffContent);
|
32
32
|
const tooltipId = ((_m = props.tooltipId) !== null && _m !== void 0 ? _m : props.labelKey) ? props.labelKey + '-tooltip' : undefined;
|
33
33
|
return (React.createElement(ControlButtonTooltip, { content: tooltipContent, id: tooltipId },
|
34
|
-
React.createElement(DefaultButton, Object.assign({}, props, { styles: componentStyles, onRenderText: props.showLabel && props.onRenderText ? props.onRenderText : undefined, onRenderIcon: (_o = props.onRenderIcon) !== null && _o !== void 0 ? _o : DefaultRenderIcon, ariaLabel: (_r = (_q = (_p = props.splitButtonAriaLabel) !== null && _p !== void 0 ? _p : props.ariaLabel) !== null && _q !== void 0 ? _q : tooltipContent) !== null && _r !== void 0 ? _r : labelText, allowDisabledFocus: (_s = props.allowDisabledFocus) !== null && _s !== void 0 ? _s : true, menuTriggerKeyCode: KeyCodes.down
|
34
|
+
React.createElement(DefaultButton, Object.assign({}, props, { styles: componentStyles, onRenderText: props.showLabel && props.onRenderText ? props.onRenderText : undefined, onRenderIcon: (_o = props.onRenderIcon) !== null && _o !== void 0 ? _o : DefaultRenderIcon, ariaLabel: (_r = (_q = (_p = props.splitButtonAriaLabel) !== null && _p !== void 0 ? _p : props.ariaLabel) !== null && _q !== void 0 ? _q : tooltipContent) !== null && _r !== void 0 ? _r : labelText, allowDisabledFocus: (_s = props.allowDisabledFocus) !== null && _s !== void 0 ? _s : true, menuTriggerKeyCode: KeyCodes.down }), props.showLabel ? labelText : React.createElement(React.Fragment, null))));
|
35
35
|
};
|
36
36
|
//# sourceMappingURL=ControlBarButton.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ControlBarButton.js","sourceRoot":"","sources":["../../../../../../react-components/src/components/ControlBarButton.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,aAAa,EAGb,eAAe,EAEf,QAAQ,EACT,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE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,CAAC,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,OAAO,0CAAE,sBAAsB;QACxC,CAAC,CAAC,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,OAAO;YAChB,CAAC,CAAC,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,OAAO,0CAAE,gBAAgB;YAClC,CAAC,CAAC,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,OAAO,0CAAE,iBAAiB,CAAC,CAAC;IAEzC,MAAM,SAAS,GAAG,CAAA,MAAA,KAAK,CAAC,SAAS,mCAAI,KAAK,CAAC,QAAQ,EAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,GAAG,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC;IAE9F,OAAO,CACL,oBAAC,oBAAoB,IAAC,OAAO,EAAE,cAAc,EAAE,EAAE,EAAE,SAAS;QAC1D,oBAAC,aAAa,oBACR,KAAK,IACT,MAAM,EAAE,eAAe,EACvB,YAAY,EAAE,KAAK,CAAC,SAAS,IAAI,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,SAAS,EACpF,YAAY,EAAE,MAAA,KAAK,CAAC,YAAY,mCAAI,iBAAiB,EACrD,SAAS,EAAE,MAAA,MAAA,MAAA,KAAK,CAAC,oBAAoB,mCAAI,KAAK,CAAC,SAAS,mCAAI,cAAc,mCAAI,SAAS,EACvF,kBAAkB,EAAE,MAAA,KAAK,CAAC,kBAAkB,mCAAI,IAAI,EACpD,kBAAkB,EAAE,QAAQ,CAAC,IAAI,
|
1
|
+
{"version":3,"file":"ControlBarButton.js","sourceRoot":"","sources":["../../../../../../react-components/src/components/ControlBarButton.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,aAAa,EAGb,eAAe,EAEf,QAAQ,EACT,MAAM,iBAAiB,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ed under the MIT license.\n\nimport React from 'react';\nimport {\n DefaultButton,\n IButtonProps,\n IRenderFunction,\n concatStyleSets,\n IButtonStyles,\n KeyCodes\n} from '@fluentui/react';\nimport { controlButtonStyles } from './styles/ControlBar.styles';\nimport { ControlButtonTooltip } from './ControlButtonTooltip';\n\n/**\n * Strings of {@link ControlBarButton} that can be overridden.\n *\n * @public\n */\nexport interface ControlBarButtonStrings {\n /**\n * Label of the button. This supersedes onLabel or offLabel if used.\n */\n label?: string;\n /**\n * Label of the button shown when the button is checked.\n */\n onLabel?: string;\n /**\n * Label of the button shown when the button is not checked.\n */\n offLabel?: string;\n /**\n * Tooltip content of the button. This supersedes tooltipDisabledContent, tooltipOnContent and tooltipOffContent if used.\n */\n tooltipContent?: string;\n /**\n * Tooltip content when the button is disabled.\n */\n tooltipDisabledContent?: string;\n /**\n * Tooltip content when the button is in the checked state.\n */\n tooltipOnContent?: string;\n /**\n * Tooltip content when the button is in the unchecked state.\n */\n tooltipOffContent?: string;\n}\n\n/**\n * Styles for all {@link ControlBarButton} implementations.\n *\n * @public\n */\nexport type ControlBarButtonStyles = IButtonStyles;\n\n/**\n * Props for {@link ControlBarButton}.\n *\n * @public\n */\nexport interface ControlBarButtonProps extends IButtonProps {\n /**\n * Whether the label is displayed or not.\n *\n * @defaultValue `false`\n */\n showLabel?: boolean;\n\n /**\n * Key to use for the Label component\n */\n labelKey?: string;\n\n /**\n * Id to use for the tooltip host.\n *\n * @defaultValue This uses the labelKey and appends -tooltip by default\n */\n tooltipId?: string;\n\n /**\n * Optional strings to override in component.\n */\n strings?: ControlBarButtonStrings;\n\n /**\n * Icon to render when the button is checked.\n */\n onRenderOnIcon?: IRenderFunction<IButtonProps>;\n\n /**\n * Icon to render when the button is not checked.\n */\n onRenderOffIcon?: IRenderFunction<IButtonProps>;\n\n /**\n * Fluent styles, including extensions common to all {@link ControlBarButton}s.\n */\n styles?: ControlBarButtonStyles;\n}\n\nconst DefaultRenderIcon = (props?: ControlBarButtonProps): JSX.Element | null => {\n return props?.checked\n ? props?.onRenderOnIcon\n ? props?.onRenderOnIcon()\n : null\n : props?.onRenderOffIcon\n ? props?.onRenderOffIcon()\n : null;\n};\n\n/**\n * Default button styled for the {@link ControlBar}.\n *\n * Use this component create custom buttons that are styled the same as other buttons provided by the UI Library.\n *\n * @public\n */\nexport const ControlBarButton = (props: ControlBarButtonProps): JSX.Element => {\n const componentStyles = concatStyleSets(controlButtonStyles, props.styles ?? {});\n\n const labelText =\n props?.text ?? props?.strings?.label ?? (props?.checked ? props?.strings?.onLabel : props?.strings?.offLabel);\n\n const tooltipContent =\n props?.strings?.tooltipContent ??\n (props?.disabled\n ? props?.strings?.tooltipDisabledContent\n : props?.checked\n ? props?.strings?.tooltipOnContent\n : props?.strings?.tooltipOffContent);\n\n const tooltipId = props.tooltipId ?? props.labelKey ? props.labelKey + '-tooltip' : undefined;\n\n return (\n <ControlButtonTooltip content={tooltipContent} id={tooltipId}>\n <DefaultButton\n {...props}\n styles={componentStyles}\n onRenderText={props.showLabel && props.onRenderText ? props.onRenderText : undefined}\n onRenderIcon={props.onRenderIcon ?? DefaultRenderIcon}\n ariaLabel={props.splitButtonAriaLabel ?? props.ariaLabel ?? tooltipContent ?? labelText}\n allowDisabledFocus={props.allowDisabledFocus ?? true}\n menuTriggerKeyCode={KeyCodes.down} // explicitly sets the keypress to activiate the split button drop down.\n >\n {props.showLabel ? labelText : <></>}\n </DefaultButton>\n </ControlButtonTooltip>\n );\n};\n"]}
|
@@ -20,7 +20,7 @@ import { VideoTile } from './VideoTile';
|
|
20
20
|
export const _RemoteVideoTile = React.memo((props) => {
|
21
21
|
var _a;
|
22
22
|
const { isAvailable, isReceiving = true, // default to true to prevent any breaking change
|
23
|
-
isScreenSharingOn, onCreateRemoteStreamView, onDisposeRemoteStreamView, remoteVideoViewOptions, renderElement, userId, onRenderAvatar, showMuteIndicator, remoteParticipant, participantState, menuKind, isPinned, onPinParticipant, onUnpinParticipant, disablePinMenuItem, toggleAnnouncerString, strings } = props;
|
23
|
+
isScreenSharingOn, onCreateRemoteStreamView, onDisposeRemoteStreamView, remoteVideoViewOptions, renderElement, userId, onRenderAvatar, showMuteIndicator, remoteParticipant, participantState, menuKind = 'contextual', isPinned, onPinParticipant, onUnpinParticipant, disablePinMenuItem, toggleAnnouncerString, strings } = props;
|
24
24
|
const remoteVideoStreamProps = useMemo(() => ({
|
25
25
|
isMirrored: remoteVideoViewOptions === null || remoteVideoViewOptions === void 0 ? void 0 : remoteVideoViewOptions.isMirrored,
|
26
26
|
isScreenSharingOn,
|