@stream-io/video-client 1.23.0 → 1.23.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 +12 -0
- package/dist/index.browser.es.js +17 -30
- package/dist/index.browser.es.js.map +1 -1
- package/dist/index.cjs.js +17 -30
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +17 -30
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
- package/src/devices/MicrophoneManager.ts +0 -10
- package/src/rpc/__tests__/createClient.test.ts +29 -20
- package/src/rpc/createClient.ts +22 -17
package/dist/index.cjs.js
CHANGED
|
@@ -3413,22 +3413,18 @@ const withHeaders = (headers) => {
|
|
|
3413
3413
|
const withRequestLogger = (logger, level) => {
|
|
3414
3414
|
return {
|
|
3415
3415
|
interceptUnary: (next, method, input, options) => {
|
|
3416
|
-
|
|
3417
|
-
|
|
3418
|
-
invocation
|
|
3419
|
-
|
|
3420
|
-
|
|
3421
|
-
|
|
3422
|
-
request: invocation?.request,
|
|
3423
|
-
headers: invocation?.requestHeaders,
|
|
3424
|
-
response: invocation?.response,
|
|
3425
|
-
});
|
|
3426
|
-
}
|
|
3416
|
+
const invocation = next(method, input, options);
|
|
3417
|
+
logger(level, `Invoked SFU RPC method ${method.name}`, {
|
|
3418
|
+
request: invocation.request,
|
|
3419
|
+
headers: invocation.requestHeaders,
|
|
3420
|
+
response: invocation.response,
|
|
3421
|
+
});
|
|
3427
3422
|
return invocation;
|
|
3428
3423
|
},
|
|
3429
3424
|
};
|
|
3430
3425
|
};
|
|
3431
3426
|
const withRequestTracer = (trace) => {
|
|
3427
|
+
const traceError = (name, input, err) => trace(`${name}OnFailure`, [err, input]);
|
|
3432
3428
|
const exclusions = {
|
|
3433
3429
|
SendStats: true,
|
|
3434
3430
|
};
|
|
@@ -3437,14 +3433,14 @@ const withRequestTracer = (trace) => {
|
|
|
3437
3433
|
if (exclusions[method.name]) {
|
|
3438
3434
|
return next(method, input, options);
|
|
3439
3435
|
}
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
|
|
3443
|
-
|
|
3444
|
-
|
|
3445
|
-
|
|
3446
|
-
|
|
3447
|
-
|
|
3436
|
+
trace(method.name, input);
|
|
3437
|
+
const unaryCall = next(method, input, options);
|
|
3438
|
+
unaryCall.then((invocation) => {
|
|
3439
|
+
const err = invocation.response?.error;
|
|
3440
|
+
if (err)
|
|
3441
|
+
traceError(method.name, input, err);
|
|
3442
|
+
}, (err) => traceError(method.name, input, err));
|
|
3443
|
+
return unaryCall;
|
|
3448
3444
|
},
|
|
3449
3445
|
};
|
|
3450
3446
|
};
|
|
@@ -5682,7 +5678,7 @@ const aggregate = (stats) => {
|
|
|
5682
5678
|
return report;
|
|
5683
5679
|
};
|
|
5684
5680
|
|
|
5685
|
-
const version = "1.23.
|
|
5681
|
+
const version = "1.23.2";
|
|
5686
5682
|
const [major, minor, patch] = version.split('.');
|
|
5687
5683
|
let sdkInfo = {
|
|
5688
5684
|
type: SdkType.PLAIN_JAVASCRIPT,
|
|
@@ -10406,15 +10402,6 @@ class MicrophoneManager extends InputMediaDeviceManager {
|
|
|
10406
10402
|
this.noiseCancellationRegistration = Promise.resolve();
|
|
10407
10403
|
}
|
|
10408
10404
|
else {
|
|
10409
|
-
// Krisp recommends disabling the browser's built-in noise cancellation
|
|
10410
|
-
// and echo cancellation when using Krisp, so we do that here.
|
|
10411
|
-
// https://sdk-docs.krisp.ai/docs/getting-started-js
|
|
10412
|
-
this.setDefaultConstraints({
|
|
10413
|
-
...this.state.defaultConstraints,
|
|
10414
|
-
echoCancellation: false,
|
|
10415
|
-
noiseSuppression: false,
|
|
10416
|
-
autoGainControl: false,
|
|
10417
|
-
});
|
|
10418
10405
|
const registrationResult = this.registerFilter(noiseCancellation.toFilter());
|
|
10419
10406
|
this.noiseCancellationRegistration = registrationResult.registered;
|
|
10420
10407
|
this.unregisterNoiseCancellation = registrationResult.unregister;
|
|
@@ -13796,7 +13783,7 @@ class StreamClient {
|
|
|
13796
13783
|
this.getUserAgent = () => {
|
|
13797
13784
|
if (!this.cachedUserAgent) {
|
|
13798
13785
|
const { clientAppIdentifier = {} } = this.options;
|
|
13799
|
-
const { sdkName = 'js', sdkVersion = "1.23.
|
|
13786
|
+
const { sdkName = 'js', sdkVersion = "1.23.2", ...extras } = clientAppIdentifier;
|
|
13800
13787
|
this.cachedUserAgent = [
|
|
13801
13788
|
`stream-video-${sdkName}-v${sdkVersion}`,
|
|
13802
13789
|
...Object.entries(extras).map(([key, value]) => `${key}=${value}`),
|