@stream-io/video-client 1.44.2 → 1.44.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/CHANGELOG.md +6 -0
- package/dist/index.browser.es.js +9 -4
- package/dist/index.browser.es.js.map +1 -1
- package/dist/index.cjs.js +9 -4
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +9 -4
- package/dist/index.es.js.map +1 -1
- package/dist/src/StreamSfuClient.d.ts +1 -0
- package/package.json +1 -1
- package/src/StreamSfuClient.ts +15 -9
- package/src/rpc/retryable.ts +2 -0
package/dist/index.es.js
CHANGED
|
@@ -4006,6 +4006,8 @@ const retryable = async (rpc, signal, maxRetries = Number.POSITIVE_INFINITY) =>
|
|
|
4006
4006
|
do {
|
|
4007
4007
|
if (attempt > 0)
|
|
4008
4008
|
await sleep(retryInterval(attempt));
|
|
4009
|
+
if (signal?.aborted)
|
|
4010
|
+
throw new Error(signal.reason);
|
|
4009
4011
|
try {
|
|
4010
4012
|
result = await rpc({ attempt });
|
|
4011
4013
|
}
|
|
@@ -6282,7 +6284,7 @@ const getSdkVersion = (sdk) => {
|
|
|
6282
6284
|
return sdk ? `${sdk.major}.${sdk.minor}.${sdk.patch}` : '0.0.0-development';
|
|
6283
6285
|
};
|
|
6284
6286
|
|
|
6285
|
-
const version = "1.44.
|
|
6287
|
+
const version = "1.44.3";
|
|
6286
6288
|
const [major, minor, patch] = version.split('.');
|
|
6287
6289
|
let sdkInfo = {
|
|
6288
6290
|
type: SdkType.PLAIN_JAVASCRIPT,
|
|
@@ -8583,6 +8585,7 @@ class StreamSfuClient {
|
|
|
8583
8585
|
this.isClosingClean = false;
|
|
8584
8586
|
this.pingIntervalInMs = 5 * 1000;
|
|
8585
8587
|
this.unhealthyTimeoutInMs = 15 * 1000;
|
|
8588
|
+
this.subscriptionsConcurrencyTag = Symbol('subscriptionsConcurrencyTag');
|
|
8586
8589
|
/**
|
|
8587
8590
|
* Promise that resolves when the JoinResponse is received.
|
|
8588
8591
|
* Rejects after a certain threshold if the response is not received.
|
|
@@ -8690,8 +8693,10 @@ class StreamSfuClient {
|
|
|
8690
8693
|
this.close(StreamSfuClient.NORMAL_CLOSURE, reason.substring(0, 115));
|
|
8691
8694
|
};
|
|
8692
8695
|
this.updateSubscriptions = async (tracks) => {
|
|
8693
|
-
|
|
8694
|
-
|
|
8696
|
+
return withoutConcurrency(this.subscriptionsConcurrencyTag, async () => {
|
|
8697
|
+
await this.joinTask;
|
|
8698
|
+
return retryable((invocationMeta) => this.rpc.updateSubscriptions({ sessionId: this.sessionId, tracks }, { invocationMeta }), this.abortController.signal);
|
|
8699
|
+
});
|
|
8695
8700
|
};
|
|
8696
8701
|
this.setPublisher = async (data) => {
|
|
8697
8702
|
await this.joinTask;
|
|
@@ -15884,7 +15889,7 @@ class StreamClient {
|
|
|
15884
15889
|
this.getUserAgent = () => {
|
|
15885
15890
|
if (!this.cachedUserAgent) {
|
|
15886
15891
|
const { clientAppIdentifier = {} } = this.options;
|
|
15887
|
-
const { sdkName = 'js', sdkVersion = "1.44.
|
|
15892
|
+
const { sdkName = 'js', sdkVersion = "1.44.3", ...extras } = clientAppIdentifier;
|
|
15888
15893
|
this.cachedUserAgent = [
|
|
15889
15894
|
`stream-video-${sdkName}-v${sdkVersion}`,
|
|
15890
15895
|
...Object.entries(extras).map(([key, value]) => `${key}=${value}`),
|