@stream-io/video-client 0.0.16 → 0.0.18
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 +14 -0
- package/dist/index.browser.es.js +7 -3
- package/dist/index.browser.es.js.map +1 -1
- package/dist/index.cjs.js +7 -3
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +7 -3
- package/dist/index.es.js.map +1 -1
- package/dist/src/StreamVideoClient.d.ts +2 -1
- package/package.json +1 -1
- package/src/StreamVideoClient.ts +6 -2
package/dist/index.es.js
CHANGED
|
@@ -11083,7 +11083,7 @@ class StreamClient {
|
|
|
11083
11083
|
}
|
|
11084
11084
|
getUserAgent() {
|
|
11085
11085
|
return (this.userAgent ||
|
|
11086
|
-
`stream-video-javascript-client-${this.node ? 'node' : 'browser'}-${"0.0.
|
|
11086
|
+
`stream-video-javascript-client-${this.node ? 'node' : 'browser'}-${"0.0.17"}`);
|
|
11087
11087
|
}
|
|
11088
11088
|
setUserAgent(userAgent) {
|
|
11089
11089
|
this.userAgent = userAgent;
|
|
@@ -11204,13 +11204,15 @@ class StreamVideoClient {
|
|
|
11204
11204
|
*
|
|
11205
11205
|
* @param type the type of the call.
|
|
11206
11206
|
* @param id the id of the call, if not provided a unique random value is used
|
|
11207
|
+
* @param {boolean} [ringing] whether the call should be created in the ringing state.
|
|
11207
11208
|
*/
|
|
11208
|
-
this.call = (type, id) => {
|
|
11209
|
+
this.call = (type, id, ringing) => {
|
|
11209
11210
|
return new Call({
|
|
11210
11211
|
streamClient: this.streamClient,
|
|
11211
11212
|
id: id,
|
|
11212
11213
|
type: type,
|
|
11213
11214
|
clientStore: this.writeableStateStore,
|
|
11215
|
+
ringing,
|
|
11214
11216
|
});
|
|
11215
11217
|
};
|
|
11216
11218
|
/**
|
|
@@ -11331,7 +11333,7 @@ class StreamVideoClient {
|
|
|
11331
11333
|
this.logLevel = ((_a = apiKeyOrArgs.options) === null || _a === void 0 ? void 0 : _a.logLevel) || this.logLevel;
|
|
11332
11334
|
this.logger = ((_b = apiKeyOrArgs.options) === null || _b === void 0 ? void 0 : _b.logger) || defaultLogger;
|
|
11333
11335
|
}
|
|
11334
|
-
setLogger(this.filterLogs(
|
|
11336
|
+
setLogger(this.filterLogs(this.logger));
|
|
11335
11337
|
const clientLogger = getLogger(['client']);
|
|
11336
11338
|
if (typeof apiKeyOrArgs === 'string') {
|
|
11337
11339
|
this.streamClient = new StreamClient(apiKeyOrArgs, Object.assign(Object.assign({ persistUserOnConnectionFailure: true }, opts), { logLevel: this.logLevel, logger: clientLogger }));
|
|
@@ -11433,6 +11435,7 @@ class StreamVideoClient {
|
|
|
11433
11435
|
// if `call.created` was received before `call.ring`.
|
|
11434
11436
|
// In that case, we cleanup the already tracked call.
|
|
11435
11437
|
const prevCall = this.writeableStateStore.findCall(call.type, call.id);
|
|
11438
|
+
const prevMetadata = prevCall === null || prevCall === void 0 ? void 0 : prevCall.state.metadata;
|
|
11436
11439
|
yield (prevCall === null || prevCall === void 0 ? void 0 : prevCall.leave());
|
|
11437
11440
|
// we create a new call
|
|
11438
11441
|
const theCall = new Call({
|
|
@@ -11442,6 +11445,7 @@ class StreamVideoClient {
|
|
|
11442
11445
|
members,
|
|
11443
11446
|
clientStore: this.writeableStateStore,
|
|
11444
11447
|
ringing: true,
|
|
11448
|
+
metadata: prevMetadata,
|
|
11445
11449
|
});
|
|
11446
11450
|
// we fetch the latest metadata for the call from the server
|
|
11447
11451
|
yield theCall.get();
|