@stream-io/video-client 1.42.2 → 1.42.3

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/index.cjs.js CHANGED
@@ -6251,7 +6251,7 @@ const getSdkVersion = (sdk) => {
6251
6251
  return sdk ? `${sdk.major}.${sdk.minor}.${sdk.patch}` : '0.0.0-development';
6252
6252
  };
6253
6253
 
6254
- const version = "1.42.2";
6254
+ const version = "1.42.3";
6255
6255
  const [major, minor, patch] = version.split('.');
6256
6256
  let sdkInfo = {
6257
6257
  type: SdkType.PLAIN_JAVASCRIPT,
@@ -12466,6 +12466,7 @@ class Call {
12466
12466
  this.hasJoinedOnce = false;
12467
12467
  this.deviceSettingsAppliedOnce = false;
12468
12468
  this.initialized = false;
12469
+ this.acceptRejectConcurrencyTag = Symbol('acceptRejectTag');
12469
12470
  this.joinLeaveConcurrencyTag = Symbol('joinLeaveConcurrencyTag');
12470
12471
  /**
12471
12472
  * A list hooks/functions to invoke when the call is left.
@@ -12880,8 +12881,10 @@ class Call {
12880
12881
  * Unless you are implementing a custom "ringing" flow, you should not use this method.
12881
12882
  */
12882
12883
  this.accept = async () => {
12883
- this.tracer.trace('call.accept', '');
12884
- return this.streamClient.post(`${this.streamClientBasePath}/accept`);
12884
+ return withoutConcurrency(this.acceptRejectConcurrencyTag, () => {
12885
+ this.tracer.trace('call.accept', '');
12886
+ return this.streamClient.post(`${this.streamClientBasePath}/accept`);
12887
+ });
12885
12888
  };
12886
12889
  /**
12887
12890
  * Marks the incoming call as rejected.
@@ -12893,8 +12896,10 @@ class Call {
12893
12896
  * @param reason the reason for rejecting the call.
12894
12897
  */
12895
12898
  this.reject = async (reason = 'decline') => {
12896
- this.tracer.trace('call.reject', reason);
12897
- return this.streamClient.post(`${this.streamClientBasePath}/reject`, { reason: reason });
12899
+ return withoutConcurrency(this.acceptRejectConcurrencyTag, () => {
12900
+ this.tracer.trace('call.reject', reason);
12901
+ return this.streamClient.post(`${this.streamClientBasePath}/reject`, { reason });
12902
+ });
12898
12903
  };
12899
12904
  /**
12900
12905
  * Will start to watch for call related WebSocket events and initiate a call session with the server.
@@ -15614,7 +15619,7 @@ class StreamClient {
15614
15619
  this.getUserAgent = () => {
15615
15620
  if (!this.cachedUserAgent) {
15616
15621
  const { clientAppIdentifier = {} } = this.options;
15617
- const { sdkName = 'js', sdkVersion = "1.42.2", ...extras } = clientAppIdentifier;
15622
+ const { sdkName = 'js', sdkVersion = "1.42.3", ...extras } = clientAppIdentifier;
15618
15623
  this.cachedUserAgent = [
15619
15624
  `stream-video-${sdkName}-v${sdkVersion}`,
15620
15625
  ...Object.entries(extras).map(([key, value]) => `${key}=${value}`),