@azure/communication-react 1.4.0 → 1.4.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.md CHANGED
@@ -1,9 +1,18 @@
1
1
  # Change Log - @azure/communication-react
2
2
 
3
- This log was last generated on Fri, 21 Oct 2022 23:01:52 GMT and should not be manually modified.
3
+ This log was last generated on Wed, 30 Nov 2022 17:40:55 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [1.4.1](https://github.com/azure/communication-ui-library/tree/1.4.1)
8
+
9
+ Wed, 30 Nov 2022 17:40:55 GMT
10
+ [Compare changes](https://github.com/azure/communication-ui-library/compare/1.4.0...1.4.1)
11
+
12
+ This is a patch release for issue where the local video tile was not showing the users local stream despite the camera being on [more details](https://github.com/Azure/communication-ui-library/pull/2558):
13
+
14
+ - Fix: Local video not showing to local user but still broadcasts to others in the call. ([PR #2558](https://github.com/Azure/communication-ui-library/pull/2558) by 2684369+JamesBurnside@users.noreply.github.com).
15
+
7
16
  ## [1.4.0](https://github.com/azure/communication-ui-library/tree/1.4.0)
8
17
 
9
18
  Fri, 21 Oct 2022 23:01:52 GMT
@@ -219,7 +219,7 @@ const _toCommunicationIdentifier = (id) => {
219
219
  // Copyright (c) Microsoft Corporation.
220
220
  // Licensed under the MIT license.
221
221
  // GENERATED FILE. DO NOT EDIT MANUALLY.
222
- var telemetryVersion = '1.4.0';
222
+ var telemetryVersion = '1.4.1';
223
223
 
224
224
  // Copyright (c) Microsoft Corporation.
225
225
  /**
@@ -8710,6 +8710,7 @@ var EventNames;
8710
8710
  EventNames["CREATE_STREAM_INVALID_PARAMS"] = "CREATE_STREAM_INVALID_PARAMS";
8711
8711
  EventNames["DISPOSE_STREAM_INVALID_PARAMS"] = "DISPOSE_LOCAL_STREAM_INVALID_PARAMS";
8712
8712
  EventNames["LOCAL_STREAM_ALREADY_RENDERED"] = "LOCAL_STREAM_ALREADY_RENDERED";
8713
+ EventNames["LOCAL_STREAM_ALREADY_DISPOSED"] = "LOCAL_STREAM_ALREADY_DISPOSED";
8713
8714
  EventNames["LOCAL_STREAM_STOPPING"] = "LOCAL_STREAM_STOPPING";
8714
8715
  EventNames["LOCAL_CREATED_STREAM_STOPPING"] = "LOCAL_CREATED_STREAM_STOPPING";
8715
8716
  EventNames["LOCAL_STREAM_RENDERING"] = "LOCAL_STREAM_RENDERING";
@@ -9722,14 +9723,15 @@ function createViewLocalVideo(context, internalContext, callId, options) {
9722
9723
  message: 'LocalVideoStream is rendering.'
9723
9724
  });
9724
9725
  return;
9725
- }
9726
+ } // "Stopping" only happens if the stream was in "rendering" but `disposeView` was called.
9727
+ // Now that `createView` has been re-called, we can flip the state back to "rendering".
9726
9728
  if (renderInfo.status === 'Stopping') {
9727
9729
  _logEvent(callingStatefulLogger, {
9728
9730
  name: EventNames.LOCAL_STREAM_STOPPING,
9729
9731
  level: 'warning',
9730
- message: 'LocalVideoStream is in the middle of stopping.'
9732
+ message: 'LocalVideoStream was marked as stopping by dispose view. Resetting state to "Rendering".'
9731
9733
  });
9732
- console.warn('LocalVideoStream is in the middle of stopping');
9734
+ internalContext.setLocalRenderInfo(callId, renderInfo.stream, 'Rendering', renderInfo.renderer);
9733
9735
  return;
9734
9736
  }
9735
9737
  const renderer = new communicationCalling.VideoStreamRenderer(renderInfo.stream);
@@ -9940,21 +9942,39 @@ function disposeViewLocalVideo(context, internalContext, callId) {
9940
9942
  data: streamLogInfo
9941
9943
  });
9942
9944
  return;
9943
- } // Sets the status and also renderer. I think we need to always set renderer to undefined since in all status when
9944
- // cleaned up should have renderer as undefined. If the status is 'Rendered' and renderer is not defined it should
9945
- // be cleaned up below so we can set it to undefined here.
9946
- if (renderInfo.status === 'Rendering') {
9945
+ } // Nothing to dispose of or clean up -- we can safely exit early here.
9946
+ if (renderInfo.status === 'NotRendered') {
9947
+ _logEvent(callingStatefulLogger, {
9948
+ name: EventNames.LOCAL_STREAM_ALREADY_DISPOSED,
9949
+ level: 'info',
9950
+ message: 'LocalVideoStream is already disposed.'
9951
+ });
9952
+ return;
9953
+ } // Status is already marked as "stopping" so we can exit early here. This is because stopping only occurs
9954
+ // when the stream is being created in createView but hasn't been completed being created yet. The createView
9955
+ // method will see the "stopping" status and perform the cleanup
9956
+ if (renderInfo.status === 'Stopping') {
9947
9957
  _logEvent(callingStatefulLogger, {
9948
9958
  name: EventNames.LOCAL_STREAM_STOPPING,
9949
9959
  level: 'info',
9950
- message: 'Local stream is still rendering. Changing status to stopping.',
9960
+ message: 'Local stream is already stopping.',
9951
9961
  data: streamLogInfo
9952
9962
  });
9953
- internalContext.setLocalRenderInfo(callId, renderInfo.stream, 'Stopping', undefined);
9954
- }
9955
- else {
9956
- internalContext.setLocalRenderInfo(callId, renderInfo.stream, 'NotRendered', undefined);
9957
- }
9963
+ return;
9964
+ } // If the stream is in the middle of being rendered (i.e. has state "Rendering"), we need the status as
9965
+ // "stopping" without performing any cleanup. This will tell the `createView` method that it should stop
9966
+ // rendering and clean up the state once the view has finished being created.
9967
+ if (renderInfo.status === 'Rendering') {
9968
+ _logEvent(callingStatefulLogger, {
9969
+ name: EventNames.REMOTE_STREAM_STOPPING,
9970
+ level: 'info',
9971
+ message: 'Remote stream is still rendering. Changing status to stopping.',
9972
+ data: streamLogInfo
9973
+ });
9974
+ internalContext.setLocalRenderInfo(callId, renderInfo.stream, 'Stopping', renderInfo.renderer);
9975
+ return;
9976
+ } // Else the state must be in the "Rendered" state, so we can dispose the renderer and clean up the state.
9977
+ internalContext.setLocalRenderInfo(callId, renderInfo.stream, 'NotRendered', undefined);
9958
9978
  if (renderInfo.renderer) {
9959
9979
  _logEvent(callingStatefulLogger, {
9960
9980
  name: EventNames.DISPOSING_LOCAL_RENDERER,