@azure/communication-react 1.5.1-alpha-202301220014 → 1.5.1-alpha-202301250013
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/dist-cjs/communication-react/index.js +68 -19
- 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-component-bindings/src/errorBarSelector.js +11 -3
- package/dist/dist-esm/calling-component-bindings/src/errorBarSelector.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/Logger.d.ts +2 -0
- package/dist/dist-esm/calling-stateful-client/src/Logger.js +2 -0
- package/dist/dist-esm/calling-stateful-client/src/Logger.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/StreamUtils.js +54 -15
- package/dist/dist-esm/calling-stateful-client/src/StreamUtils.js.map +1 -1
- package/package.json +8 -8
@@ -159,7 +159,7 @@ const _toCommunicationIdentifier = (id) => {
|
|
159
159
|
// Copyright (c) Microsoft Corporation.
|
160
160
|
// Licensed under the MIT license.
|
161
161
|
// GENERATED FILE. DO NOT EDIT MANUALLY.
|
162
|
-
var telemetryVersion = '1.5.1-alpha-
|
162
|
+
var telemetryVersion = '1.5.1-alpha-202301250013';
|
163
163
|
|
164
164
|
// Copyright (c) Microsoft Corporation.
|
165
165
|
/**
|
@@ -1120,7 +1120,9 @@ var EventNames;
|
|
1120
1120
|
EventNames["LOCAL_STREAM_RENDERING"] = "LOCAL_STREAM_RENDERING";
|
1121
1121
|
EventNames["REMOTE_STREAM_ALREADY_RENDERED"] = "REMOTE_STREAM_ALREADY_RENDERED";
|
1122
1122
|
EventNames["REMOTE_STREAM_RENDERING"] = "REMOTE_STREAM_RENDERING";
|
1123
|
+
EventNames["REMOTE_STREAM_ALREADY_DISPOSED"] = "REMOTE_STREAM_ALREADY_DISPOSED";
|
1123
1124
|
EventNames["REMOTE_STREAM_STOPPING"] = "REMOTE_STREAM_STOPPING";
|
1125
|
+
EventNames["REMOTE_CREATED_STREAM_STOPPING"] = "REMOTE_CREATED_STREAM_STOPPING";
|
1124
1126
|
// Error
|
1125
1127
|
EventNames["LOCAL_STREAM_NOT_FOUND"] = "LOCAL_STREAM_NOT_FOUND";
|
1126
1128
|
EventNames["LOCAL_RENDER_INFO_NOT_FOUND"] = "LOCAL_RENDER_INFO_NOT_FOUND";
|
@@ -2039,8 +2041,15 @@ function createViewRemoteVideo(context, internalContext, callId, participantId,
|
|
2039
2041
|
});
|
2040
2042
|
return;
|
2041
2043
|
}
|
2044
|
+
// "Stopping" only happens if the stream was in "rendering" but `disposeView` was called.
|
2045
|
+
// Now that `createView` has been re-called, we can flip the state back to "rendering".
|
2042
2046
|
if (renderInfo.status === 'Stopping') {
|
2043
|
-
|
2047
|
+
_logEvent(callingStatefulLogger, {
|
2048
|
+
name: EventNames.REMOTE_STREAM_STOPPING,
|
2049
|
+
level: 'warning',
|
2050
|
+
message: 'RemoteVideoStream was marked as stopping by dispose view. Resetting state to "Rendering".'
|
2051
|
+
});
|
2052
|
+
internalContext.setRemoteRenderInfo(callId, participantKey, streamId, renderInfo.stream, 'Rendering', renderInfo.renderer);
|
2044
2053
|
return;
|
2045
2054
|
}
|
2046
2055
|
const renderer = new communicationCalling.VideoStreamRenderer(renderInfo.stream);
|
@@ -2059,6 +2068,8 @@ function createViewRemoteVideo(context, internalContext, callId, participantId,
|
|
2059
2068
|
internalContext.setRemoteRenderInfo(callId, participantKey, streamId, renderInfo.stream, 'NotRendered', undefined);
|
2060
2069
|
throw e;
|
2061
2070
|
}
|
2071
|
+
// Since render could take some time, we need to check if the stream is still valid and if we received a signal to
|
2072
|
+
// stop rendering.
|
2062
2073
|
const refreshedRenderInfo = internalContext.getRemoteRenderInfoForParticipant(callId, participantKey, streamId);
|
2063
2074
|
if (!refreshedRenderInfo) {
|
2064
2075
|
// RenderInfo was removed. This should not happen unless stream was removed from the call so dispose the renderer
|
@@ -2066,7 +2077,7 @@ function createViewRemoteVideo(context, internalContext, callId, participantId,
|
|
2066
2077
|
_logEvent(callingStatefulLogger, {
|
2067
2078
|
name: EventNames.REMOTE_RENDER_INFO_NOT_FOUND,
|
2068
2079
|
level: 'error',
|
2069
|
-
message: '
|
2080
|
+
message: 'Cannot find remote render info after create the view.',
|
2070
2081
|
data: streamLogInfo
|
2071
2082
|
});
|
2072
2083
|
renderer.dispose();
|
@@ -2076,21 +2087,29 @@ function createViewRemoteVideo(context, internalContext, callId, participantId,
|
|
2076
2087
|
if (refreshedRenderInfo.status === 'Stopping') {
|
2077
2088
|
// Stop render was called on this stream after we had started rendering. We will dispose this view and do not
|
2078
2089
|
// put the view into the state.
|
2079
|
-
renderer.dispose();
|
2080
|
-
internalContext.setRemoteRenderInfo(callId, participantKey, streamId, refreshedRenderInfo.stream, 'NotRendered', undefined);
|
2081
|
-
context.setRemoteVideoStreamRendererView(callId, participantKey, streamId, undefined);
|
2082
2090
|
_logEvent(callingStatefulLogger, {
|
2083
|
-
name: EventNames.
|
2084
|
-
level: '
|
2085
|
-
message: '
|
2091
|
+
name: EventNames.REMOTE_CREATED_STREAM_STOPPING,
|
2092
|
+
level: 'warning',
|
2093
|
+
message: 'Render info status is stopping, dispose renderer.',
|
2086
2094
|
data: streamLogInfo
|
2087
2095
|
});
|
2096
|
+
renderer.dispose();
|
2097
|
+
internalContext.setRemoteRenderInfo(callId, participantKey, streamId, refreshedRenderInfo.stream, 'NotRendered', undefined);
|
2098
|
+
context.setRemoteVideoStreamRendererView(callId, participantKey, streamId, undefined);
|
2088
2099
|
return;
|
2089
2100
|
}
|
2090
2101
|
// Else the stream still exists and status is not telling us to stop rendering. Complete the render process by
|
2091
2102
|
// updating the state.
|
2092
2103
|
internalContext.setRemoteRenderInfo(callId, participantKey, streamId, refreshedRenderInfo.stream, 'Rendered', renderer);
|
2093
2104
|
context.setRemoteVideoStreamRendererView(callId, participantKey, streamId, convertFromSDKToDeclarativeVideoStreamRendererView(view));
|
2105
|
+
_logEvent(callingStatefulLogger, {
|
2106
|
+
name: EventNames.REMOTE_VIEW_RENDER_SUCCEED,
|
2107
|
+
level: 'info',
|
2108
|
+
message: `Successfully render the remote view.`,
|
2109
|
+
data: {
|
2110
|
+
streamLogInfo
|
2111
|
+
}
|
2112
|
+
});
|
2094
2113
|
return {
|
2095
2114
|
renderer,
|
2096
2115
|
view
|
@@ -2187,7 +2206,7 @@ function createViewLocalVideo(context, internalContext, callId, options) {
|
|
2187
2206
|
_logEvent(callingStatefulLogger, {
|
2188
2207
|
name: EventNames.LOCAL_CREATED_STREAM_STOPPING,
|
2189
2208
|
level: 'warning',
|
2190
|
-
message: 'Render info status is stopping, dispose renderer.
|
2209
|
+
message: 'Render info status is stopping, dispose renderer.',
|
2191
2210
|
data: {
|
2192
2211
|
callId
|
2193
2212
|
}
|
@@ -2301,9 +2320,31 @@ function disposeViewRemoteVideo(context, internalContext, callId, participantId,
|
|
2301
2320
|
});
|
2302
2321
|
return;
|
2303
2322
|
}
|
2304
|
-
//
|
2305
|
-
|
2306
|
-
|
2323
|
+
// Nothing to dispose of or clean up -- we can safely exit early here.
|
2324
|
+
if (renderInfo.status === 'NotRendered') {
|
2325
|
+
_logEvent(callingStatefulLogger, {
|
2326
|
+
name: EventNames.REMOTE_STREAM_ALREADY_DISPOSED,
|
2327
|
+
level: 'info',
|
2328
|
+
message: 'RemoteVideoStream is already disposed.',
|
2329
|
+
data: streamLogInfo
|
2330
|
+
});
|
2331
|
+
return;
|
2332
|
+
}
|
2333
|
+
// Status is already marked as "stopping" so we can exit early here. This is because stopping only occurs
|
2334
|
+
// when the stream is being created in createView but hasn't been completed being created yet. The createView
|
2335
|
+
// method will see the "stopping" status and perform the cleanup
|
2336
|
+
if (renderInfo.status === 'Stopping') {
|
2337
|
+
_logEvent(callingStatefulLogger, {
|
2338
|
+
name: EventNames.REMOTE_STREAM_STOPPING,
|
2339
|
+
level: 'info',
|
2340
|
+
message: 'Remote stream is already stopping.',
|
2341
|
+
data: streamLogInfo
|
2342
|
+
});
|
2343
|
+
return;
|
2344
|
+
}
|
2345
|
+
// If the stream is in the middle of being rendered (i.e. has state "Rendering"), we need the status as
|
2346
|
+
// "stopping" without performing any cleanup. This will tell the `createView` method that it should stop
|
2347
|
+
// rendering and clean up the state once the view has finished being created.
|
2307
2348
|
if (renderInfo.status === 'Rendering') {
|
2308
2349
|
_logEvent(callingStatefulLogger, {
|
2309
2350
|
name: EventNames.REMOTE_STREAM_STOPPING,
|
@@ -2312,10 +2353,10 @@ function disposeViewRemoteVideo(context, internalContext, callId, participantId,
|
|
2312
2353
|
data: streamLogInfo
|
2313
2354
|
});
|
2314
2355
|
internalContext.setRemoteRenderInfo(callId, participantKey, streamId, renderInfo.stream, 'Stopping', undefined);
|
2356
|
+
return;
|
2315
2357
|
}
|
2316
|
-
|
2317
|
-
|
2318
|
-
}
|
2358
|
+
// Else the state must be in the "Rendered" state, so we can dispose the renderer and clean up the state.
|
2359
|
+
internalContext.setRemoteRenderInfo(callId, participantKey, streamId, renderInfo.stream, 'NotRendered', undefined);
|
2319
2360
|
if (renderInfo.renderer) {
|
2320
2361
|
_logEvent(callingStatefulLogger, {
|
2321
2362
|
name: EventNames.DISPOSING_REMOTE_RENDERER,
|
@@ -12709,7 +12750,7 @@ const useSelector$4 = (selector, selectorProps) => {
|
|
12709
12750
|
* @public
|
12710
12751
|
*/
|
12711
12752
|
const errorBarSelector$1 = reselect.createSelector([getLatestErrors$1, getDiagnostics, getDeviceManager$1, getEnvironmentInfo], (latestErrors, diagnostics, deviceManager, environmentInfo) => {
|
12712
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
12753
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
12713
12754
|
// The order in which the errors are returned is significant: The `ErrorBar` shows errors on the UI in that order.
|
12714
12755
|
// There are several options for the ordering:
|
12715
12756
|
// - Sorted by when the errors happened (latest first / oldest first).
|
@@ -12785,9 +12826,17 @@ const errorBarSelector$1 = reselect.createSelector([getLatestErrors$1, getDiagno
|
|
12785
12826
|
appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.stopVideo', 'stopVideoGeneric');
|
12786
12827
|
appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.mute', 'muteGeneric');
|
12787
12828
|
appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.stopScreenSharing', 'stopScreenShareGeneric');
|
12788
|
-
|
12829
|
+
if (((_o = latestErrors['Call.startVideo']) === null || _o === void 0 ? void 0 : _o.message) === 'Call.startVideo: Video operation failure SourceUnavailableError') {
|
12830
|
+
appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.startVideo', 'callCameraAlreadyInUse');
|
12831
|
+
}
|
12832
|
+
else if (((_p = latestErrors['Call.startVideo']) === null || _p === void 0 ? void 0 : _p.message) === 'Call.startVideo: Video operation failure permissionDeniedError') {
|
12833
|
+
appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.startVideo', 'callCameraAccessDenied');
|
12834
|
+
}
|
12835
|
+
else {
|
12836
|
+
appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.startVideo', 'startVideoGeneric');
|
12837
|
+
}
|
12789
12838
|
appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.unmute', 'unmuteGeneric');
|
12790
|
-
if (((
|
12839
|
+
if (((_q = latestErrors['CallAgent.join']) === null || _q === void 0 ? void 0 : _q.message) === 'CallAgent.join: Invalid meeting link') {
|
12791
12840
|
appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'CallAgent.join', 'failedToJoinCallInvalidMeetingLink');
|
12792
12841
|
}
|
12793
12842
|
else {
|