@stream-io/video-client 1.12.0 → 1.12.2
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 +17 -0
- package/dist/index.browser.es.js +16 -10
- package/dist/index.browser.es.js.map +1 -1
- package/dist/index.cjs.js +16 -10
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +16 -10
- package/dist/index.es.js.map +1 -1
- package/dist/src/coordinator/connection/types.d.ts +1 -1
- package/package.json +2 -3
- package/src/Call.ts +5 -1
- package/src/StreamVideoClient.ts +2 -3
- package/src/coordinator/connection/types.ts +1 -1
- package/src/timers/worker.build.ts +7 -5
package/dist/index.es.js
CHANGED
|
@@ -3300,7 +3300,7 @@ const retryable = async (rpc, signal) => {
|
|
|
3300
3300
|
return result;
|
|
3301
3301
|
};
|
|
3302
3302
|
|
|
3303
|
-
const version = "1.12.
|
|
3303
|
+
const version = "1.12.2";
|
|
3304
3304
|
const [major, minor, patch] = version.split('.');
|
|
3305
3305
|
let sdkInfo = {
|
|
3306
3306
|
type: SdkType.PLAIN_JAVASCRIPT,
|
|
@@ -6449,14 +6449,16 @@ function lazy(factory) {
|
|
|
6449
6449
|
};
|
|
6450
6450
|
}
|
|
6451
6451
|
|
|
6452
|
+
// Do not modify this file manually. Instead, edit worker.ts
|
|
6453
|
+
// and the run ./generate-timer-worker.sh
|
|
6452
6454
|
const timerWorker = {
|
|
6453
|
-
src: `
|
|
6454
|
-
self.addEventListener('message',
|
|
6455
|
-
|
|
6455
|
+
src: `const timerIdMapping = new Map();
|
|
6456
|
+
self.addEventListener('message', (event) => {
|
|
6457
|
+
const request = event.data;
|
|
6456
6458
|
switch (request.type) {
|
|
6457
6459
|
case 'setTimeout':
|
|
6458
6460
|
case 'setInterval':
|
|
6459
|
-
timerIdMapping.set(request.id, (request.type === 'setTimeout' ? setTimeout : setInterval)(
|
|
6461
|
+
timerIdMapping.set(request.id, (request.type === 'setTimeout' ? setTimeout : setInterval)(() => {
|
|
6460
6462
|
tick(request.id);
|
|
6461
6463
|
if (request.type === 'setTimeout') {
|
|
6462
6464
|
timerIdMapping.delete(request.id);
|
|
@@ -6471,7 +6473,7 @@ self.addEventListener('message', function (event) {
|
|
|
6471
6473
|
}
|
|
6472
6474
|
});
|
|
6473
6475
|
function tick(id) {
|
|
6474
|
-
|
|
6476
|
+
const message = { type: 'tick', id };
|
|
6475
6477
|
self.postMessage(message);
|
|
6476
6478
|
}`,
|
|
6477
6479
|
};
|
|
@@ -10163,8 +10165,12 @@ class Call {
|
|
|
10163
10165
|
}
|
|
10164
10166
|
// update the call state with the latest event data
|
|
10165
10167
|
this.state.updateFromCallResponse(event.call);
|
|
10166
|
-
this.ringingSubject.next(true);
|
|
10167
10168
|
this.watching = true;
|
|
10169
|
+
this.ringingSubject.next(true);
|
|
10170
|
+
// we remove the instance from the calls list to enable the following filter in useCalls hook
|
|
10171
|
+
// const calls = useCalls().filter((c) => c.ringing);
|
|
10172
|
+
const calls = this.clientStore.calls.filter((c) => c.cid !== this.cid);
|
|
10173
|
+
this.clientStore.setCalls([this, ...calls]);
|
|
10168
10174
|
await this.applyDeviceConfig(false);
|
|
10169
10175
|
};
|
|
10170
10176
|
/**
|
|
@@ -12797,7 +12803,7 @@ class StreamClient {
|
|
|
12797
12803
|
return await this.wsConnection.connect(this.defaultWSTimeout);
|
|
12798
12804
|
};
|
|
12799
12805
|
this.getUserAgent = () => {
|
|
12800
|
-
const version = "1.12.
|
|
12806
|
+
const version = "1.12.2";
|
|
12801
12807
|
return (this.userAgent ||
|
|
12802
12808
|
`stream-video-javascript-client-${this.node ? 'node' : 'browser'}-${version}`);
|
|
12803
12809
|
};
|
|
@@ -13218,13 +13224,13 @@ class StreamVideoClient {
|
|
|
13218
13224
|
if (typeof apiKeyOrArgs === 'string') {
|
|
13219
13225
|
logLevel = opts?.logLevel || logLevel;
|
|
13220
13226
|
logger = opts?.logger || logger;
|
|
13221
|
-
if (opts?.
|
|
13227
|
+
if (opts?.enableTimerWorker)
|
|
13222
13228
|
enableTimerWorker();
|
|
13223
13229
|
}
|
|
13224
13230
|
else {
|
|
13225
13231
|
logLevel = apiKeyOrArgs.options?.logLevel || logLevel;
|
|
13226
13232
|
logger = apiKeyOrArgs.options?.logger || logger;
|
|
13227
|
-
if (apiKeyOrArgs.options?.
|
|
13233
|
+
if (apiKeyOrArgs.options?.enableTimerWorker)
|
|
13228
13234
|
enableTimerWorker();
|
|
13229
13235
|
}
|
|
13230
13236
|
setLogger(logger, logLevel);
|