@stream-io/video-client 1.36.1 → 1.37.0

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
@@ -72,7 +72,6 @@ const FrameRecordingSettingsRequestQualityEnum = {
72
72
  _720P: '720p',
73
73
  _1080P: '1080p',
74
74
  _1440P: '1440p',
75
- _2160P: '2160p',
76
75
  };
77
76
  /**
78
77
  * @export
@@ -168,13 +167,11 @@ const RTMPBroadcastRequestQualityEnum = {
168
167
  _720P: '720p',
169
168
  _1080P: '1080p',
170
169
  _1440P: '1440p',
171
- _2160P: '2160p',
172
170
  PORTRAIT_360X640: 'portrait-360x640',
173
171
  PORTRAIT_480X854: 'portrait-480x854',
174
172
  PORTRAIT_720X1280: 'portrait-720x1280',
175
173
  PORTRAIT_1080X1920: 'portrait-1080x1920',
176
174
  PORTRAIT_1440X2560: 'portrait-1440x2560',
177
- PORTRAIT_2160X3840: 'portrait-2160x3840',
178
175
  };
179
176
  /**
180
177
  * @export
@@ -185,13 +182,11 @@ const RTMPSettingsRequestQualityEnum = {
185
182
  _720P: '720p',
186
183
  _1080P: '1080p',
187
184
  _1440P: '1440p',
188
- _2160P: '2160p',
189
185
  PORTRAIT_360X640: 'portrait-360x640',
190
186
  PORTRAIT_480X854: 'portrait-480x854',
191
187
  PORTRAIT_720X1280: 'portrait-720x1280',
192
188
  PORTRAIT_1080X1920: 'portrait-1080x1920',
193
189
  PORTRAIT_1440X2560: 'portrait-1440x2560',
194
- PORTRAIT_2160X3840: 'portrait-2160x3840',
195
190
  };
196
191
  /**
197
192
  * @export
@@ -210,13 +205,11 @@ const RecordSettingsRequestQualityEnum = {
210
205
  _720P: '720p',
211
206
  _1080P: '1080p',
212
207
  _1440P: '1440p',
213
- _2160P: '2160p',
214
208
  PORTRAIT_360X640: 'portrait-360x640',
215
209
  PORTRAIT_480X854: 'portrait-480x854',
216
210
  PORTRAIT_720X1280: 'portrait-720x1280',
217
211
  PORTRAIT_1080X1920: 'portrait-1080x1920',
218
212
  PORTRAIT_1440X2560: 'portrait-1440x2560',
219
- PORTRAIT_2160X3840: 'portrait-2160x3840',
220
213
  };
221
214
  /**
222
215
  * @export
@@ -5996,7 +5989,7 @@ const getSdkVersion = (sdk) => {
5996
5989
  return sdk ? `${sdk.major}.${sdk.minor}.${sdk.patch}` : '0.0.0-development';
5997
5990
  };
5998
5991
 
5999
- const version = "1.36.1";
5992
+ const version = "1.37.0";
6000
5993
  const [major, minor, patch] = version.split('.');
6001
5994
  let sdkInfo = {
6002
5995
  type: SdkType.PLAIN_JAVASCRIPT,
@@ -12125,6 +12118,7 @@ class Call {
12125
12118
  * @param params.ring if set to true, a `call.ring` event will be sent to the call members.
12126
12119
  * @param params.notify if set to true, a `call.notification` event will be sent to the call members.
12127
12120
  * @param params.members_limit the total number of members to return as part of the response.
12121
+ * @param params.video if set to true, in a ringing scenario, mobile SDKs will show "incoming video call", audio only otherwise.
12128
12122
  */
12129
12123
  this.get = async (params) => {
12130
12124
  await this.setup();
@@ -12178,11 +12172,11 @@ class Call {
12178
12172
  return this.streamClient.post(`${this.streamClientBasePath}/delete`, data);
12179
12173
  };
12180
12174
  /**
12181
- * A shortcut for {@link Call.get} with `ring` parameter set to `true`.
12182
- * Will send a `call.ring` event to the call members.
12175
+ * Sends a ring notification to the provided users who are not already in the call.
12176
+ * All users should be members of the call.
12183
12177
  */
12184
- this.ring = async () => {
12185
- return await this.get({ ring: true });
12178
+ this.ring = async (data = {}) => {
12179
+ return this.streamClient.post(`${this.streamClientBasePath}/ring`, data);
12186
12180
  };
12187
12181
  /**
12188
12182
  * A shortcut for {@link Call.get} with `notify` parameter set to `true`.
@@ -14897,7 +14891,7 @@ class StreamClient {
14897
14891
  this.getUserAgent = () => {
14898
14892
  if (!this.cachedUserAgent) {
14899
14893
  const { clientAppIdentifier = {} } = this.options;
14900
- const { sdkName = 'js', sdkVersion = "1.36.1", ...extras } = clientAppIdentifier;
14894
+ const { sdkName = 'js', sdkVersion = "1.37.0", ...extras } = clientAppIdentifier;
14901
14895
  this.cachedUserAgent = [
14902
14896
  `stream-video-${sdkName}-v${sdkVersion}`,
14903
14897
  ...Object.entries(extras).map(([key, value]) => `${key}=${value}`),
@@ -15117,10 +15111,6 @@ class StreamVideoClient {
15117
15111
  * @param e the event.
15118
15112
  */
15119
15113
  this.initCallFromEvent = async (e) => {
15120
- if (this.state.connectedUser?.id === e.call.created_by.id) {
15121
- this.logger.debug(`Ignoring ${e.type} event sent by the current user`);
15122
- return;
15123
- }
15124
15114
  try {
15125
15115
  const concurrencyTag = getCallInitConcurrencyTag(e.call_cid);
15126
15116
  await withoutConcurrency(concurrencyTag, async () => {
@@ -15434,12 +15424,12 @@ class StreamVideoClient {
15434
15424
  this.shouldRejectCall = (currentCallId) => {
15435
15425
  if (!this.rejectCallWhenBusy)
15436
15426
  return false;
15437
- const hasOngoingRingingCall = this.state.calls.some((c) => c.cid !== currentCallId &&
15427
+ return this.state.calls.some((c) => c.cid !== currentCallId &&
15438
15428
  c.ringing &&
15429
+ !c.isCreatedByMe &&
15439
15430
  c.state.callingState !== exports.CallingState.IDLE &&
15440
15431
  c.state.callingState !== exports.CallingState.LEFT &&
15441
15432
  c.state.callingState !== exports.CallingState.RECONNECTING_FAILED);
15442
- return hasOngoingRingingCall;
15443
15433
  };
15444
15434
  const apiKey = typeof apiKeyOrArgs === 'string' ? apiKeyOrArgs : apiKeyOrArgs.apiKey;
15445
15435
  const clientOptions = typeof apiKeyOrArgs === 'string' ? opts : apiKeyOrArgs.options;