@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/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
## [1.12.2](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.12.1...@stream-io/video-client-1.12.2) (2024-12-11)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
* drop docusaurus docs ([#1613](https://github.com/GetStream/stream-video-js/issues/1613)) ([8743c8d](https://github.com/GetStream/stream-video-js/commit/8743c8d221191759266010c6cd053480da1d71a5))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* pre-built timer worker ([#1617](https://github.com/GetStream/stream-video-js/issues/1617)) ([94dacef](https://github.com/GetStream/stream-video-js/commit/94dacef1c2b1e8794a42657ddab29a3b584eb0b4)), closes [#1557](https://github.com/GetStream/stream-video-js/issues/1557)
|
|
14
|
+
|
|
15
|
+
## [1.12.1](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.12.0...@stream-io/video-client-1.12.1) (2024-12-11)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* reenable usage of ringing filters with useCalls ([1dffaed](https://github.com/GetStream/stream-video-js/commit/1dffaed609ac147a6030a4fb103c4dd586db775e))
|
|
21
|
+
|
|
5
22
|
## [1.12.0](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.11.15...@stream-io/video-client-1.12.0) (2024-12-10)
|
|
6
23
|
|
|
7
24
|
|
package/dist/index.browser.es.js
CHANGED
|
@@ -3299,7 +3299,7 @@ const retryable = async (rpc, signal) => {
|
|
|
3299
3299
|
return result;
|
|
3300
3300
|
};
|
|
3301
3301
|
|
|
3302
|
-
const version = "1.12.
|
|
3302
|
+
const version = "1.12.2";
|
|
3303
3303
|
const [major, minor, patch] = version.split('.');
|
|
3304
3304
|
let sdkInfo = {
|
|
3305
3305
|
type: SdkType.PLAIN_JAVASCRIPT,
|
|
@@ -6448,14 +6448,16 @@ function lazy(factory) {
|
|
|
6448
6448
|
};
|
|
6449
6449
|
}
|
|
6450
6450
|
|
|
6451
|
+
// Do not modify this file manually. Instead, edit worker.ts
|
|
6452
|
+
// and the run ./generate-timer-worker.sh
|
|
6451
6453
|
const timerWorker = {
|
|
6452
|
-
src: `
|
|
6453
|
-
self.addEventListener('message',
|
|
6454
|
-
|
|
6454
|
+
src: `const timerIdMapping = new Map();
|
|
6455
|
+
self.addEventListener('message', (event) => {
|
|
6456
|
+
const request = event.data;
|
|
6455
6457
|
switch (request.type) {
|
|
6456
6458
|
case 'setTimeout':
|
|
6457
6459
|
case 'setInterval':
|
|
6458
|
-
timerIdMapping.set(request.id, (request.type === 'setTimeout' ? setTimeout : setInterval)(
|
|
6460
|
+
timerIdMapping.set(request.id, (request.type === 'setTimeout' ? setTimeout : setInterval)(() => {
|
|
6459
6461
|
tick(request.id);
|
|
6460
6462
|
if (request.type === 'setTimeout') {
|
|
6461
6463
|
timerIdMapping.delete(request.id);
|
|
@@ -6470,7 +6472,7 @@ self.addEventListener('message', function (event) {
|
|
|
6470
6472
|
}
|
|
6471
6473
|
});
|
|
6472
6474
|
function tick(id) {
|
|
6473
|
-
|
|
6475
|
+
const message = { type: 'tick', id };
|
|
6474
6476
|
self.postMessage(message);
|
|
6475
6477
|
}`,
|
|
6476
6478
|
};
|
|
@@ -10162,8 +10164,12 @@ class Call {
|
|
|
10162
10164
|
}
|
|
10163
10165
|
// update the call state with the latest event data
|
|
10164
10166
|
this.state.updateFromCallResponse(event.call);
|
|
10165
|
-
this.ringingSubject.next(true);
|
|
10166
10167
|
this.watching = true;
|
|
10168
|
+
this.ringingSubject.next(true);
|
|
10169
|
+
// we remove the instance from the calls list to enable the following filter in useCalls hook
|
|
10170
|
+
// const calls = useCalls().filter((c) => c.ringing);
|
|
10171
|
+
const calls = this.clientStore.calls.filter((c) => c.cid !== this.cid);
|
|
10172
|
+
this.clientStore.setCalls([this, ...calls]);
|
|
10167
10173
|
await this.applyDeviceConfig(false);
|
|
10168
10174
|
};
|
|
10169
10175
|
/**
|
|
@@ -12798,7 +12804,7 @@ class StreamClient {
|
|
|
12798
12804
|
return await this.wsConnection.connect(this.defaultWSTimeout);
|
|
12799
12805
|
};
|
|
12800
12806
|
this.getUserAgent = () => {
|
|
12801
|
-
const version = "1.12.
|
|
12807
|
+
const version = "1.12.2";
|
|
12802
12808
|
return (this.userAgent ||
|
|
12803
12809
|
`stream-video-javascript-client-${this.node ? 'node' : 'browser'}-${version}`);
|
|
12804
12810
|
};
|
|
@@ -13219,13 +13225,13 @@ class StreamVideoClient {
|
|
|
13219
13225
|
if (typeof apiKeyOrArgs === 'string') {
|
|
13220
13226
|
logLevel = opts?.logLevel || logLevel;
|
|
13221
13227
|
logger = opts?.logger || logger;
|
|
13222
|
-
if (opts?.
|
|
13228
|
+
if (opts?.enableTimerWorker)
|
|
13223
13229
|
enableTimerWorker();
|
|
13224
13230
|
}
|
|
13225
13231
|
else {
|
|
13226
13232
|
logLevel = apiKeyOrArgs.options?.logLevel || logLevel;
|
|
13227
13233
|
logger = apiKeyOrArgs.options?.logger || logger;
|
|
13228
|
-
if (apiKeyOrArgs.options?.
|
|
13234
|
+
if (apiKeyOrArgs.options?.enableTimerWorker)
|
|
13229
13235
|
enableTimerWorker();
|
|
13230
13236
|
}
|
|
13231
13237
|
setLogger(logger, logLevel);
|