@stream-io/video-client 0.7.12 → 0.7.13

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stream-io/video-client",
3
- "version": "0.7.12",
3
+ "version": "0.7.13",
4
4
  "packageManager": "yarn@3.2.4",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.es.js",
@@ -34,7 +34,7 @@ import {
34
34
  sleep,
35
35
  } from './coordinator/connection/utils';
36
36
  import { SFUResponse } from './gen/coordinator';
37
- import { Logger } from './coordinator/connection/types';
37
+ import { LogLevel, Logger } from './coordinator/connection/types';
38
38
  import { getLogger } from './logger';
39
39
 
40
40
  export type StreamSfuClientConstructor = {
@@ -228,6 +228,7 @@ export class StreamSfuClient {
228
228
  tracks: subscriptions,
229
229
  }),
230
230
  this.logger,
231
+ 'debug',
231
232
  );
232
233
  };
233
234
 
@@ -307,6 +308,7 @@ export class StreamSfuClient {
307
308
  sessionId: this.sessionId,
308
309
  }),
309
310
  this.logger,
311
+ 'debug',
310
312
  );
311
313
  };
312
314
 
@@ -421,6 +423,7 @@ const MAX_RETRIES = 5;
421
423
  const retryable = async <I extends object, O extends SfuResponseWithError>(
422
424
  rpc: () => UnaryCall<I, O>,
423
425
  logger: Logger,
426
+ level: LogLevel = 'error',
424
427
  ) => {
425
428
  let retryAttempt = 0;
426
429
  let rpcCallResult: FinishedUnaryCall<I, O>;
@@ -431,16 +434,11 @@ const retryable = async <I extends object, O extends SfuResponseWithError>(
431
434
  }
432
435
 
433
436
  rpcCallResult = await rpc();
434
- logger(
435
- 'trace',
436
- `SFU RPC response received for ${rpcCallResult.method.name}`,
437
- rpcCallResult,
438
- );
439
437
 
440
438
  // if the RPC call failed, log the error and retry
441
439
  if (rpcCallResult.response.error) {
442
440
  logger(
443
- 'error',
441
+ level,
444
442
  `SFU RPC Error (${rpcCallResult.method.name}):`,
445
443
  rpcCallResult.response.error,
446
444
  );