@livedigital/client 2.38.0-debug-noise.1 → 2.38.0

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.
Files changed (59) hide show
  1. package/dist/{src/EnhancedEventEmitter.d.ts → EnhancedEventEmitter.d.ts} +0 -0
  2. package/dist/{src/constants → constants}/common.d.ts +0 -0
  3. package/dist/{src/constants/simulcastEncodings.d.ts → constants/encodings.d.ts} +4 -0
  4. package/dist/{src/constants → constants}/events.d.ts +0 -0
  5. package/dist/{src/constants → constants}/videoConstrains.d.ts +0 -0
  6. package/dist/{src/engine → engine}/DefaultEngineDependenciesFactory.d.ts +0 -0
  7. package/dist/{src/engine → engine}/Logger.d.ts +0 -0
  8. package/dist/{src/engine → engine}/Peer.d.ts +0 -0
  9. package/dist/{src/engine → engine}/PeerConsumer.d.ts +0 -0
  10. package/dist/{src/engine → engine}/PeerProducer.d.ts +0 -0
  11. package/dist/{src/engine → engine}/handlers/ChannelEventHandler.d.ts +0 -0
  12. package/dist/{src/engine → engine}/handlers/MediaSoupEventHandler.d.ts +0 -0
  13. package/dist/{src/engine → engine}/index.d.ts +0 -0
  14. package/dist/{src/engine → engine}/media/index.d.ts +0 -0
  15. package/dist/{src/engine → engine}/media/tracks/AudioTrack.d.ts +2 -0
  16. package/dist/{src/engine → engine}/media/tracks/BaseTrack.d.ts +0 -0
  17. package/dist/{src/engine → engine}/media/tracks/MediaStreamTrackManager.d.ts +0 -0
  18. package/dist/{src/engine → engine}/media/tracks/PeerTrack.d.ts +0 -0
  19. package/dist/{src/engine → engine}/media/tracks/TrackWithCodecOptions.d.ts +0 -0
  20. package/dist/{src/engine → engine}/media/tracks/TrackWithEncodings.d.ts +0 -0
  21. package/dist/{src/engine → engine}/media/tracks/VideoTrack.d.ts +0 -0
  22. package/dist/{src/engine → engine}/network/LoadBalancerClient.d.ts +0 -0
  23. package/dist/{src/engine → engine}/network/Socket.d.ts +0 -0
  24. package/dist/{src/engine → engine}/network/index.d.ts +0 -0
  25. package/dist/{src/engine → engine}/system/index.d.ts +1 -1
  26. package/dist/{src/errors → errors}/LivedigitalSDKError.d.ts +0 -0
  27. package/dist/{src/errors → errors}/UnsupportedError.d.ts +0 -0
  28. package/dist/{src/helpers → helpers}/appDataValidator.d.ts +0 -0
  29. package/dist/{src/helpers → helpers}/datetime.d.ts +0 -0
  30. package/dist/{src/helpers → helpers}/filterStatsCodecs.d.ts +0 -0
  31. package/dist/{src/helpers → helpers}/retry.d.ts +0 -0
  32. package/dist/{src/index.d.ts → index.d.ts} +0 -0
  33. package/dist/index.es.js +1 -1
  34. package/dist/index.js +1 -1
  35. package/dist/{src/types → types}/common.d.ts +4 -1
  36. package/dist/{src/types → types}/engine.d.ts +0 -0
  37. package/dist/{src/types → types}/network.d.ts +0 -0
  38. package/package.json +3 -3
  39. package/src/constants/{simulcastEncodings.ts → encodings.ts} +2 -0
  40. package/src/engine/media/index.ts +1 -1
  41. package/src/engine/media/tracks/AudioTrack.ts +9 -1
  42. package/src/engine/media/tracks/BaseTrack.ts +3 -3
  43. package/src/engine/media/tracks/PeerTrack.ts +3 -3
  44. package/src/engine/media/tracks/VideoTrack.ts +1 -1
  45. package/src/engine/system/index.ts +11 -5
  46. package/src/types/common.ts +3 -0
  47. package/dist/node_modules/mediasoup-client/src/Consumer.d.ts +0 -114
  48. package/dist/node_modules/mediasoup-client/src/DataConsumer.d.ts +0 -93
  49. package/dist/node_modules/mediasoup-client/src/DataProducer.d.ts +0 -97
  50. package/dist/node_modules/mediasoup-client/src/EnhancedEventEmitter.d.ts +0 -7
  51. package/dist/node_modules/mediasoup-client/src/Logger.d.ts +0 -10
  52. package/dist/node_modules/mediasoup-client/src/Producer.d.ts +0 -151
  53. package/dist/node_modules/mediasoup-client/src/RtpParameters.d.ts +0 -305
  54. package/dist/node_modules/mediasoup-client/src/SctpParameters.d.ts +0 -67
  55. package/dist/node_modules/mediasoup-client/src/Transport.d.ts +0 -212
  56. package/dist/node_modules/mediasoup-client/src/errors.d.ts +0 -12
  57. package/dist/node_modules/mediasoup-client/src/handlers/HandlerInterface.d.ts +0 -84
  58. package/dist/node_modules/mediasoup-client/src/ortc.d.ts +0 -122
  59. package/dist/node_modules/mediasoup-client/src/utils.d.ts +0 -8
@@ -117,7 +117,9 @@ export declare type VideoEncoderConfig = EncoderConfig & {
117
117
  };
118
118
  export declare type AudioEncoderConfig = EncoderConfig & {
119
119
  preferredCodec?: AudioCodec;
120
+ encodings?: RtpEncodingParameters[];
120
121
  enableFec?: boolean;
122
+ enableDtx?: boolean;
121
123
  };
122
124
  export declare type CreateTrackOptions = {
123
125
  stopTrackOnPause?: boolean;
@@ -230,7 +232,8 @@ export declare enum DeviceErrors {
230
232
  NotFoundError = "NotFoundError",
231
233
  NoDevices = "NoDevices",
232
234
  DeviceIsBusy = "DeviceIsBusy",
233
- NotAllowedError = "NotAllowedError"
235
+ NotAllowedError = "NotAllowedError",
236
+ RequestDevicesUnknownError = "RequestDevicesUnknownError"
234
237
  }
235
238
  export declare type TrackInboundStats = {
236
239
  consumerId: string;
File without changes
File without changes
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@livedigital/client",
3
3
  "author": "vlprojects",
4
4
  "license": "MIT",
5
- "version": "2.38.0-debug-noise.1",
5
+ "version": "2.38.0",
6
6
  "private": false,
7
7
  "bugs": {
8
8
  "url": "https://github.com/vlprojects/livedigital-sdk/issues"
@@ -86,11 +86,11 @@
86
86
  "faker": "^5.5.3",
87
87
  "mocha": "^10.2.0",
88
88
  "nyc": "^15.1.0",
89
- "rollup": "^2.79.1",
89
+ "rollup": "^2.57.0",
90
90
  "rollup-plugin-analyzer": "^4.0.0",
91
91
  "rollup-plugin-peer-deps-external": "^2.2.4",
92
92
  "rollup-plugin-terser": "^7.0.2",
93
- "rollup-plugin-typescript2": "^0.34.1",
93
+ "rollup-plugin-typescript2": "^0.31.2",
94
94
  "sinon": "^12.0.1",
95
95
  "sinon-chai": "^3.7.0",
96
96
  "ts-node": "^10.4.0",
@@ -22,3 +22,5 @@ export const SCREEN_SHARING_SIMULCAST_ENCODINGS = [
22
22
  dtx: true,
23
23
  },
24
24
  ];
25
+
26
+ export const AUDIO_ENCODINGS = [{ maxBitrate: 40_000, dtx: true }];
@@ -13,7 +13,7 @@ import {
13
13
  } from '../../types/common';
14
14
  import Logger from '../Logger';
15
15
  import { VIDEO_CONSTRAINS } from '../../constants/videoConstrains';
16
- import { SCREEN_SHARING_SIMULCAST_ENCODINGS, WEBCAM_SIMULCAST_ENCODINGS } from '../../constants/simulcastEncodings';
16
+ import { SCREEN_SHARING_SIMULCAST_ENCODINGS, WEBCAM_SIMULCAST_ENCODINGS } from '../../constants/encodings';
17
17
  import { CreateMediaParams } from '../../types/engine';
18
18
  import Engine from '../index';
19
19
  import EnhancedEventEmitter from '../../EnhancedEventEmitter';
@@ -1,17 +1,24 @@
1
1
  import { ProducerCodecOptions } from 'mediasoup-client/lib/Producer';
2
+ import { RtpEncodingParameters } from 'mediasoup-client/lib/RtpParameters';
2
3
  import { AudioCodec, AudioEncoderConfig } from '../../../types/common';
3
4
  import BaseTrack from './BaseTrack';
4
5
  import TrackWithCodecOptions from './TrackWithCodecOptions';
5
6
  import { INTERNAL_CLIENT_EVENTS } from '../../../constants/events';
7
+ import { AUDIO_ENCODINGS } from '../../../constants/encodings';
6
8
 
7
9
  class AudioTrack extends BaseTrack implements TrackWithCodecOptions {
8
10
  getEncoderConfig(): AudioEncoderConfig {
9
11
  return this.encoderConfig;
10
12
  }
11
13
 
14
+ getEncodings(): RtpEncodingParameters[] {
15
+ return this.getEncoderConfig().encodings ?? AUDIO_ENCODINGS;
16
+ }
17
+
12
18
  getCodecOptions(): ProducerCodecOptions {
13
19
  return {
14
- opusFec: this.getEncoderConfig().enableFec || true,
20
+ opusFec: this.getEncoderConfig().enableFec ?? true,
21
+ opusDtx: this.getEncoderConfig().enableDtx ?? true,
15
22
  };
16
23
  }
17
24
 
@@ -26,6 +33,7 @@ class AudioTrack extends BaseTrack implements TrackWithCodecOptions {
26
33
 
27
34
  async publish(): Promise<void> {
28
35
  await this.produce({
36
+ encodings: this.getEncodings(),
29
37
  preferredCodec: this.getPreferredCodec(),
30
38
  codecOptions: this.getCodecOptions(),
31
39
  });
@@ -341,7 +341,7 @@ class BaseTrack {
341
341
  }
342
342
 
343
343
  this.setProducer(producer);
344
- // this.checkProducerState();
344
+ this.checkProducerState();
345
345
 
346
346
  if (this.kind === 'video') {
347
347
  await producer.setMaxSpatialLayer(maxSpatialLayer);
@@ -367,7 +367,7 @@ class BaseTrack {
367
367
  return;
368
368
  }
369
369
 
370
- // await this.cancelProducerCheckState();
370
+ await this.cancelProducerCheckState();
371
371
  await this.closeProducer();
372
372
  this.#mediaStreamTrack.stop();
373
373
  this.clientEventEmitter.emit(INTERNAL_CLIENT_EVENTS.trackUnproduced, this);
@@ -396,7 +396,7 @@ class BaseTrack {
396
396
  }
397
397
 
398
398
  try {
399
- // await this.cancelProducerCheckState();
399
+ await this.cancelProducerCheckState();
400
400
  await this.pauseRemoteProducer(this.producer.id);
401
401
  this.producer.pause();
402
402
  this.logger.debug('pause()', { track: this });
@@ -107,7 +107,7 @@ class PeerTrack {
107
107
  }
108
108
 
109
109
  await this.closeConsumer();
110
- // this.clearCheckStateTimeout();
110
+ this.clearCheckStateTimeout();
111
111
  }
112
112
 
113
113
  public async mute(): Promise<void> {
@@ -185,7 +185,7 @@ class PeerTrack {
185
185
  }
186
186
 
187
187
  this.consumer.resume();
188
- // this.checkConsumerState();
188
+ this.checkConsumerState();
189
189
  this.#logger.debug('resumeConsumer()', { track: this, peer: this });
190
190
  } catch (error) {
191
191
  this.#logger.warn('resumeConsumer()', { error });
@@ -198,7 +198,7 @@ class PeerTrack {
198
198
  }
199
199
 
200
200
  try {
201
- // this.clearCheckStateTimeout();
201
+ this.clearCheckStateTimeout();
202
202
  if (pauseRemote) {
203
203
  await this.#engine.network.pauseRemoteConsumer(this.consumer.id);
204
204
  }
@@ -1,6 +1,6 @@
1
1
  import { ProducerCodecOptions } from 'mediasoup-client/lib/Producer';
2
2
  import { RtpEncodingParameters } from 'mediasoup-client/lib/RtpParameters';
3
- import { WEBCAM_SIMULCAST_ENCODINGS } from '../../../constants/simulcastEncodings';
3
+ import { WEBCAM_SIMULCAST_ENCODINGS } from '../../../constants/encodings';
4
4
  import {
5
5
  TrackLabel, TrackPublishParams, VideoCodec, VideoEncoderConfig,
6
6
  } from '../../../types/common';
@@ -49,10 +49,12 @@ class System {
49
49
  this.availableAudioDevices = availableAudioDevices;
50
50
  }
51
51
 
52
- async requestMediaDevicesAccess(constraints: MediaStreamConstraints = { video: true, audio: true }): Promise<void> {
52
+ async requestMediaDevicesAccess(
53
+ constraints: MediaStreamConstraints = { video: true, audio: true },
54
+ ): Promise<MediaStreamTrack[]> {
53
55
  try {
54
56
  const stream = await navigator.mediaDevices.getUserMedia(constraints);
55
- stream.getTracks().forEach((track) => track.stop());
57
+ return stream.getTracks();
56
58
  } catch (error) {
57
59
  this.logger.error('getUserMedia()', { error, constraints });
58
60
 
@@ -67,6 +69,8 @@ class System {
67
69
  if (error.name === 'NotFoundError') {
68
70
  throw new Error(DeviceErrors.NotFoundError);
69
71
  }
72
+
73
+ throw new Error(DeviceErrors.RequestDevicesUnknownError);
70
74
  }
71
75
  }
72
76
 
@@ -101,25 +105,26 @@ class System {
101
105
  }
102
106
 
103
107
  async detectDevices(): Promise<void> {
108
+ let tracks: MediaStreamTrack[] = [];
104
109
  if (this.isDevicesDetected) {
105
110
  return;
106
111
  }
107
112
 
108
113
  try {
109
- await this.requestMediaDevicesAccess();
114
+ tracks = await this.requestMediaDevicesAccess();
110
115
  } catch (errorVideoAndAudio) {
111
116
  if (![DeviceErrors.NotFoundError, DeviceErrors.NotAllowedError].includes(errorVideoAndAudio.message)) {
112
117
  throw errorVideoAndAudio;
113
118
  }
114
119
 
115
120
  try {
116
- await this.requestMediaDevicesAccess({ audio: true });
121
+ tracks = await this.requestMediaDevicesAccess({ audio: true });
117
122
  } catch (errorAudioOnly) {
118
123
  if (![DeviceErrors.NotFoundError, DeviceErrors.NotAllowedError].includes(errorAudioOnly.message)) {
119
124
  throw errorAudioOnly;
120
125
  }
121
126
 
122
- await this.requestMediaDevicesAccess({ video: true });
127
+ tracks = await this.requestMediaDevicesAccess({ video: true });
123
128
  }
124
129
  }
125
130
 
@@ -128,6 +133,7 @@ class System {
128
133
  // at this moment or access to device granted or no devices exists
129
134
 
130
135
  const rawDevices = await this.refreshAvailableMediaDevicesList();
136
+ tracks.forEach((track) => track.stop());
131
137
  const hasAudioInputDevices = rawDevices.some((x) => x.kind === 'audioinput');
132
138
  const hasVideoInputDevices = rawDevices.some((x) => x.kind === 'videoinput');
133
139
 
@@ -143,7 +143,9 @@ export type VideoEncoderConfig = EncoderConfig & {
143
143
 
144
144
  export type AudioEncoderConfig = EncoderConfig & {
145
145
  preferredCodec?: AudioCodec,
146
+ encodings?: RtpEncodingParameters[],
146
147
  enableFec?: boolean;
148
+ enableDtx?: boolean;
147
149
  };
148
150
 
149
151
  export type CreateTrackOptions = {
@@ -286,6 +288,7 @@ export enum DeviceErrors {
286
288
  NoDevices = 'NoDevices',
287
289
  DeviceIsBusy = 'DeviceIsBusy',
288
290
  NotAllowedError = 'NotAllowedError',
291
+ RequestDevicesUnknownError = 'RequestDevicesUnknownError',
289
292
  }
290
293
 
291
294
  export type TrackInboundStats = {
@@ -1,114 +0,0 @@
1
- import { EnhancedEventEmitter } from './EnhancedEventEmitter';
2
- import { RtpParameters } from './RtpParameters';
3
- export declare type ConsumerOptions = {
4
- id?: string;
5
- producerId?: string;
6
- kind?: 'audio' | 'video';
7
- rtpParameters: RtpParameters;
8
- appData?: any;
9
- };
10
- export declare class Consumer extends EnhancedEventEmitter {
11
- private readonly _id;
12
- private readonly _localId;
13
- private readonly _producerId;
14
- private _closed;
15
- private readonly _rtpReceiver?;
16
- private readonly _track;
17
- private readonly _rtpParameters;
18
- private _paused;
19
- private readonly _appData;
20
- protected readonly _observer: EnhancedEventEmitter;
21
- /**
22
- * @emits transportclose
23
- * @emits trackended
24
- * @emits @getstats
25
- * @emits @close
26
- * @emits @pause
27
- * @emits @resume
28
- */
29
- constructor({ id, localId, producerId, rtpReceiver, track, rtpParameters, appData }: {
30
- id: string;
31
- localId: string;
32
- producerId: string;
33
- rtpReceiver?: RTCRtpReceiver;
34
- track: MediaStreamTrack;
35
- rtpParameters: RtpParameters;
36
- appData: any;
37
- });
38
- /**
39
- * Consumer id.
40
- */
41
- get id(): string;
42
- /**
43
- * Local id.
44
- */
45
- get localId(): string;
46
- /**
47
- * Associated Producer id.
48
- */
49
- get producerId(): string;
50
- /**
51
- * Whether the Consumer is closed.
52
- */
53
- get closed(): boolean;
54
- /**
55
- * Media kind.
56
- */
57
- get kind(): string;
58
- /**
59
- * Associated RTCRtpReceiver.
60
- */
61
- get rtpReceiver(): RTCRtpReceiver | undefined;
62
- /**
63
- * The associated track.
64
- */
65
- get track(): MediaStreamTrack;
66
- /**
67
- * RTP parameters.
68
- */
69
- get rtpParameters(): RtpParameters;
70
- /**
71
- * Whether the Consumer is paused.
72
- */
73
- get paused(): boolean;
74
- /**
75
- * App custom data.
76
- */
77
- get appData(): any;
78
- /**
79
- * Invalid setter.
80
- */
81
- set appData(appData: any);
82
- /**
83
- * Observer.
84
- *
85
- * @emits close
86
- * @emits pause
87
- * @emits resume
88
- * @emits trackended
89
- */
90
- get observer(): EnhancedEventEmitter;
91
- /**
92
- * Closes the Consumer.
93
- */
94
- close(): void;
95
- /**
96
- * Transport was closed.
97
- */
98
- transportClosed(): void;
99
- /**
100
- * Get associated RTCRtpReceiver stats.
101
- */
102
- getStats(): Promise<RTCStatsReport>;
103
- /**
104
- * Pauses receiving media.
105
- */
106
- pause(): void;
107
- /**
108
- * Resumes receiving media.
109
- */
110
- resume(): void;
111
- private _onTrackEnded;
112
- private _handleTrack;
113
- private _destroyTrack;
114
- }
@@ -1,93 +0,0 @@
1
- import { EnhancedEventEmitter } from './EnhancedEventEmitter';
2
- import { SctpStreamParameters } from './SctpParameters';
3
- export declare type DataConsumerOptions = {
4
- id?: string;
5
- dataProducerId?: string;
6
- sctpStreamParameters: SctpStreamParameters;
7
- label?: string;
8
- protocol?: string;
9
- appData?: any;
10
- };
11
- export declare class DataConsumer extends EnhancedEventEmitter {
12
- private readonly _id;
13
- private readonly _dataProducerId;
14
- private readonly _dataChannel;
15
- private _closed;
16
- private readonly _sctpStreamParameters;
17
- private readonly _appData;
18
- protected readonly _observer: EnhancedEventEmitter;
19
- /**
20
- * @emits transportclose
21
- * @emits open
22
- * @emits error - (error: Error)
23
- * @emits close
24
- * @emits message - (message: any)
25
- * @emits @close
26
- */
27
- constructor({ id, dataProducerId, dataChannel, sctpStreamParameters, appData }: {
28
- id: string;
29
- dataProducerId: string;
30
- dataChannel: RTCDataChannel;
31
- sctpStreamParameters: SctpStreamParameters;
32
- appData: any;
33
- });
34
- /**
35
- * DataConsumer id.
36
- */
37
- get id(): string;
38
- /**
39
- * Associated DataProducer id.
40
- */
41
- get dataProducerId(): string;
42
- /**
43
- * Whether the DataConsumer is closed.
44
- */
45
- get closed(): boolean;
46
- /**
47
- * SCTP stream parameters.
48
- */
49
- get sctpStreamParameters(): SctpStreamParameters;
50
- /**
51
- * DataChannel readyState.
52
- */
53
- get readyState(): RTCDataChannelState;
54
- /**
55
- * DataChannel label.
56
- */
57
- get label(): string;
58
- /**
59
- * DataChannel protocol.
60
- */
61
- get protocol(): string;
62
- /**
63
- * DataChannel binaryType.
64
- */
65
- get binaryType(): BinaryType;
66
- /**
67
- * Set DataChannel binaryType.
68
- */
69
- set binaryType(binaryType: BinaryType);
70
- /**
71
- * App custom data.
72
- */
73
- get appData(): any;
74
- /**
75
- * Invalid setter.
76
- */
77
- set appData(appData: any);
78
- /**
79
- * Observer.
80
- *
81
- * @emits close
82
- */
83
- get observer(): EnhancedEventEmitter;
84
- /**
85
- * Closes the DataConsumer.
86
- */
87
- close(): void;
88
- /**
89
- * Transport was closed.
90
- */
91
- transportClosed(): void;
92
- private _handleDataChannel;
93
- }
@@ -1,97 +0,0 @@
1
- import { EnhancedEventEmitter } from './EnhancedEventEmitter';
2
- import { SctpStreamParameters } from './SctpParameters';
3
- export declare type DataProducerOptions = {
4
- ordered?: boolean;
5
- maxPacketLifeTime?: number;
6
- maxRetransmits?: number;
7
- label?: string;
8
- protocol?: string;
9
- appData?: any;
10
- };
11
- export declare class DataProducer extends EnhancedEventEmitter {
12
- private readonly _id;
13
- private readonly _dataChannel;
14
- private _closed;
15
- private readonly _sctpStreamParameters;
16
- private readonly _appData;
17
- protected readonly _observer: EnhancedEventEmitter;
18
- /**
19
- * @emits transportclose
20
- * @emits open
21
- * @emits error - (error: Error)
22
- * @emits close
23
- * @emits bufferedamountlow
24
- * @emits @close
25
- */
26
- constructor({ id, dataChannel, sctpStreamParameters, appData }: {
27
- id: string;
28
- dataChannel: RTCDataChannel;
29
- sctpStreamParameters: SctpStreamParameters;
30
- appData: any;
31
- });
32
- /**
33
- * DataProducer id.
34
- */
35
- get id(): string;
36
- /**
37
- * Whether the DataProducer is closed.
38
- */
39
- get closed(): boolean;
40
- /**
41
- * SCTP stream parameters.
42
- */
43
- get sctpStreamParameters(): SctpStreamParameters;
44
- /**
45
- * DataChannel readyState.
46
- */
47
- get readyState(): RTCDataChannelState;
48
- /**
49
- * DataChannel label.
50
- */
51
- get label(): string;
52
- /**
53
- * DataChannel protocol.
54
- */
55
- get protocol(): string;
56
- /**
57
- * DataChannel bufferedAmount.
58
- */
59
- get bufferedAmount(): number;
60
- /**
61
- * DataChannel bufferedAmountLowThreshold.
62
- */
63
- get bufferedAmountLowThreshold(): number;
64
- /**
65
- * Set DataChannel bufferedAmountLowThreshold.
66
- */
67
- set bufferedAmountLowThreshold(bufferedAmountLowThreshold: number);
68
- /**
69
- * App custom data.
70
- */
71
- get appData(): any;
72
- /**
73
- * Invalid setter.
74
- */
75
- set appData(appData: any);
76
- /**
77
- * Observer.
78
- *
79
- * @emits close
80
- */
81
- get observer(): EnhancedEventEmitter;
82
- /**
83
- * Closes the DataProducer.
84
- */
85
- close(): void;
86
- /**
87
- * Transport was closed.
88
- */
89
- transportClosed(): void;
90
- /**
91
- * Send a message.
92
- *
93
- * @param {String|Blob|ArrayBuffer|ArrayBufferView} data.
94
- */
95
- send(data: any): void;
96
- private _handleDataChannel;
97
- }
@@ -1,7 +0,0 @@
1
- /// <reference types="node" />
2
- import { EventEmitter } from 'events';
3
- export declare class EnhancedEventEmitter extends EventEmitter {
4
- constructor();
5
- safeEmit(event: string, ...args: any[]): boolean;
6
- safeEmitAsPromise(event: string, ...args: any[]): Promise<any>;
7
- }
@@ -1,10 +0,0 @@
1
- import debug from 'debug';
2
- export declare class Logger {
3
- private readonly _debug;
4
- private readonly _warn;
5
- private readonly _error;
6
- constructor(prefix?: string);
7
- get debug(): debug.Debugger;
8
- get warn(): debug.Debugger;
9
- get error(): debug.Debugger;
10
- }