Unverified 提交 f7d74e73 authored 作者: Iñaki Baz Castillo's avatar Iñaki Baz Castillo 提交者: GitHub

Node: add types for internal and data objects (#891)

上级 11f45ffd
...@@ -199,6 +199,7 @@ eslintConfig.overrides.push( ...@@ -199,6 +199,7 @@ eslintConfig.overrides.push(
'@typescript-eslint/ban-ts-comment' : 0, '@typescript-eslint/ban-ts-comment' : 0,
'@typescript-eslint/ban-ts-ignore' : 0, '@typescript-eslint/ban-ts-ignore' : 0,
'@typescript-eslint/explicit-module-boundary-types' : 0, '@typescript-eslint/explicit-module-boundary-types' : 0,
'@typescript-eslint/semi' : 2,
'@typescript-eslint/member-delimiter-style' : [ 2, '@typescript-eslint/member-delimiter-style' : [ 2,
{ {
multiline : { delimiter: 'semi', requireLast: true }, multiline : { delimiter: 'semi', requireLast: true },
......
import { RtpObserver, RtpObserverEvents, RtpObserverObserverEvents } from './RtpObserver';
import { Producer } from './Producer';
import { EnhancedEventEmitter } from './EnhancedEventEmitter'; import { EnhancedEventEmitter } from './EnhancedEventEmitter';
import { RtpObserver, RtpObserverEvents, RtpObserverObserverEvents, RtpObserverConstructorOptions } from './RtpObserver';
import { Producer } from './Producer';
export interface ActiveSpeakerObserverOptions { export interface ActiveSpeakerObserverOptions {
interval?: number; interval?: number;
/** /**
...@@ -24,15 +24,17 @@ export declare type ActiveSpeakerObserverObserverEvents = RtpObserverObserverEve ...@@ -24,15 +24,17 @@ export declare type ActiveSpeakerObserverObserverEvents = RtpObserverObserverEve
producer: Producer; producer: Producer;
}]; }];
}; };
declare type RtpObserverObserverConstructorOptions = RtpObserverConstructorOptions;
export declare class ActiveSpeakerObserver extends RtpObserver<ActiveSpeakerObserverEvents> { export declare class ActiveSpeakerObserver extends RtpObserver<ActiveSpeakerObserverEvents> {
/** /**
* @private * @private
*/ */
constructor(params: any); constructor(options: RtpObserverObserverConstructorOptions);
/** /**
* Observer. * Observer.
*/ */
get observer(): EnhancedEventEmitter<ActiveSpeakerObserverObserverEvents>; get observer(): EnhancedEventEmitter<ActiveSpeakerObserverObserverEvents>;
private handleWorkerNotifications; private handleWorkerNotifications;
} }
export {};
//# sourceMappingURL=ActiveSpeakerObserver.d.ts.map //# sourceMappingURL=ActiveSpeakerObserver.d.ts.map
\ No newline at end of file
{"version":3,"file":"ActiveSpeakerObserver.d.ts","sourceRoot":"","sources":["../src/ActiveSpeakerObserver.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAC;AAC1F,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D,MAAM,WAAW,4BAA4B;IAE5C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAClC;AAED,MAAM,WAAW,6BAA6B;IAE7C;;OAEG;IACH,QAAQ,EAAE,QAAQ,CAAC;CACnB;AAED,oBAAY,2BAA2B,GAAG,iBAAiB,GAC3D;IACC,eAAe,EAAE,CAAC;QAAE,QAAQ,EAAE,QAAQ,CAAA;KAAE,CAAC,CAAC;CAC1C,CAAA;AAED,oBAAY,mCAAmC,GAAG,yBAAyB,GAC3E;IACC,eAAe,EAAE,CAAC;QAAE,QAAQ,EAAE,QAAQ,CAAA;KAAE,CAAC,CAAC;CAC1C,CAAA;AAID,qBAAa,qBAAsB,SAAQ,WAAW,CAAC,2BAA2B,CAAC;IAElF;;OAEG;gBACS,MAAM,EAAE,GAAG;IAOvB;;OAEG;IACH,IAAI,QAAQ,IAAI,oBAAoB,CAAC,mCAAmC,CAAC,CAGxE;IAED,OAAO,CAAC,yBAAyB;CAyBjC"} {"version":3,"file":"ActiveSpeakerObserver.d.ts","sourceRoot":"","sources":["../src/ActiveSpeakerObserver.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EACN,WAAW,EACX,iBAAiB,EACjB,yBAAyB,EACzB,6BAA6B,EAC7B,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,MAAM,WAAW,4BAA4B;IAE5C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAClC;AAED,MAAM,WAAW,6BAA6B;IAE7C;;OAEG;IACH,QAAQ,EAAE,QAAQ,CAAC;CACnB;AAED,oBAAY,2BAA2B,GAAG,iBAAiB,GAC3D;IACC,eAAe,EAAE,CAAC;QAAE,QAAQ,EAAE,QAAQ,CAAA;KAAE,CAAC,CAAC;CAC1C,CAAC;AAEF,oBAAY,mCAAmC,GAAG,yBAAyB,GAC3E;IACC,eAAe,EAAE,CAAC;QAAE,QAAQ,EAAE,QAAQ,CAAA;KAAE,CAAC,CAAC;CAC1C,CAAC;AAEF,aAAK,qCAAqC,GAAG,6BAA6B,CAAC;AAI3E,qBAAa,qBAAsB,SAAQ,WAAW,CAAC,2BAA2B,CAAC;IAElF;;OAEG;gBACS,OAAO,EAAE,qCAAqC;IAO1D;;OAEG;IACH,IAAI,QAAQ,IAAI,oBAAoB,CAAC,mCAAmC,CAAC,CAGxE;IAED,OAAO,CAAC,yBAAyB;CA4BjC"}
\ No newline at end of file \ No newline at end of file
...@@ -8,8 +8,8 @@ class ActiveSpeakerObserver extends RtpObserver_1.RtpObserver { ...@@ -8,8 +8,8 @@ class ActiveSpeakerObserver extends RtpObserver_1.RtpObserver {
/** /**
* @private * @private
*/ */
constructor(params) { constructor(options) {
super(params); super(options);
this.handleWorkerNotifications(); this.handleWorkerNotifications();
} }
/** /**
...@@ -23,9 +23,10 @@ class ActiveSpeakerObserver extends RtpObserver_1.RtpObserver { ...@@ -23,9 +23,10 @@ class ActiveSpeakerObserver extends RtpObserver_1.RtpObserver {
switch (event) { switch (event) {
case 'dominantspeaker': case 'dominantspeaker':
{ {
const dominantSpeaker = { const producer = this.getProducerById(data.producerId);
producer: this.getProducerById(data.producerId) if (!producer)
}; break;
const dominantSpeaker = { producer };
this.safeEmit('dominantspeaker', dominantSpeaker); this.safeEmit('dominantspeaker', dominantSpeaker);
this.observer.safeEmit('dominantspeaker', dominantSpeaker); this.observer.safeEmit('dominantspeaker', dominantSpeaker);
break; break;
......
import { RtpObserver, RtpObserverEvents, RtpObserverObserverEvents } from './RtpObserver';
import { Producer } from './Producer';
import { EnhancedEventEmitter } from './EnhancedEventEmitter'; import { EnhancedEventEmitter } from './EnhancedEventEmitter';
import { RtpObserver, RtpObserverEvents, RtpObserverObserverEvents, RtpObserverConstructorOptions } from './RtpObserver';
import { Producer } from './Producer';
export interface AudioLevelObserverOptions { export interface AudioLevelObserverOptions {
/** /**
* Maximum number of entries in the 'volumes”' event. Default 1. * Maximum number of entries in the 'volumes”' event. Default 1.
...@@ -39,15 +39,17 @@ export declare type AudioLevelObserverObserverEvents = RtpObserverObserverEvents ...@@ -39,15 +39,17 @@ export declare type AudioLevelObserverObserverEvents = RtpObserverObserverEvents
volumes: [AudioLevelObserverVolume[]]; volumes: [AudioLevelObserverVolume[]];
silence: []; silence: [];
}; };
declare type AudioLevelObserverConstructorOptions = RtpObserverConstructorOptions;
export declare class AudioLevelObserver extends RtpObserver<AudioLevelObserverEvents> { export declare class AudioLevelObserver extends RtpObserver<AudioLevelObserverEvents> {
/** /**
* @private * @private
*/ */
constructor(params: any); constructor(options: AudioLevelObserverConstructorOptions);
/** /**
* Observer. * Observer.
*/ */
get observer(): EnhancedEventEmitter<AudioLevelObserverObserverEvents>; get observer(): EnhancedEventEmitter<AudioLevelObserverObserverEvents>;
private handleWorkerNotifications; private handleWorkerNotifications;
} }
export {};
//# sourceMappingURL=AudioLevelObserver.d.ts.map //# sourceMappingURL=AudioLevelObserver.d.ts.map
\ No newline at end of file
{"version":3,"file":"AudioLevelObserver.d.ts","sourceRoot":"","sources":["../src/AudioLevelObserver.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAC;AAC1F,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D,MAAM,WAAW,yBAAyB;IAEzC;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAClC;AAED,MAAM,WAAW,wBAAwB;IAExC;;OAEG;IACH,QAAQ,EAAE,QAAQ,CAAC;IAEnB;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAC;CACf;AAED,oBAAY,wBAAwB,GAAG,iBAAiB,GACxD;IACC,OAAO,EAAE,CAAC,wBAAwB,EAAE,CAAC,CAAC;IACtC,OAAO,EAAE,EAAE,CAAC;CACZ,CAAA;AAED,oBAAY,gCAAgC,GAAG,yBAAyB,GACxE;IACC,OAAO,EAAE,CAAC,wBAAwB,EAAE,CAAC,CAAC;IACtC,OAAO,EAAE,EAAE,CAAC;CACZ,CAAA;AAID,qBAAa,kBAAmB,SAAQ,WAAW,CAAC,wBAAwB,CAAC;IAE5E;;OAEG;gBACS,MAAM,EAAE,GAAG;IAOvB;;OAEG;IACH,IAAI,QAAQ,IAAI,oBAAoB,CAAC,gCAAgC,CAAC,CAGrE;IAED,OAAO,CAAC,yBAAyB;CA+CjC"} {"version":3,"file":"AudioLevelObserver.d.ts","sourceRoot":"","sources":["../src/AudioLevelObserver.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EACN,WAAW,EACX,iBAAiB,EACjB,yBAAyB,EACzB,6BAA6B,EAC7B,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,MAAM,WAAW,yBAAyB;IAEzC;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAClC;AAED,MAAM,WAAW,wBAAwB;IAExC;;OAEG;IACH,QAAQ,EAAE,QAAQ,CAAC;IAEnB;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAC;CACf;AAED,oBAAY,wBAAwB,GAAG,iBAAiB,GACxD;IACC,OAAO,EAAE,CAAC,wBAAwB,EAAE,CAAC,CAAC;IACtC,OAAO,EAAE,EAAE,CAAC;CACZ,CAAC;AAEF,oBAAY,gCAAgC,GAAG,yBAAyB,GACxE;IACC,OAAO,EAAE,CAAC,wBAAwB,EAAE,CAAC,CAAC;IACtC,OAAO,EAAE,EAAE,CAAC;CACZ,CAAC;AAEF,aAAK,oCAAoC,GAAG,6BAA6B,CAAC;AAI1E,qBAAa,kBAAmB,SAAQ,WAAW,CAAC,wBAAwB,CAAC;IAE5E;;OAEG;gBACS,OAAO,EAAE,oCAAoC;IAOzD;;OAEG;IACH,IAAI,QAAQ,IAAI,oBAAoB,CAAC,gCAAgC,CAAC,CAGrE;IAED,OAAO,CAAC,yBAAyB;CA+CjC"}
\ No newline at end of file \ No newline at end of file
...@@ -8,8 +8,8 @@ class AudioLevelObserver extends RtpObserver_1.RtpObserver { ...@@ -8,8 +8,8 @@ class AudioLevelObserver extends RtpObserver_1.RtpObserver {
/** /**
* @private * @private
*/ */
constructor(params) { constructor(options) {
super(params); super(options);
this.handleWorkerNotifications(); this.handleWorkerNotifications();
} }
/** /**
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
import { EnhancedEventEmitter } from './EnhancedEventEmitter'; import { EnhancedEventEmitter } from './EnhancedEventEmitter';
import { Channel } from './Channel'; import { Channel } from './Channel';
import { PayloadChannel } from './PayloadChannel'; import { PayloadChannel } from './PayloadChannel';
import { TransportInternal } from './Transport';
import { ProducerStat } from './Producer'; import { ProducerStat } from './Producer';
import { MediaKind, RtpCapabilities, RtpParameters } from './RtpParameters'; import { MediaKind, RtpCapabilities, RtpParameters } from './RtpParameters';
export declare type ConsumerOptions = { export declare type ConsumerOptions = {
...@@ -149,14 +150,23 @@ export declare type ConsumerObserverEvents = { ...@@ -149,14 +150,23 @@ export declare type ConsumerObserverEvents = {
layerschange: [ConsumerLayers?]; layerschange: [ConsumerLayers?];
trace: [ConsumerTraceEventData]; trace: [ConsumerTraceEventData];
}; };
declare type ConsumerInternal = TransportInternal & {
consumerId: string;
};
declare type ConsumerData = {
producerId: string;
kind: MediaKind;
rtpParameters: RtpParameters;
type: ConsumerType;
};
export declare class Consumer extends EnhancedEventEmitter<ConsumerEvents> { export declare class Consumer extends EnhancedEventEmitter<ConsumerEvents> {
#private; #private;
/** /**
* @private * @private
*/ */
constructor({ internal, data, channel, payloadChannel, appData, paused, producerPaused, score, preferredLayers }: { constructor({ internal, data, channel, payloadChannel, appData, paused, producerPaused, score, preferredLayers }: {
internal: any; internal: ConsumerInternal;
data: any; data: ConsumerData;
channel: Channel; channel: Channel;
payloadChannel: PayloadChannel; payloadChannel: PayloadChannel;
appData?: Record<string, unknown>; appData?: Record<string, unknown>;
...@@ -278,4 +288,5 @@ export declare class Consumer extends EnhancedEventEmitter<ConsumerEvents> { ...@@ -278,4 +288,5 @@ export declare class Consumer extends EnhancedEventEmitter<ConsumerEvents> {
enableTraceEvent(types?: ConsumerTraceEventType[]): Promise<void>; enableTraceEvent(types?: ConsumerTraceEventType[]): Promise<void>;
private handleWorkerNotifications; private handleWorkerNotifications;
} }
export {};
//# sourceMappingURL=Consumer.d.ts.map //# sourceMappingURL=Consumer.d.ts.map
\ No newline at end of file
{"version":3,"file":"Consumer.d.ts","sourceRoot":"","sources":["../src/Consumer.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,EACN,SAAS,EACT,eAAe,EACf,aAAa,EACb,MAAM,iBAAiB,CAAC;AAEzB,oBAAY,eAAe,GAC3B;IACC;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,eAAe,EAAE,eAAe,CAAC;IAEjC;;;;;;;;;;;;;OAaG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;;OAGG;IACH,eAAe,CAAC,EAAE,cAAc,CAAC;IAEjC;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IAEf;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAClC,CAAA;AAED;;GAEG;AACH,oBAAY,sBAAsB,GAAG,KAAK,GAAG,UAAU,GAAG,MAAM,GAAG,KAAK,GAAG,KAAK,CAAC;AAEjF;;GAEG;AACH,oBAAY,sBAAsB,GAClC;IACC;;OAEG;IACH,IAAI,EAAE,sBAAsB,CAAC;IAE7B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,SAAS,EAAE,IAAI,GAAG,KAAK,CAAC;IAExB;;OAEG;IACH,IAAI,EAAE,GAAG,CAAC;CACV,CAAA;AAED,oBAAY,aAAa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,OAAO,CAAC,IAAI,CAAC;IAe5B;;OAEG;IACG,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;IAe7B;;OAEG;IACG,kBAAkB,CACvB,EACC,YAAY,EACZ,aAAa,EACb,EAAE,cAAc,GACf,OAAO,CAAC,IAAI,CAAC;IAYhB;;OAEG;IACG,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAYlD;;OAEG;IACG,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC;IAYpC;;OAEG;IACG,eAAe,IAAI,OAAO,CAAC,IAAI,CAAC;IAOtC;;OAEG;IACG,gBAAgB,CAAC,KAAK,GAAE,sBAAsB,EAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAU3E,OAAO,CAAC,yBAAyB;CAsIjC"}
\ No newline at end of file \ No newline at end of file
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
import { EnhancedEventEmitter } from './EnhancedEventEmitter'; import { EnhancedEventEmitter } from './EnhancedEventEmitter';
import { Channel } from './Channel'; import { Channel } from './Channel';
import { PayloadChannel } from './PayloadChannel'; import { PayloadChannel } from './PayloadChannel';
import { TransportInternal } from './Transport';
import { SctpStreamParameters } from './SctpParameters'; import { SctpStreamParameters } from './SctpParameters';
export declare type DataConsumerOptions = { export declare type DataConsumerOptions = {
/** /**
...@@ -59,14 +60,24 @@ export declare type DataConsumerEvents = { ...@@ -59,14 +60,24 @@ export declare type DataConsumerEvents = {
export declare type DataConsumerObserverEvents = { export declare type DataConsumerObserverEvents = {
close: []; close: [];
}; };
declare type DataConsumerInternal = TransportInternal & {
dataConsumerId: string;
};
declare type DataConsumerData = {
dataProducerId: string;
type: DataConsumerType;
sctpStreamParameters?: SctpStreamParameters;
label: string;
protocol: string;
};
export declare class DataConsumer extends EnhancedEventEmitter<DataConsumerEvents> { export declare class DataConsumer extends EnhancedEventEmitter<DataConsumerEvents> {
#private; #private;
/** /**
* @private * @private
*/ */
constructor({ internal, data, channel, payloadChannel, appData }: { constructor({ internal, data, channel, payloadChannel, appData }: {
internal: any; internal: DataConsumerInternal;
data: any; data: DataConsumerData;
channel: Channel; channel: Channel;
payloadChannel: PayloadChannel; payloadChannel: PayloadChannel;
appData?: Record<string, unknown>; appData?: Record<string, unknown>;
...@@ -143,4 +154,5 @@ export declare class DataConsumer extends EnhancedEventEmitter<DataConsumerEvent ...@@ -143,4 +154,5 @@ export declare class DataConsumer extends EnhancedEventEmitter<DataConsumerEvent
getBufferedAmount(): Promise<number>; getBufferedAmount(): Promise<number>;
private handleWorkerNotifications; private handleWorkerNotifications;
} }
export {};
//# sourceMappingURL=DataConsumer.d.ts.map //# sourceMappingURL=DataConsumer.d.ts.map
\ No newline at end of file
{"version":3,"file":"DataConsumer.d.ts","sourceRoot":"","sources":["../src/DataConsumer.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAExD,oBAAY,mBAAmB,GAC/B;IACC;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;IAEvB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B;;;;;OAKG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAClC,CAAA;AAED,oBAAY,gBAAgB,GAC5B;IACC,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,SAA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AAM,CAAC;IAU1C,OAAO,CAAC,yBAAyB;CA2EjC"}
\ No newline at end of file \ No newline at end of file
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
import { EnhancedEventEmitter } from './EnhancedEventEmitter'; import { EnhancedEventEmitter } from './EnhancedEventEmitter';
import { Channel } from './Channel'; import { Channel } from './Channel';
import { PayloadChannel } from './PayloadChannel'; import { PayloadChannel } from './PayloadChannel';
import { TransportInternal } from './Transport';
import { SctpStreamParameters } from './SctpParameters'; import { SctpStreamParameters } from './SctpParameters';
export declare type DataProducerOptions = { export declare type DataProducerOptions = {
/** /**
...@@ -45,14 +46,23 @@ export declare type DataProducerEvents = { ...@@ -45,14 +46,23 @@ export declare type DataProducerEvents = {
export declare type DataProducerObserverEvents = { export declare type DataProducerObserverEvents = {
close: []; close: [];
}; };
declare type DataProducerInternal = TransportInternal & {
dataProducerId: string;
};
declare type DataProducerData = {
type: DataProducerType;
sctpStreamParameters?: SctpStreamParameters;
label: string;
protocol: string;
};
export declare class DataProducer extends EnhancedEventEmitter<DataProducerEvents> { export declare class DataProducer extends EnhancedEventEmitter<DataProducerEvents> {
#private; #private;
/** /**
* @private * @private
*/ */
constructor({ internal, data, channel, payloadChannel, appData }: { constructor({ internal, data, channel, payloadChannel, appData }: {
internal: any; internal: DataProducerInternal;
data: any; data: DataProducerData;
channel: Channel; channel: Channel;
payloadChannel: PayloadChannel; payloadChannel: PayloadChannel;
appData?: Record<string, unknown>; appData?: Record<string, unknown>;
...@@ -117,4 +127,5 @@ export declare class DataProducer extends EnhancedEventEmitter<DataProducerEvent ...@@ -117,4 +127,5 @@ export declare class DataProducer extends EnhancedEventEmitter<DataProducerEvent
send(message: string | Buffer, ppid?: number): void; send(message: string | Buffer, ppid?: number): void;
private handleWorkerNotifications; private handleWorkerNotifications;
} }
export {};
//# sourceMappingURL=DataProducer.d.ts.map //# sourceMappingURL=DataProducer.d.ts.map
\ No newline at end of file
{"version":3,"file":"DataProducer.d.ts","sourceRoot":"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J,OAAO,EACP,cAAc,EACd,OAAO,EACP,EACD;QACC,QAAQ,EAAE,oBAAoB,CAAC;QAC/B,IAAI,EAAE,gBAAgB,CAAC;QACvB,OAAO,EAAE,OAAO,CAAC;QACjB,cAAc,EAAE,cAAc,CAAC;QAC/B,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAClC;IAgBF;;OAEG;IACH,IAAI,EAAE,IAAI,MAAM,CAGf;IAED;;OAEG;IACH,IAAI,MAAM,IAAI,OAAO,CAGpB;IAED;;OAEG;IACH,IAAI,IAAI,IAAI,gBAAgB,CAG3B;IAED;;OAEG;IACH,IAAI,oBAAoB,IAAI,oBAAoB,GAAG,SAAS,CAG3D;IAED;;OAEG;IACH,IAAI,KAAK,IAAI,MAAM,CAGlB;IAED;;OAEG;IACH,IAAI,QAAQ,IAAI,MAAM,CAGrB;IAED;;OAEG;IACH,IAAI,OAAO,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAGrC;IAED;;OAEG;IACH,IAAI,OAAO,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAG3C;IAED;;OAEG;IACH,IAAI,QAAQ,IAAI,oBAAoB,CAAC,0BAA0B,CAAC,CAG/D;IAED;;OAEG;IACH,KAAK,IAAI,IAAI;IAwBb;;;;OAIG;IACH,eAAe,IAAI,IAAI;IAmBvB;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC,GAAG,CAAC;IAO1B;;OAEG;IACG,QAAQ,IAAI,OAAO,CAAC,gBAAgB,EAAE,CAAC;IAO7C;;OAEG;IACH,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI;IA0CnD,OAAO,CAAC,yBAAyB;CAIjC"}
\ No newline at end of file \ No newline at end of file
/// <reference types="node" /> /// <reference types="node" />
import { Transport, TransportEvents, TransportObserverEvents } from './Transport'; import { Transport, TransportEvents, TransportObserverEvents, TransportConstructorOptions } from './Transport';
import { SctpParameters } from './SctpParameters';
export declare type DirectTransportOptions = { export declare type DirectTransportOptions = {
/** /**
* Maximum allowed size for direct messages sent from DataProducers. * Maximum allowed size for direct messages sent from DataProducers.
...@@ -39,12 +40,18 @@ export declare type DirectTransportEvents = TransportEvents & { ...@@ -39,12 +40,18 @@ export declare type DirectTransportEvents = TransportEvents & {
export declare type DirectTransportObserverEvents = TransportObserverEvents & { export declare type DirectTransportObserverEvents = TransportObserverEvents & {
rtcp: [Buffer]; rtcp: [Buffer];
}; };
declare type DirectTransportConstructorOptions = TransportConstructorOptions & {
data: DirectTransportData;
};
export declare type DirectTransportData = {
sctpParameters?: SctpParameters;
};
export declare class DirectTransport extends Transport<DirectTransportEvents, DirectTransportObserverEvents> { export declare class DirectTransport extends Transport<DirectTransportEvents, DirectTransportObserverEvents> {
#private; #private;
/** /**
* @private * @private
*/ */
constructor(params: any); constructor(options: DirectTransportConstructorOptions);
/** /**
* Close the DirectTransport. * Close the DirectTransport.
* *
...@@ -84,4 +91,5 @@ export declare class DirectTransport extends Transport<DirectTransportEvents, Di ...@@ -84,4 +91,5 @@ export declare class DirectTransport extends Transport<DirectTransportEvents, Di
sendRtcp(rtcpPacket: Buffer): void; sendRtcp(rtcpPacket: Buffer): void;
private handleWorkerNotifications; private handleWorkerNotifications;
} }
export {};
//# sourceMappingURL=DirectTransport.d.ts.map //# sourceMappingURL=DirectTransport.d.ts.map
\ No newline at end of file
{"version":3,"file":"DirectTransport.d.ts","sourceRoot":"","sources":["../src/DirectTransport.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,EAA2B,eAAe,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAE3G,oBAAY,sBAAsB,GAClC;IACC;;;OAGG;IACH,cAAc,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAClC,CAAA;AAED,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5B,CAAC;AAEF,oBAAY,qBAAqB,GAAG,eAAe,GACnD;IACC,IAAI,EAAE,CAAC,MAAM,CAAC,CAAC;CACf,CAAC;AAEF,oBAAY,6BAA6B,GAAG,uBAAuB,GACnE;IACC,IAAI,EAAE,CAAC,MAAM,CAAC,CAAC;CACf,CAAC;AAEF,aAAK,iCAAiC,GAAG,2BAA2B,GACpE;IACC,IAAI,EAAE,mBAAmB,CAAC;CAC1B,CAAC;AAEF,oBAAY,mBAAmB,GAC/B;IACC,cAAc,CAAC,EAAE,cAAc,CAAC;CAChC,CAAC;AAIF,qBAAa,eAAgB,SAC5B,SAAS,CAAC,qBAAqB,EAAE,6BAA6B,CAAC;;IAK/D;;OAEG;gBACS,OAAO,EAAE,iCAAiC;IActD;;;;OAIG;IACH,KAAK,IAAI,IAAI;IAQb;;;;;OAKG;IACH,YAAY,IAAI,IAAI;IAQpB;;;;OAIG;IACG,QAAQ,IAAI,OAAO,CAAC,mBAAmB,EAAE,CAAC;IAOhD;;;;OAIG;IACG,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAK9B;;OAEG;IAEG,qBAAqB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAM3D;;OAEG;IAEG,qBAAqB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAM3D;;OAEG;IACH,QAAQ,CAAC,UAAU,EAAE,MAAM;IAW3B,OAAO,CAAC,yBAAyB;CAkDjC"}
\ No newline at end of file \ No newline at end of file
...@@ -11,12 +11,12 @@ class DirectTransport extends Transport_1.Transport { ...@@ -11,12 +11,12 @@ class DirectTransport extends Transport_1.Transport {
/** /**
* @private * @private
*/ */
constructor(params) { constructor(options) {
super(params); super(options);
logger.debug('constructor()'); logger.debug('constructor()');
this.#data = this.#data =
{ {
// Nothing for now. // Nothing.
}; };
this.handleWorkerNotifications(); this.handleWorkerNotifications();
} }
......
{"version":3,"file":"EnhancedEventEmitter.d.ts","sourceR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AAI,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,GAC/B,IAAI;IAOP,cAAc,CAAC,CAAC,SAAS,MAAM,CAAC,GAAG,MAAM,EACxC,SAAS,EAAE,CAAC,EACZ,QAAQ,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,GAC/B,IAAI;IAOP,kBAAkB,CAAC,CAAC,SAAS,MAAM,CAAC,GAAG,MAAM,EAAE,SAAS,CAAC,EAAE,CAAC,GAAG,IAAI;IAOnE,aAAa,CAAC,CAAC,SAAS,MAAM,CAAC,GAAG,MAAM,EAAE,SAAS,EAAE,CAAC,GAAG,MAAM;IAK/D,SAAS,CAAC,CAAC,SAAS,MAAM,CAAC,GAAG,MAAM,EAAE,SAAS,EAAE,CAAC,GAAG,QAAQ,EAAE;IAK/D,YAAY,CAAC,CAAC,SAAS,MAAM,CAAC,GAAG,MAAM,EAAE,SAAS,EAAE,CAAC,GAAG,QAAQ,EAAE;CAIlE"}
\ No newline at end of file \ No newline at end of file
import { Transport, TransportListenIp, TransportTuple, TransportEvents, TransportObserverEvents, SctpState } from './Transport'; import { Transport, TransportListenIp, TransportTuple, TransportEvents, TransportObserverEvents, TransportConstructorOptions, SctpState } from './Transport';
import { Consumer } from './Consumer'; import { Consumer } from './Consumer';
import { SctpParameters, NumSctpStreams } from './SctpParameters'; import { SctpParameters, NumSctpStreams } from './SctpParameters';
import { SrtpParameters } from './SrtpParameters'; import { SrtpParameters } from './SrtpParameters';
...@@ -87,12 +87,22 @@ export declare type PipeTransportEvents = TransportEvents & { ...@@ -87,12 +87,22 @@ export declare type PipeTransportEvents = TransportEvents & {
export declare type PipeTransportObserverEvents = TransportObserverEvents & { export declare type PipeTransportObserverEvents = TransportObserverEvents & {
sctpstatechange: [SctpState]; sctpstatechange: [SctpState];
}; };
declare type PipeTransportConstructorOptions = TransportConstructorOptions & {
data: PipeTransportData;
};
export declare type PipeTransportData = {
tuple: TransportTuple;
sctpParameters?: SctpParameters;
sctpState?: SctpState;
rtx: boolean;
srtpParameters?: SrtpParameters;
};
export declare class PipeTransport extends Transport<PipeTransportEvents, PipeTransportObserverEvents> { export declare class PipeTransport extends Transport<PipeTransportEvents, PipeTransportObserverEvents> {
#private; #private;
/** /**
* @private * @private
*/ */
constructor(params: any); constructor(options: PipeTransportConstructorOptions);
/** /**
* Transport tuple. * Transport tuple.
*/ */
...@@ -146,4 +156,5 @@ export declare class PipeTransport extends Transport<PipeTransportEvents, PipeTr ...@@ -146,4 +156,5 @@ export declare class PipeTransport extends Transport<PipeTransportEvents, PipeTr
consume({ producerId, appData }: PipeConsumerOptions): Promise<Consumer>; consume({ producerId, appData }: PipeConsumerOptions): Promise<Consumer>;
private handleWorkerNotifications; private handleWorkerNotifications;
} }
export {};
//# sourceMappingURL=PipeTransport.d.ts.map //# sourceMappingURL=PipeTransport.d.ts.map
\ No newline at end of file
{"version":3,"file":"PipeTransport.d.ts","sourceRoot":"","sources":["../src/PipeTransport.ts"],"names":[],"mappings":"AAGA,OAAO,EACN,SAAS,EACT,iBAAiB,EACjB,cAAc,EAEd,eAAe,EACf,uBAAuB,EACvB,SAAS,EACT,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,oBAAY,oBAAoB,GAChC;IACC;;OAEG;IACH,QAAQ,EAAE,iBAAiB,GAAG,MAAM,CAAC;IAErC;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;OAEG;IACH,cAAc,CAAC,EAAE,cAAc,CAAC;IAEhC;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAE5B;;;OAGG;IACH,kBAAkB,CAAC,EAAE,M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EACC,EAAE,EACF,IAAI,EACJ,cAAc,EACd,EACD;QACC,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,EAAE,MAAM,CAAC;QACb,cAAc,CAAC,EAAE,cAAc,CAAC;KAChC,GACC,OAAO,CAAC,IAAI,CAAC;IAahB;;;;OAIG;IACG,OAAO,CAAC,EAAE,UAAU,EAAE,OAAO,EAAE,EAAE,mBAAmB,GAAG,OAAO,CAAC,QAAQ,CAAC;IAgE9E,OAAO,CAAC,yBAAyB;CAuCjC"}
\ No newline at end of file \ No newline at end of file
...@@ -13,10 +13,10 @@ class PipeTransport extends Transport_1.Transport { ...@@ -13,10 +13,10 @@ class PipeTransport extends Transport_1.Transport {
/** /**
* @private * @private
*/ */
constructor(params) { constructor(options) {
super(params); super(options);
logger.debug('constructor()'); logger.debug('constructor()');
const { data } = params; const { data } = options;
this.#data = this.#data =
{ {
tuple: data.tuple, tuple: data.tuple,
......
import { Transport, TransportListenIp, TransportTuple, TransportEvents, TransportObserverEvents, SctpState } from './Transport'; import { Transport, TransportListenIp, TransportTuple, TransportEvents, TransportObserverEvents, TransportConstructorOptions, SctpState } from './Transport';
import { SctpParameters, NumSctpStreams } from './SctpParameters'; import { SctpParameters, NumSctpStreams } from './SctpParameters';
import { SrtpParameters, SrtpCryptoSuite } from './SrtpParameters'; import { SrtpParameters, SrtpCryptoSuite } from './SrtpParameters';
export declare type PlainTransportOptions = { export declare type PlainTransportOptions = {
...@@ -55,10 +55,6 @@ export declare type PlainTransportOptions = { ...@@ -55,10 +55,6 @@ export declare type PlainTransportOptions = {
*/ */
appData?: Record<string, unknown>; appData?: Record<string, unknown>;
}; };
/**
* DEPRECATED: Use PlainTransportOptions.
*/
export declare type PlainRtpTransportOptions = PlainTransportOptions;
export declare type PlainTransportStat = { export declare type PlainTransportStat = {
type: string; type: string;
transportId: string; transportId: string;
...@@ -86,10 +82,6 @@ export declare type PlainTransportStat = { ...@@ -86,10 +82,6 @@ export declare type PlainTransportStat = {
tuple: TransportTuple; tuple: TransportTuple;
rtcpTuple?: TransportTuple; rtcpTuple?: TransportTuple;
}; };
/**
* DEPRECATED: Use PlainTransportStat.
*/
export declare type PlainRtpTransportStat = PlainTransportStat;
export declare type PlainTransportEvents = TransportEvents & { export declare type PlainTransportEvents = TransportEvents & {
tuple: [TransportTuple]; tuple: [TransportTuple];
rtcptuple: [TransportTuple]; rtcptuple: [TransportTuple];
...@@ -100,12 +92,24 @@ export declare type PlainTransportObserverEvents = TransportObserverEvents & { ...@@ -100,12 +92,24 @@ export declare type PlainTransportObserverEvents = TransportObserverEvents & {
rtcptuple: [TransportTuple]; rtcptuple: [TransportTuple];
sctpstatechange: [SctpState]; sctpstatechange: [SctpState];
}; };
declare type PlainTransportConstructorOptions = TransportConstructorOptions & {
data: PlainTransportData;
};
export declare type PlainTransportData = {
rtcpMux?: boolean;
comedia?: boolean;
tuple: TransportTuple;
rtcpTuple?: TransportTuple;
sctpParameters?: SctpParameters;
sctpState?: SctpState;
srtpParameters?: SrtpParameters;
};
export declare class PlainTransport extends Transport<PlainTransportEvents, PlainTransportObserverEvents> { export declare class PlainTransport extends Transport<PlainTransportEvents, PlainTransportObserverEvents> {
#private; #private;
/** /**
* @private * @private
*/ */
constructor(params: any); constructor(options: PlainTransportConstructorOptions);
/** /**
* Transport tuple. * Transport tuple.
*/ */
...@@ -158,10 +162,5 @@ export declare class PlainTransport extends Transport<PlainTransportEvents, Plai ...@@ -158,10 +162,5 @@ export declare class PlainTransport extends Transport<PlainTransportEvents, Plai
}): Promise<void>; }): Promise<void>;
private handleWorkerNotifications; private handleWorkerNotifications;
} }
/** export {};
* DEPRECATED: Use PlainTransport.
*/
export declare class PlainRtpTransport extends PlainTransport {
constructor(params: any);
}
//# sourceMappingURL=PlainTransport.d.ts.map //# sourceMappingURL=PlainTransport.d.ts.map
\ No newline at end of file
{"version":3,"file":"PlainTransport.d.ts","sourceRoot":"","sources":["../src/PlainTransport.ts"],"names":[],"mappings":"AACA,OAAO,EACN,SAAS,EAC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ACG,OAAO,CACZ,EACC,EAAE,EACF,IAAI,EACJ,QAAQ,EACR,cAAc,EACd,EACD;QACC,EAAE,CAAC,EAAE,MAAM,CAAC;QACZ,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,cAAc,CAAC,EAAE,cAAc,CAAC;KAChC,GACC,OAAO,CAAC,IAAI,CAAC;IAmBhB,OAAO,CAAC,yBAAyB;CAmEjC"}
\ No newline at end of file \ No newline at end of file
"use strict"; "use strict";
Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "__esModule", { value: true });
exports.PlainRtpTransport = exports.PlainTransport = void 0; exports.PlainTransport = void 0;
const Logger_1 = require("./Logger"); const Logger_1 = require("./Logger");
const Transport_1 = require("./Transport"); const Transport_1 = require("./Transport");
const logger = new Logger_1.Logger('PlainTransport'); const logger = new Logger_1.Logger('PlainTransport');
...@@ -10,10 +10,10 @@ class PlainTransport extends Transport_1.Transport { ...@@ -10,10 +10,10 @@ class PlainTransport extends Transport_1.Transport {
/** /**
* @private * @private
*/ */
constructor(params) { constructor(options) {
super(params); super(options);
logger.debug('constructor()'); logger.debug('constructor()');
const { data } = params; const { data } = options;
this.#data = this.#data =
{ {
rtcpMux: data.rtcpMux, rtcpMux: data.rtcpMux,
...@@ -153,12 +153,3 @@ class PlainTransport extends Transport_1.Transport { ...@@ -153,12 +153,3 @@ class PlainTransport extends Transport_1.Transport {
} }
} }
exports.PlainTransport = PlainTransport; exports.PlainTransport = PlainTransport;
/**
* DEPRECATED: Use PlainTransport.
*/
class PlainRtpTransport extends PlainTransport {
constructor(params) {
super(params);
}
}
exports.PlainRtpTransport = PlainRtpTransport;
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
import { EnhancedEventEmitter } from './EnhancedEventEmitter'; import { EnhancedEventEmitter } from './EnhancedEventEmitter';
import { Channel } from './Channel'; import { Channel } from './Channel';
import { PayloadChannel } from './PayloadChannel'; import { PayloadChannel } from './PayloadChannel';
import { TransportInternal } from './Transport';
import { MediaKind, RtpParameters } from './RtpParameters'; import { MediaKind, RtpParameters } from './RtpParameters';
export declare type ProducerOptions = { export declare type ProducerOptions = {
/** /**
...@@ -128,14 +129,23 @@ export declare type ProducerObserverEvents = { ...@@ -128,14 +129,23 @@ export declare type ProducerObserverEvents = {
videoorientationchange: [ProducerVideoOrientation]; videoorientationchange: [ProducerVideoOrientation];
trace: [ProducerTraceEventData]; trace: [ProducerTraceEventData];
}; };
declare type ProducerInternal = TransportInternal & {
producerId: string;
};
declare type ProducerData = {
kind: MediaKind;
rtpParameters: RtpParameters;
type: ProducerType;
consumableRtpParameters: RtpParameters;
};
export declare class Producer extends EnhancedEventEmitter<ProducerEvents> { export declare class Producer extends EnhancedEventEmitter<ProducerEvents> {
#private; #private;
/** /**
* @private * @private
*/ */
constructor({ internal, data, channel, payloadChannel, appData, paused }: { constructor({ internal, data, channel, payloadChannel, appData, paused }: {
internal: any; internal: ProducerInternal;
data: any; data: ProducerData;
channel: Channel; channel: Channel;
payloadChannel: PayloadChannel; payloadChannel: PayloadChannel;
appData?: Record<string, unknown>; appData?: Record<string, unknown>;
...@@ -228,4 +238,5 @@ export declare class Producer extends EnhancedEventEmitter<ProducerEvents> { ...@@ -228,4 +238,5 @@ export declare class Producer extends EnhancedEventEmitter<ProducerEvents> {
send(rtpPacket: Buffer): void; send(rtpPacket: Buffer): void;
private handleWorkerNotifications; private handleWorkerNotifications;
} }
export {};
//# sourceMappingURL=Producer.d.ts.map //# sourceMappingURL=Producer.d.ts.map
\ No newline at end of file
{"version":3,"file":"Producer.d.ts","sourceRoot":"","sources":["../src/Producer.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,aAAa,EA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,OAAO,CAGpB;IAED;;OAEG;IACH,IAAI,IAAI,IAAI,SAAS,CAGpB;IAED;;OAEG;IACH,IAAI,aAAa,IAAI,aAAa,CAGjC;IAED;;OAEG;IACH,IAAI,IAAI,IAAI,YAAY,CAGvB;IAED;;;;OAIG;IACH,IAAI,uBAAuB,IAAI,aAAa,CAG3C;IAED;;OAEG;IACH,IAAI,MAAM,IAAI,OAAO,CAGpB;IAED;;OAEG;IACH,IAAI,KAAK,IAAI,aAAa,EAAE,CAG3B;IAED;;OAEG;IACH,IAAI,OAAO,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAGrC;IAED;;OAEG;IACH,IAAI,OAAO,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAG3C;IAED;;OAEG;IACH,IAAI,QAAQ,IAAI,oBAAoB,CAAC,sBAAsB,CAAC,CAG3D;IAED;;;OAGG;IACH,IAAI,iBAAiB,IAAI,OAAO,CAG/B;IAED;;OAEG;IACH,KAAK,IAAI,IAAI;IAwBb;;;;OAIG;IACH,eAAe,IAAI,IAAI;IAmBvB;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC,GAAG,CAAC;IAO1B;;OAEG;IACG,QAAQ,IAAI,OAAO,CAAC,YAAY,EAAE,CAAC;IAOzC;;OAEG;IACG,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAe5B;;OAEG;IACG,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;IAe7B;;OAEG;IACG,gBAAgB,CAAC,KAAK,GAAE,sBAAsB,EAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAU3E;;OAEG;IACH,IAAI,CAAC,SAAS,EAAE,MAAM;IAWtB,OAAO,CAAC,yBAAyB;CAmDjC"}
\ No newline at end of file \ No newline at end of file
...@@ -89,13 +89,16 @@ export declare type RouterObserverEvents = { ...@@ -89,13 +89,16 @@ export declare type RouterObserverEvents = {
newtransport: [Transport]; newtransport: [Transport];
newrtpobserver: [RtpObserver]; newrtpobserver: [RtpObserver];
}; };
export declare type RouterInternal = {
routerId: string;
};
export declare class Router extends EnhancedEventEmitter<RouterEvents> { export declare class Router extends EnhancedEventEmitter<RouterEvents> {
#private; #private;
/** /**
* @private * @private
*/ */
constructor({ internal, data, channel, payloadChannel, appData }: { constructor({ internal, data, channel, payloadChannel, appData }: {
internal: any; internal: RouterInternal;
data: any; data: any;
channel: Channel; channel: Channel;
payloadChannel: PayloadChannel; payloadChannel: PayloadChannel;
......
{"version":3,"file":"Router.d.ts","sourceRoot":"","sources":["../src/Router.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAG9D,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAC5E,OAAO,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AACzE,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAC5E,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,qBAAqB,EAAE,4BAA4B,EAAE,MAAM,yBAAyB,CAAC;AAC9F,OAAO,EAAE,kBAAkB,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC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AqB,GACtB,OAAO,CAAC,cAAc,CAAC;IAmF1B;;OAEG;IACG,mBAAmB,CACxB,EACC,QAAQ,EACR,IAAI,EACJ,UAAkB,EAClB,cAAwC,EACxC,kBAA8B,EAC9B,kBAA8B,EAC9B,SAAiB,EACjB,UAAkB,EAClB,OAAO,EACP,EAAE,oBAAoB,GACrB,OAAO,CAAC,aAAa,CAAC;IAiFzB;;OAEG;IACG,qBAAqB,CAC1B,EACC,cAAuB,EACvB,OAAO,EACP,GAAE,sBAGF,GACC,OAAO,CAAC,eAAe,CAAC;IAoD3B;;OAEG;IACG,YAAY,CACjB,EACC,UAAU,EACV,cAAc,EACd,MAAM,EACN,QAAsB,EACtB,UAAiB,EACjB,cAAwC,EACxC,SAAiB,EACjB,UAAkB,EAClB,EAAE,mBAAmB,GACpB,OAAO,CAAC,kBAAkB,CAAC;IA8O9B;;OAEG;IACH,oBAAoB,CACnB,oBAAoB,EAAE,MAAM,EAC5B,wBAAwB,EAAE,OAAO,CAAC,iBAAiB,CAAC,GAClD,IAAI;IA+BP;;OAEG;IACG,2BAA2B,CAChC,EACC,QAAc,EACd,OAAO,EACP,GAAE,4BAAiC,GAClC,OAAO,CAAC,qBAAqB,CAAC;IA0CjC;;OAEG;IACG,wBAAwB,CAC7B,EACC,UAAc,EACd,SAAe,EACf,QAAe,EACf,OAAO,EACP,GAAE,yBAA8B,GAC/B,OAAO,CAAC,kBAAkB,CAAC;IA4C9B;;OAEG;IACH,UAAU,CACT,EACC,UAAU,EACV,eAAe,EACf,EACD;QACC,UAAU,EAAE,MAAM,CAAC;QACnB,eAAe,EAAE,eAAe,CAAC;KACjC,GACC,OAAO;CAuBV"}
\ No newline at end of file \ No newline at end of file
import { EnhancedEventEmitter } from './EnhancedEventEmitter'; import { EnhancedEventEmitter } from './EnhancedEventEmitter';
import { Channel } from './Channel'; import { Channel } from './Channel';
import { PayloadChannel } from './PayloadChannel'; import { PayloadChannel } from './PayloadChannel';
import { RouterInternal } from './Router';
import { Producer } from './Producer'; import { Producer } from './Producer';
export declare type RtpObserverEvents = { export declare type RtpObserverEvents = {
routerclose: []; routerclose: [];
...@@ -13,6 +14,16 @@ export declare type RtpObserverObserverEvents = { ...@@ -13,6 +14,16 @@ export declare type RtpObserverObserverEvents = {
addproducer: [Producer]; addproducer: [Producer];
removeproducer: [Producer]; removeproducer: [Producer];
}; };
export declare type RtpObserverConstructorOptions = {
internal: RtpObserverObserverInternal;
channel: Channel;
payloadChannel: PayloadChannel;
appData?: Record<string, unknown>;
getProducerById: (producerId: string) => Producer | undefined;
};
export declare type RtpObserverObserverInternal = RouterInternal & {
rtpObserverId: string;
};
export declare type RtpObserverAddRemoveProducerOptions = { export declare type RtpObserverAddRemoveProducerOptions = {
/** /**
* The id of the Producer to be added or removed. * The id of the Producer to be added or removed.
...@@ -21,24 +32,15 @@ export declare type RtpObserverAddRemoveProducerOptions = { ...@@ -21,24 +32,15 @@ export declare type RtpObserverAddRemoveProducerOptions = {
}; };
export declare class RtpObserver<E extends RtpObserverEvents = RtpObserverEvents> extends EnhancedEventEmitter<E> { export declare class RtpObserver<E extends RtpObserverEvents = RtpObserverEvents> extends EnhancedEventEmitter<E> {
#private; #private;
protected readonly internal: { protected readonly internal: RtpObserverObserverInternal;
routerId: string;
rtpObserverId: string;
};
protected readonly channel: Channel; protected readonly channel: Channel;
protected readonly payloadChannel: PayloadChannel; protected readonly payloadChannel: PayloadChannel;
protected readonly getProducerById: (producerId: string) => Producer; protected readonly getProducerById: (producerId: string) => Producer | undefined;
/** /**
* @private * @private
* @interface * @interface
*/ */
constructor({ internal, channel, payloadChannel, appData, getProducerById }: { constructor({ internal, channel, payloadChannel, appData, getProducerById }: RtpObserverConstructorOptions);
internal: any;
channel: Channel;
payloadChannel: PayloadChannel;
appData?: Record<string, unknown>;
getProducerById: (producerId: string) => Producer;
});
/** /**
* RtpObserver id. * RtpObserver id.
*/ */
......
{"version":3,"file":"RtpObserver.d.ts","sourceRoot":"","sources":["../src/RtpObserver.ts"],"names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f;IAED;;OAEG;IACH,IAAI,MAAM,IAAI,OAAO,CAGpB;IAED;;OAEG;IACH,IAAI,MAAM,IAAI,OAAO,CAGpB;IAED;;OAEG;IACH,IAAI,OAAO,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAGrC;IAED;;OAEG;IACH,IAAI,OAAO,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAG3C;IAED;;OAEG;IACH,IAAI,QAAQ,IAAI,oBAAoB,CAAC,yBAAyB,CAAC,CAG9D;IAED;;OAEG;IACH,KAAK,IAAI,IAAI;IAwBb;;;;OAIG;IACH,YAAY,IAAI,IAAI;IAmBpB;;OAEG;IACG,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAe5B;;OAEG;IACG,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;IAe7B;;OAEG;IACG,WAAW,CAAC,EAAE,UAAU,EAAE,EAAE,mCAAmC,GAAG,OAAO,CAAC,IAAI,CAAC;IAiBrF;;OAEG;IACG,cAAc,CAAC,EAAE,UAAU,EAAE,EAAE,mCAAmC,GAAG,OAAO,CAAC,IAAI,CAAC;CAgBxF"}
\ No newline at end of file \ No newline at end of file
...@@ -135,6 +135,8 @@ class RtpObserver extends EnhancedEventEmitter_1.EnhancedEventEmitter { ...@@ -135,6 +135,8 @@ class RtpObserver extends EnhancedEventEmitter_1.EnhancedEventEmitter {
async addProducer({ producerId }) { async addProducer({ producerId }) {
logger.debug('addProducer()'); logger.debug('addProducer()');
const producer = this.getProducerById(producerId); const producer = this.getProducerById(producerId);
if (!producer)
throw Error(`Producer with id "${producerId}" not found`);
const reqData = { producerId }; const reqData = { producerId };
await this.channel.request('rtpObserver.addProducer', this.internal.rtpObserverId, reqData); await this.channel.request('rtpObserver.addProducer', this.internal.rtpObserverId, reqData);
// Emit observer event. // Emit observer event.
...@@ -146,6 +148,8 @@ class RtpObserver extends EnhancedEventEmitter_1.EnhancedEventEmitter { ...@@ -146,6 +148,8 @@ class RtpObserver extends EnhancedEventEmitter_1.EnhancedEventEmitter {
async removeProducer({ producerId }) { async removeProducer({ producerId }) {
logger.debug('removeProducer()'); logger.debug('removeProducer()');
const producer = this.getProducerById(producerId); const producer = this.getProducerById(producerId);
if (!producer)
throw Error(`Producer with id "${producerId}" not found`);
const reqData = { producerId }; const reqData = { producerId };
await this.channel.request('rtpObserver.removeProducer', this.internal.rtpObserverId, reqData); await this.channel.request('rtpObserver.removeProducer', this.internal.rtpObserverId, reqData);
// Emit observer event. // Emit observer event.
......
{"version":3,"file":"RtpParameters.d.ts","sourceRoot":"","sources":["../src/RtpParameters.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,oBAAY,eAAe,GAC3B;IACC;;OAEG;IACH,MAAM,CAAC,EAAE,kBAAkB,EAAE,CAAC;IAE9B;;OAEG;IACH,gBAAgB,CAAC,EAAE,kBAAkB,EAAE,CAAC;CACxC,CAAA;AAED;;GAEG;AACH,oBAAY,SAAS,GAAG,OAAO,GAAG,OAAO,CAAC;AAE1C;;;;;;;;;;;;;;;;GAgBG;AACH,oBAAY,kBAAkB,GAC9B;IACC;;OAEG;IACH,IAAI,EAAE,SAAS,CAAC;IAEhB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAE9B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;;OAIG;IACH,UAAU,CAAC,EAAE,GAAG,CAAC;IAEjB;;OAEG;IACH,YAAY,CAAC,EAAE,YAAY,EAAE,CAAC;CAC9B,CAAA;AAED;;GAEG;AACH,oBAAY,2BAA2B,GAAG,UAAU,GAAG,UAAU,GAAG,UAAU,GAAG,UAAU,CAAC;AAE5F;;;;;;;;;GASG;AACH,oBAAY,kBAAkB,GAC9B;IACC;;OAEG;IACH,IAAI,EAAE,SAAS,CAAC;IAKhB,GAA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AEF;;;;;GAKG;AACH,oBAAY,YAAY,GACxB;IACC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;;GAGG;AACH,oBAAY,qBAAqB,GACjC;IACC;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;;OAGG;IACH,GAAG,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IAEvB;;;;;OAKG;IACH,GAAG,CAAC,EAAE,OAAO,CAAC;IAEd;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,UAAU,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF;;;;;;;GAOG;AACH,oBAAY,4BAA4B,GACxC;IACC;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IAEZ;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;OAEG;IACH,UAAU,CAAC,EAAE,GAAG,CAAC;CACjB,CAAC;AAEF;;;;;;;;GAQG;AACH,oBAAY,cAAc,GAC1B;IACC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;OAEG;IACH,GAAG,CAAC,EAAE,OAAO,CAAC;CACd,CAAC"}
\ No newline at end of file \ No newline at end of file
{"version":3,"file":"SctpParameters.d.ts","sourceRoot":"","sources":["../src/SctpParameters.ts"],"names":[],"mappings":"AAAA,oBAAY,gBAAgB,GAC5B;IACE,UAAU,EAAE,cAAc,CAAC;CAC5B,CAAA;AAED;;;;;;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AE,OAAO,CAAC;IAElB;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC"}
\ No newline at end of file \ No newline at end of file
{"version":3,"file":"SrtpParameters.d.ts","sourceRoot":"","sources":["../src/SrtpParameters.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,oBAAY,cAAc,GAC1B;IACC;;OAEG;IACH,WAAW,EAAE,eAAe,CAAC;IAE7B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CAClB,CAAA;AAED;;GAEG;AACH,oBAAY,eAAe,GACxB,kBAAkB,GAClB,kBAAkB,GAClB,yBAAyB,GACzB,yBAAyB,CAAC"} {"version":3,"file":"SrtpParameters.d.ts","sourceRoot":"","sources":["../src/SrtpParameters.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,oBAAY,cAAc,GAC1B;IACC;;OAEG;IACH,WAAW,EAAE,eAAe,CAAC;IAE7B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF;;GAEG;AACH,oBAAY,eAAe,GACxB,kBAAkB,GAClB,kBAAkB,GAClB,yBAAyB,GACzB,yBAAyB,CAAC"}
\ No newline at end of file \ No newline at end of file
import { EnhancedEventEmitter } from './EnhancedEventEmitter'; import { EnhancedEventEmitter } from './EnhancedEventEmitter';
import { Channel } from './Channel'; import { Channel } from './Channel';
import { PayloadChannel } from './PayloadChannel'; import { PayloadChannel } from './PayloadChannel';
import { RouterInternal } from './Router';
import { WebRtcTransportData } from './WebRtcTransport';
import { PlainTransportData } from './PlainTransport';
import { PipeTransportData } from './PipeTransport';
import { DirectTransportData } from './DirectTransport';
import { Producer, ProducerOptions } from './Producer'; import { Producer, ProducerOptions } from './Producer';
import { Consumer, ConsumerOptions } from './Consumer'; import { Consumer, ConsumerOptions } from './Consumer';
import { DataProducer, DataProducerOptions } from './DataProducer'; import { DataProducer, DataProducerOptions } from './DataProducer';
...@@ -73,16 +78,27 @@ export declare type TransportObserverEvents = { ...@@ -73,16 +78,27 @@ export declare type TransportObserverEvents = {
newdataconsumer: [DataConsumer]; newdataconsumer: [DataConsumer];
trace: [TransportTraceEventData]; trace: [TransportTraceEventData];
}; };
export declare type TransportConstructorOptions = {
internal: TransportInternal;
data: TransportData;
channel: Channel;
payloadChannel: PayloadChannel;
appData?: Record<string, unknown>;
getRouterRtpCapabilities: () => RtpCapabilities;
getProducerById: (producerId: string) => Producer | undefined;
getDataProducerById: (dataProducerId: string) => DataProducer | undefined;
};
export declare type TransportInternal = RouterInternal & {
transportId: string;
};
declare type TransportData = WebRtcTransportData | PlainTransportData | PipeTransportData | DirectTransportData;
export declare class Transport<Events extends TransportEvents = TransportEvents, ObserverEvents extends TransportObserverEvents = TransportObserverEvents> extends EnhancedEventEmitter<Events> { export declare class Transport<Events extends TransportEvents = TransportEvents, ObserverEvents extends TransportObserverEvents = TransportObserverEvents> extends EnhancedEventEmitter<Events> {
#private; #private;
protected readonly internal: { protected readonly internal: TransportInternal;
routerId: string;
transportId: string;
};
protected readonly channel: Channel; protected readonly channel: Channel;
protected readonly payloadChannel: PayloadChannel; protected readonly payloadChannel: PayloadChannel;
protected readonly getProducerById: (producerId: string) => Producer; protected readonly getProducerById: (producerId: string) => Producer | undefined;
protected readonly getDataProducerById: (dataProducerId: string) => DataProducer; protected readonly getDataProducerById: (dataProducerId: string) => DataProducer | undefined;
protected readonly consumers: Map<string, Consumer>; protected readonly consumers: Map<string, Consumer>;
protected readonly dataProducers: Map<string, DataProducer>; protected readonly dataProducers: Map<string, DataProducer>;
protected readonly dataConsumers: Map<string, DataConsumer>; protected readonly dataConsumers: Map<string, DataConsumer>;
...@@ -90,16 +106,7 @@ export declare class Transport<Events extends TransportEvents = TransportEvents, ...@@ -90,16 +106,7 @@ export declare class Transport<Events extends TransportEvents = TransportEvents,
* @private * @private
* @interface * @interface
*/ */
constructor({ internal, data, channel, payloadChannel, appData, getRouterRtpCapabilities, getProducerById, getDataProducerById }: { constructor({ internal, data, channel, payloadChannel, appData, getRouterRtpCapabilities, getProducerById, getDataProducerById }: TransportConstructorOptions);
internal: any;
data: any;
channel: Channel;
payloadChannel: PayloadChannel;
appData?: Record<string, unknown>;
getRouterRtpCapabilities: () => RtpCapabilities;
getProducerById: (producerId: string) => Producer;
getDataProducerById: (dataProducerId: string) => DataProducer;
});
/** /**
* Transport id. * Transport id.
*/ */
...@@ -191,4 +198,5 @@ export declare class Transport<Events extends TransportEvents = TransportEvents, ...@@ -191,4 +198,5 @@ export declare class Transport<Events extends TransportEvents = TransportEvents,
enableTraceEvent(types?: TransportTraceEventType[]): Promise<void>; enableTraceEvent(types?: TransportTraceEventType[]): Promise<void>;
private getNextSctpStreamId; private getNextSctpStreamId;
} }
export {};
//# sourceMappingURL=Transport.d.ts.map //# sourceMappingURL=Transport.d.ts.map
\ No newline at end of file
{"version":3,"file":"Transport.d.ts","sourceRoot":"","sources":["../src/Transport.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAG9D,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AACvD,OAAO,EACN,YAAY,EACZ,mBAAmB,EAEnB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACN,YAAY,EACZ,mBAAmB,EAEnB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAGlD,MAAM,WAAW,iBAAiB;IAEjC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,oBAAY,iBAAiB,GA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G,qBAAqB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAU3D;;OAEG;IACG,qBAAqB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAU3D;;OAEG;IACG,OAAO,CACZ,EACC,EAAc,EACd,IAAI,EACJ,aAAa,EACb,MAAc,EACd,oBAAoB,EACpB,OAAO,EACP,EAAE,eAAe,GAChB,OAAO,CAAC,QAAQ,CAAC;IA0GpB;;;;OAIG;IACG,OAAO,CACZ,EACC,UAAU,EACV,eAAe,EACf,MAAc,EACd,GAAG,EACH,eAAe,EACf,SAAiB,EACjB,IAAY,EACZ,OAAO,EACP,EAAE,eAAe,GAChB,OAAO,CAAC,QAAQ,CAAC;IAgGpB;;OAEG;IACG,WAAW,CAChB,EACC,EAAc,EACd,oBAAoB,EACpB,KAAU,EACV,QAAa,EACb,OAAO,EACP,GAAE,mBAAwB,GACzB,OAAO,CAAC,YAAY,CAAC;IAuExB;;OAEG;IACG,WAAW,CAChB,EACC,cAAc,EACd,OAAO,EACP,iBAAiB,EACjB,cAAc,EACd,OAAO,EACP,EAAE,mBAAmB,GACpB,OAAO,CAAC,YAAY,CAAC;IA4GxB;;OAEG;IACG,gBAAgB,CAAC,KAAK,GAAE,uBAAuB,EAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAU5E,OAAO,CAAC,mBAAmB;CA+B3B"}
\ No newline at end of file \ No newline at end of file
...@@ -40,13 +40,16 @@ export declare type WebRtcServerObserverEvents = { ...@@ -40,13 +40,16 @@ export declare type WebRtcServerObserverEvents = {
webrtctransporthandled: [WebRtcTransport]; webrtctransporthandled: [WebRtcTransport];
webrtctransportunhandled: [WebRtcTransport]; webrtctransportunhandled: [WebRtcTransport];
}; };
declare type WebRtcServerInternal = {
webRtcServerId: string;
};
export declare class WebRtcServer extends EnhancedEventEmitter<WebRtcServerEvents> { export declare class WebRtcServer extends EnhancedEventEmitter<WebRtcServerEvents> {
#private; #private;
/** /**
* @private * @private
*/ */
constructor({ internal, channel, appData }: { constructor({ internal, channel, appData }: {
internal: any; internal: WebRtcServerInternal;
channel: Channel; channel: Channel;
appData?: Record<string, unknown>; appData?: Record<string, unknown>;
}); });
...@@ -94,4 +97,5 @@ export declare class WebRtcServer extends EnhancedEventEmitter<WebRtcServerEvent ...@@ -94,4 +97,5 @@ export declare class WebRtcServer extends EnhancedEventEmitter<WebRtcServerEvent
*/ */
handleWebRtcTransport(webRtcTransport: WebRtcTransport): void; handleWebRtcTransport(webRtcTransport: WebRtcTransport): void;
} }
export {};
//# sourceMappingURL=WebRtcServer.d.ts.map //# sourceMappingURL=WebRtcServer.d.ts.map
\ No newline at end of file
{"version":3,"file":"WebRtcServer.d.ts","sourceRoot":"","sources":["../src/WebRtcServer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,MAAM,WAAW,sBAAsB;IAEtC;;OAEG;IACH,QAAQ,EAAE,iBAAiB,CAAC;IAE5B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;CACb;AAED,oBAAY,mBAAmB,GAC/B;IACC;;OAEG;IACH,WAAW,EAAE,sBAAsB,EAAE,CAAC;IAEtC;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAClC,CAAA;AAED,oBAAY,kBAAkB,GAC9B;IACC,WAAW,EAAE,EAAE,CAAC;IAEhB,QAAQ,EAAE,EAAE,CAAC;CACb,CAAA;AAED,oBAAY,0BAA0B,GACtC;IACC,KAAK,EAAE,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AAC,MAAM,EAAE,OAAO,CAAC,EAG3C;IAED;;OAEG;IACH,IAAI,QAAQ,IAAI,oBAAoB,CAAC,0BAA0B,CAAC,CAG/D;IAED;;;OAGG;IACH,IAAI,0BAA0B,IAAI,GAAG,CAAC,MAAM,EAAE,eAAe,CAAC,CAG7D;IAED;;OAEG;IACH,KAAK,IAAI,IAAI;IA8Bb;;;;OAIG;IACH,YAAY,IAAI,IAAI;IAmBpB;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC,GAAG,CAAC;IAO1B;;OAEG;IACH,qBAAqB,CAAC,eAAe,EAAE,eAAe,GAAG,IAAI;CAe7D"}
\ No newline at end of file \ No newline at end of file
import { Transport, TransportListenIp, TransportProtocol, TransportTuple, TransportEvents, TransportObserverEvents, SctpState } from './Transport'; import { Transport, TransportListenIp, TransportProtocol, TransportTuple, TransportEvents, TransportObserverEvents, TransportConstructorOptions, SctpState } from './Transport';
import { WebRtcServer } from './WebRtcServer'; import { WebRtcServer } from './WebRtcServer';
import { SctpParameters, NumSctpStreams } from './SctpParameters'; import { SctpParameters, NumSctpStreams } from './SctpParameters';
import { Either } from './utils'; import { Either } from './utils';
...@@ -136,12 +136,27 @@ export declare type WebRtcTransportObserverEvents = TransportObserverEvents & { ...@@ -136,12 +136,27 @@ export declare type WebRtcTransportObserverEvents = TransportObserverEvents & {
dtlsstatechange: [DtlsState]; dtlsstatechange: [DtlsState];
sctpstatechange: [SctpState]; sctpstatechange: [SctpState];
}; };
declare type WebRtcTransportConstructorOptions = TransportConstructorOptions & {
data: WebRtcTransportData;
};
export declare type WebRtcTransportData = {
iceRole: 'controlled';
iceParameters: IceParameters;
iceCandidates: IceCandidate[];
iceState: IceState;
iceSelectedTuple?: TransportTuple;
dtlsParameters: DtlsParameters;
dtlsState: DtlsState;
dtlsRemoteCert?: string;
sctpParameters?: SctpParameters;
sctpState?: SctpState;
};
export declare class WebRtcTransport extends Transport<WebRtcTransportEvents, WebRtcTransportObserverEvents> { export declare class WebRtcTransport extends Transport<WebRtcTransportEvents, WebRtcTransportObserverEvents> {
#private; #private;
/** /**
* @private * @private
*/ */
constructor(params: any); constructor(options: WebRtcTransportConstructorOptions);
/** /**
* ICE role. * ICE role.
*/ */
...@@ -221,4 +236,5 @@ export declare class WebRtcTransport extends Transport<WebRtcTransportEvents, We ...@@ -221,4 +236,5 @@ export declare class WebRtcTransport extends Transport<WebRtcTransportEvents, We
restartIce(): Promise<IceParameters>; restartIce(): Promise<IceParameters>;
private handleWorkerNotifications; private handleWorkerNotifications;
} }
export {};
//# sourceMappingURL=WebRtcTransport.d.ts.map //# sourceMappingURL=WebRtcTransport.d.ts.map
\ No newline at end of file
{"version":3,"file":"WebRtcTransport.d.ts","sourceRoot":"","sources":["../src/WebRtcTransport.ts"],"names":[],"mappings":"AACA,OAAO,EACN,SAAS,EACT,iBAAiB,EACjB,iBAAiB,EACjB,cAAc,EAEd,eAAe,EACf,uBAAuB,EACvB,SAAS,EACT,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClE,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAEjC,oBAAY,+BAA+B,GAC3C;IACC;;;OAGG;IACH,SAAS,EAAE,CAAC,iBAAiB,GAAG,MAAM,CAAC,EAAE,CAAC;IAE1C;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACd,CAAA;AAED,oBAAY,2BAA2B,GACvC;IACC;;OAEG;IACH,YAAY,EAAE,YAAY,CAAC;CAC3B,CAAA;AAED,oBAAY,qBAAqB,GAChC,MAAM,CAAC,+BAA+B,EAAE,2BAA2B,CAAC,CAAC;AAEtE,oBAAY,0BAA0B,GACtC;IACC;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;OAEG;I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AEG;IACG,UAAU,IAAI,OAAO,CAAC,aAAa,CAAC;IAc1C,OAAO,CAAC,yBAAyB;CAqFjC"}
\ No newline at end of file \ No newline at end of file
...@@ -10,10 +10,10 @@ class WebRtcTransport extends Transport_1.Transport { ...@@ -10,10 +10,10 @@ class WebRtcTransport extends Transport_1.Transport {
/** /**
* @private * @private
*/ */
constructor(params) { constructor(options) {
super(params); super(options);
logger.debug('constructor()'); logger.debug('constructor()');
const { data } = params; const { data } = options;
this.#data = this.#data =
{ {
iceRole: data.iceRole, iceRole: data.iceRole,
......
{"version":3,"file":"Worker.d.ts","sourceRoot":"","sources":["../src/Worker.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAI9D,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAEnE,oBAAY,cAAc,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;AAEjE,oBAAY,YAAY,GACpB,MAAM,GACN,KAAK,GACL,MAAM,GACN,KAAK,GACL,MAAM,GACN,MAAM,GACN,KAAK,GACL,KAAK,GACL,OAAO,GACP,WAAW,GACX,KAAK,GACL,MAAM,GACN,SAAS,CAAA;AAEb,oBAAY,cAAc,GAC1B;IACC;;;;OAIG;IACH,QAAQ,CAAC,EAAE,cAAc,CAAC;IAE1B;;;OAGG;IACH,OAAO,CAAC,EAAE,YAAY,EAAE,CAAC;IAEzB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAE7B;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAE5B;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAA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ACH,IAAI,QAAQ,IAAI,oBAAoB,CAAC,oBAAoB,CAAC,CAGzD;IAED;;;OAGG;IACH,IAAI,uBAAuB,IAAI,GAAG,CAAC,YAAY,CAAC,CAG/C;IAED;;;OAGG;IACH,IAAI,iBAAiB,IAAI,GAAG,CAAC,MAAM,CAAC,CAGnC;IAED;;OAEG;IACH,KAAK,IAAI,IAAI;IA6Cb;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC,GAAG,CAAC;IAO1B;;OAEG;IACG,gBAAgB,IAAI,OAAO,CAAC,mBAAmB,CAAC;IAOtD;;OAEG;IACG,cAAc,CACnB,EACC,QAAQ,EACR,OAAO,EACP,GAAE,wBAA6B,GAC9B,OAAO,CAAC,IAAI,CAAC;IAShB;;OAEG;IACG,kBAAkB,CACvB,EACC,WAAW,EACX,OAAO,EACP,EAAE,mBAAmB,GAAG,OAAO,CAAC,YAAY,CAAC;IA+B/C;;OAEG;IACG,YAAY,CACjB,EACC,WAAW,EACX,OAAO,EACP,GAAE,aAAkB,GAAG,OAAO,CAAC,MAAM,CAAC;IAoCxC,OAAO,CAAC,UAAU;CAmClB"}
\ No newline at end of file \ No newline at end of file
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAGlD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AAEjC;;GAEG;AACH,OAAO,EAAE,KAAK,EAAE,CAAC;AAEjB;;GAEG;AACH,eAAO,MAAM,OAAO,0BAA0B,CAAC;AAE/C;;GAEG;AACH,OAAO,EAAE,KAAK,IAAI,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAInE,oBAAY,cAAc,GAC1B;IACC,SAAS,EAAE,CAAC,MAAM,CAAC,CAAC;CACpB,CAAA;AAED,QAAA,MAAM,QAAQ,sCAA6C,CAAC;AAE5D;;GAEG;AACH,OAAO,EAAE,QAAQ,EAAE,CAAC;AAEpB;;GAEG;AACH,wBAAsB,YAAY,CACjC,EACC,QAAkB,EAClB,OAAO,EACP,UAAkB,EAClB,UAAkB,EAClB,mBAAmB,EACnB,kBAAkB,EAClB,OAAO,EACP,GAAE,cAAmB,GACpB,OAAO,CAAC,MAAM,CAAC,CA8BjB;AAED;;GAEG;AACH,wBAAgB,2BAA2B,IAAI,eAAe,CAG7D"} {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAGlD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AAEjC;;GAEG;AACH,OAAO,EAAE,KAAK,EAAE,CAAC;AAEjB;;GAEG;AACH,eAAO,MAAM,OAAO,0BAA0B,CAAC;AAE/C;;GAEG;AACH,OAAO,EAAE,KAAK,IAAI,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAInE,oBAAY,cAAc,GAC1B;IACC,SAAS,EAAE,CAAC,MAAM,CAAC,CAAC;CACpB,CAAC;AAEF,QAAA,MAAM,QAAQ,sCAA6C,CAAC;AAE5D;;GAEG;AACH,OAAO,EAAE,QAAQ,EAAE,CAAC;AAEpB;;GAEG;AACH,wBAAsB,YAAY,CACjC,EACC,QAAkB,EAClB,OAAO,EACP,UAAkB,EAClB,UAAkB,EAClB,mBAAmB,EACnB,kBAAkB,EAClB,OAAO,EACP,GAAE,cAAmB,GACpB,OAAO,CAAC,MAAM,CAAC,CA8BjB;AAED;;GAEG;AACH,wBAAgB,2BAA2B,IAAI,eAAe,CAG7D"}
\ No newline at end of file \ No newline at end of file
{"version":3,"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YjE;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,gBAAgB,GAAG,IAAI,CAUrE;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,cAAc,GAAG,IAAI,CAYvE;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,cAAc,GAAG,IAAI,CAoBnE;AAED;;;;GAIG;AACH,wBAAgB,4BAA4B,CAAC,MAAM,EAAE,oBAAoB,GAAG,IAAI,CAwC/E;AAED;;;GAGG;AACH,wBAAgB,6BAA6B,CAC5C,WAAW,GAAE,kBAAkB,EAAO,GACpC,eAAe,CAuGjB;AAED;;;;;GAKG;AACH,wBAAgB,+BAA+B,CAC9C,MAAM,EAAE,aAAa,EACrB,IAAI,EAAE,eAAe,GACnB,UAAU,CA+FZ;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,CACzC,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,aAAa,EACrB,IAAI,EAAE,eAAe,EACrB,UAAU,EAAE,UAAU,GACpB,aAAa,CAyGf;AAED;;GAEG;AACH,wBAAgB,UAAU,CACzB,gBAAgB,EAAE,aAAa,EAC/B,IAAI,EAAE,eAAe,GACnB,OAAO,CAuBT;AAED;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CACvC,gBAAgB,EAAE,aAAa,EAC/B,IAAI,EAAE,eAAe,EACrB,IAAI,EAAE,OAAO,GACX,aAAa,CA6Kf;AAED;;;;;GAKG;AACH,wBAAgB,4BAA4B,CAC3C,gBAAgB,EAAE,aAAa,EAC/B,SAAS,UAAQ,GACf,aAAa,CAwDf"}
\ No newline at end of file \ No newline at end of file
{"version":3,"file":"scalabilityModes.d.ts","sourceRoot":"","sources":["../src/scalabilityModes.ts"],"names":[],"mappings":"AAGA,oBAAY,eAAe,GAC3B;IACC,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;IACvB,IAAI,EAAE,OAAO,CAAC;CACd,CAAA;AAED,wBAAgB,KAAK,CAAC,eAAe,CAAC,EAAE,MAAM,GAAG,eAAe,CAoB/D"} {"version":3,"file":"scalabilityModes.d.ts","sourceRoot":"","sources":["../src/scalabilityModes.ts"],"names":[],"mappings":"AAGA,oBAAY,eAAe,GAC3B;IACC,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;IACvB,IAAI,EAAE,OAAO,CAAC;CACd,CAAC;AAEF,wBAAgB,KAAK,CAAC,eAAe,CAAC,EAAE,MAAM,GAAG,eAAe,CAoB/D"}
\ No newline at end of file \ No newline at end of file
import { Logger } from './Logger'; import { Logger } from './Logger';
import { RtpObserver, RtpObserverEvents, RtpObserverObserverEvents } from './RtpObserver';
import { Producer } from './Producer';
import { EnhancedEventEmitter } from './EnhancedEventEmitter'; import { EnhancedEventEmitter } from './EnhancedEventEmitter';
import {
RtpObserver,
RtpObserverEvents,
RtpObserverObserverEvents,
RtpObserverConstructorOptions
} from './RtpObserver';
import { Producer } from './Producer';
export interface ActiveSpeakerObserverOptions export interface ActiveSpeakerObserverOptions
{ {
...@@ -24,12 +29,14 @@ export interface ActiveSpeakerObserverActivity ...@@ -24,12 +29,14 @@ export interface ActiveSpeakerObserverActivity
export type ActiveSpeakerObserverEvents = RtpObserverEvents & export type ActiveSpeakerObserverEvents = RtpObserverEvents &
{ {
dominantspeaker: [{ producer: Producer }]; dominantspeaker: [{ producer: Producer }];
} };
export type ActiveSpeakerObserverObserverEvents = RtpObserverObserverEvents & export type ActiveSpeakerObserverObserverEvents = RtpObserverObserverEvents &
{ {
dominantspeaker: [{ producer: Producer }]; dominantspeaker: [{ producer: Producer }];
} };
type RtpObserverObserverConstructorOptions = RtpObserverConstructorOptions;
const logger = new Logger('ActiveSpeakerObserver'); const logger = new Logger('ActiveSpeakerObserver');
...@@ -38,9 +45,9 @@ export class ActiveSpeakerObserver extends RtpObserver<ActiveSpeakerObserverEven ...@@ -38,9 +45,9 @@ export class ActiveSpeakerObserver extends RtpObserver<ActiveSpeakerObserverEven
/** /**
* @private * @private
*/ */
constructor(params: any) constructor(options: RtpObserverObserverConstructorOptions)
{ {
super(params); super(options);
this.handleWorkerNotifications(); this.handleWorkerNotifications();
} }
...@@ -61,9 +68,12 @@ export class ActiveSpeakerObserver extends RtpObserver<ActiveSpeakerObserverEven ...@@ -61,9 +68,12 @@ export class ActiveSpeakerObserver extends RtpObserver<ActiveSpeakerObserverEven
{ {
case 'dominantspeaker': case 'dominantspeaker':
{ {
const dominantSpeaker = { const producer = this.getProducerById(data.producerId);
producer : this.getProducerById(data.producerId)
}; if (!producer)
break;
const dominantSpeaker = { producer };
this.safeEmit('dominantspeaker', dominantSpeaker); this.safeEmit('dominantspeaker', dominantSpeaker);
this.observer.safeEmit('dominantspeaker', dominantSpeaker); this.observer.safeEmit('dominantspeaker', dominantSpeaker);
......
import { Logger } from './Logger'; import { Logger } from './Logger';
import { RtpObserver, RtpObserverEvents, RtpObserverObserverEvents } from './RtpObserver';
import { Producer } from './Producer';
import { EnhancedEventEmitter } from './EnhancedEventEmitter'; import { EnhancedEventEmitter } from './EnhancedEventEmitter';
import {
RtpObserver,
RtpObserverEvents,
RtpObserverObserverEvents,
RtpObserverConstructorOptions
} from './RtpObserver';
import { Producer } from './Producer';
export interface AudioLevelObserverOptions export interface AudioLevelObserverOptions
{ {
...@@ -45,13 +50,15 @@ export type AudioLevelObserverEvents = RtpObserverEvents & ...@@ -45,13 +50,15 @@ export type AudioLevelObserverEvents = RtpObserverEvents &
{ {
volumes: [AudioLevelObserverVolume[]]; volumes: [AudioLevelObserverVolume[]];
silence: []; silence: [];
} };
export type AudioLevelObserverObserverEvents = RtpObserverObserverEvents & export type AudioLevelObserverObserverEvents = RtpObserverObserverEvents &
{ {
volumes: [AudioLevelObserverVolume[]]; volumes: [AudioLevelObserverVolume[]];
silence: []; silence: [];
} };
type AudioLevelObserverConstructorOptions = RtpObserverConstructorOptions;
const logger = new Logger('AudioLevelObserver'); const logger = new Logger('AudioLevelObserver');
...@@ -60,9 +67,9 @@ export class AudioLevelObserver extends RtpObserver<AudioLevelObserverEvents> ...@@ -60,9 +67,9 @@ export class AudioLevelObserver extends RtpObserver<AudioLevelObserverEvents>
/** /**
* @private * @private
*/ */
constructor(params: any) constructor(options: AudioLevelObserverConstructorOptions)
{ {
super(params); super(options);
this.handleWorkerNotifications(); this.handleWorkerNotifications();
} }
......
...@@ -14,7 +14,7 @@ type Sent = ...@@ -14,7 +14,7 @@ type Sent =
resolve: (data?: any) => void; resolve: (data?: any) => void;
reject: (error: Error) => void; reject: (error: Error) => void;
close: () => void; close: () => void;
} };
// Binary length for a 4194304 bytes payload. // Binary length for a 4194304 bytes payload.
const MESSAGE_MAX_LEN = 4194308; const MESSAGE_MAX_LEN = 4194308;
......
...@@ -2,6 +2,7 @@ import { Logger } from './Logger'; ...@@ -2,6 +2,7 @@ import { Logger } from './Logger';
import { EnhancedEventEmitter } from './EnhancedEventEmitter'; import { EnhancedEventEmitter } from './EnhancedEventEmitter';
import { Channel } from './Channel'; import { Channel } from './Channel';
import { PayloadChannel } from './PayloadChannel'; import { PayloadChannel } from './PayloadChannel';
import { TransportInternal } from './Transport';
import { ProducerStat } from './Producer'; import { ProducerStat } from './Producer';
import { import {
MediaKind, MediaKind,
...@@ -65,7 +66,7 @@ export type ConsumerOptions = ...@@ -65,7 +66,7 @@ export type ConsumerOptions =
* Custom application data. * Custom application data.
*/ */
appData?: Record<string, unknown>; appData?: Record<string, unknown>;
} };
/** /**
* Valid types for 'trace' event. * Valid types for 'trace' event.
...@@ -96,7 +97,7 @@ export type ConsumerTraceEventData = ...@@ -96,7 +97,7 @@ export type ConsumerTraceEventData =
* Per type information. * Per type information.
*/ */
info: any; info: any;
} };
export type ConsumerScore = export type ConsumerScore =
{ {
...@@ -115,7 +116,7 @@ export type ConsumerScore = ...@@ -115,7 +116,7 @@ export type ConsumerScore =
* useful when the producer uses simulcast). * useful when the producer uses simulcast).
*/ */
producerScores: number[]; producerScores: number[];
} };
export type ConsumerLayers = export type ConsumerLayers =
{ {
...@@ -128,7 +129,7 @@ export type ConsumerLayers = ...@@ -128,7 +129,7 @@ export type ConsumerLayers =
* The temporal layer index (from 0 to N). * The temporal layer index (from 0 to N).
*/ */
temporalLayer?: number; temporalLayer?: number;
} };
export type ConsumerStat = export type ConsumerStat =
{ {
...@@ -153,7 +154,7 @@ export type ConsumerStat = ...@@ -153,7 +154,7 @@ export type ConsumerStat =
byteCount: number; byteCount: number;
bitrate: number; bitrate: number;
roundTripTime?: number; roundTripTime?: number;
} };
/** /**
* Consumer type. * Consumer type.
...@@ -173,7 +174,7 @@ export type ConsumerEvents = ...@@ -173,7 +174,7 @@ export type ConsumerEvents =
// Private events. // Private events.
'@close': []; '@close': [];
'@producerclose': []; '@producerclose': [];
} };
export type ConsumerObserverEvents = export type ConsumerObserverEvents =
{ {
...@@ -183,28 +184,30 @@ export type ConsumerObserverEvents = ...@@ -183,28 +184,30 @@ export type ConsumerObserverEvents =
score: [ConsumerScore]; score: [ConsumerScore];
layerschange: [ConsumerLayers?]; layerschange: [ConsumerLayers?];
trace: [ConsumerTraceEventData]; trace: [ConsumerTraceEventData];
} };
type ConsumerInternal = TransportInternal &
{
consumerId: string;
};
type ConsumerData =
{
producerId: string;
kind: MediaKind;
rtpParameters: RtpParameters;
type: ConsumerType;
};
const logger = new Logger('Consumer'); const logger = new Logger('Consumer');
export class Consumer extends EnhancedEventEmitter<ConsumerEvents> export class Consumer extends EnhancedEventEmitter<ConsumerEvents>
{ {
// Internal data. // Internal data.
readonly #internal: readonly #internal: ConsumerInternal;
{
routerId: string;
transportId: string;
consumerId: string;
};
// Consumer data. // Consumer data.
readonly #data: readonly #data: ConsumerData;
{
producerId: string;
kind: MediaKind;
rtpParameters: RtpParameters;
type: ConsumerType;
};
// Channel instance. // Channel instance.
readonly #channel: Channel; readonly #channel: Channel;
...@@ -255,8 +258,8 @@ export class Consumer extends EnhancedEventEmitter<ConsumerEvents> ...@@ -255,8 +258,8 @@ export class Consumer extends EnhancedEventEmitter<ConsumerEvents>
preferredLayers preferredLayers
}: }:
{ {
internal: any; internal: ConsumerInternal;
data: any; data: ConsumerData;
channel: Channel; channel: Channel;
payloadChannel: PayloadChannel; payloadChannel: PayloadChannel;
appData?: Record<string, unknown>; appData?: Record<string, unknown>;
......
...@@ -2,6 +2,7 @@ import { Logger } from './Logger'; ...@@ -2,6 +2,7 @@ import { Logger } from './Logger';
import { EnhancedEventEmitter } from './EnhancedEventEmitter'; import { EnhancedEventEmitter } from './EnhancedEventEmitter';
import { Channel } from './Channel'; import { Channel } from './Channel';
import { PayloadChannel } from './PayloadChannel'; import { PayloadChannel } from './PayloadChannel';
import { TransportInternal } from './Transport';
import { SctpStreamParameters } from './SctpParameters'; import { SctpStreamParameters } from './SctpParameters';
export type DataConsumerOptions = export type DataConsumerOptions =
...@@ -39,7 +40,7 @@ export type DataConsumerOptions = ...@@ -39,7 +40,7 @@ export type DataConsumerOptions =
* Custom application data. * Custom application data.
*/ */
appData?: Record<string, unknown>; appData?: Record<string, unknown>;
} };
export type DataConsumerStat = export type DataConsumerStat =
{ {
...@@ -50,7 +51,7 @@ export type DataConsumerStat = ...@@ -50,7 +51,7 @@ export type DataConsumerStat =
messagesSent: number; messagesSent: number;
bytesSent: number; bytesSent: number;
bufferedAmount: number; bufferedAmount: number;
} };
/** /**
* DataConsumer type. * DataConsumer type.
...@@ -67,34 +68,36 @@ export type DataConsumerEvents = ...@@ -67,34 +68,36 @@ export type DataConsumerEvents =
// Private events. // Private events.
'@close': []; '@close': [];
'@dataproducerclose': []; '@dataproducerclose': [];
} };
export type DataConsumerObserverEvents = export type DataConsumerObserverEvents =
{ {
close: []; close: [];
} };
type DataConsumerInternal = TransportInternal &
{
dataConsumerId: string;
};
type DataConsumerData =
{
dataProducerId: string;
type: DataConsumerType;
sctpStreamParameters?: SctpStreamParameters;
label: string;
protocol: string;
};
const logger = new Logger('DataConsumer'); const logger = new Logger('DataConsumer');
export class DataConsumer extends EnhancedEventEmitter<DataConsumerEvents> export class DataConsumer extends EnhancedEventEmitter<DataConsumerEvents>
{ {
// Internal data. // Internal data.
readonly #internal: readonly #internal: DataConsumerInternal;
{
routerId: string;
transportId: string;
dataConsumerId: string;
};
// DataConsumer data. // DataConsumer data.
readonly #data: readonly #data: DataConsumerData;
{
dataProducerId: string;
type: DataConsumerType;
sctpStreamParameters?: SctpStreamParameters;
label: string;
protocol: string;
};
// Channel instance. // Channel instance.
readonly #channel: Channel; readonly #channel: Channel;
...@@ -123,8 +126,8 @@ export class DataConsumer extends EnhancedEventEmitter<DataConsumerEvents> ...@@ -123,8 +126,8 @@ export class DataConsumer extends EnhancedEventEmitter<DataConsumerEvents>
appData appData
}: }:
{ {
internal: any; internal: DataConsumerInternal;
data: any; data: DataConsumerData;
channel: Channel; channel: Channel;
payloadChannel: PayloadChannel; payloadChannel: PayloadChannel;
appData?: Record<string, unknown>; appData?: Record<string, unknown>;
......
...@@ -2,6 +2,7 @@ import { Logger } from './Logger'; ...@@ -2,6 +2,7 @@ import { Logger } from './Logger';
import { EnhancedEventEmitter } from './EnhancedEventEmitter'; import { EnhancedEventEmitter } from './EnhancedEventEmitter';
import { Channel } from './Channel'; import { Channel } from './Channel';
import { PayloadChannel } from './PayloadChannel'; import { PayloadChannel } from './PayloadChannel';
import { TransportInternal } from './Transport';
import { SctpStreamParameters } from './SctpParameters'; import { SctpStreamParameters } from './SctpParameters';
export type DataProducerOptions = export type DataProducerOptions =
...@@ -31,7 +32,7 @@ export type DataProducerOptions = ...@@ -31,7 +32,7 @@ export type DataProducerOptions =
* Custom application data. * Custom application data.
*/ */
appData?: Record<string, unknown>; appData?: Record<string, unknown>;
} };
export type DataProducerStat = export type DataProducerStat =
{ {
...@@ -41,7 +42,7 @@ export type DataProducerStat = ...@@ -41,7 +42,7 @@ export type DataProducerStat =
protocol: string; protocol: string;
messagesReceived: number; messagesReceived: number;
bytesReceived: number; bytesReceived: number;
} };
/** /**
* DataProducer type. * DataProducer type.
...@@ -53,33 +54,35 @@ export type DataProducerEvents = ...@@ -53,33 +54,35 @@ export type DataProducerEvents =
transportclose: []; transportclose: [];
// Private events. // Private events.
'@close': []; '@close': [];
} };
export type DataProducerObserverEvents = export type DataProducerObserverEvents =
{ {
close: []; close: [];
} };
type DataProducerInternal = TransportInternal &
{
dataProducerId: string;
};
type DataProducerData =
{
type: DataProducerType;
sctpStreamParameters?: SctpStreamParameters;
label: string;
protocol: string;
};
const logger = new Logger('DataProducer'); const logger = new Logger('DataProducer');
export class DataProducer extends EnhancedEventEmitter<DataProducerEvents> export class DataProducer extends EnhancedEventEmitter<DataProducerEvents>
{ {
// Internal data. // Internal data.
readonly #internal: readonly #internal: DataProducerInternal;
{
routerId: string;
transportId: string;
dataProducerId: string;
};
// DataProducer data. // DataProducer data.
readonly #data: readonly #data: DataProducerData;
{
type: DataProducerType;
sctpStreamParameters?: SctpStreamParameters;
label: string;
protocol: string;
};
// Channel instance. // Channel instance.
readonly #channel: Channel; readonly #channel: Channel;
...@@ -108,8 +111,8 @@ export class DataProducer extends EnhancedEventEmitter<DataProducerEvents> ...@@ -108,8 +111,8 @@ export class DataProducer extends EnhancedEventEmitter<DataProducerEvents>
appData appData
}: }:
{ {
internal: any; internal: DataProducerInternal;
data: any; data: DataProducerData;
channel: Channel; channel: Channel;
payloadChannel: PayloadChannel; payloadChannel: PayloadChannel;
appData?: Record<string, unknown>; appData?: Record<string, unknown>;
......
import { Logger } from './Logger'; import { Logger } from './Logger';
import { UnsupportedError } from './errors'; import { UnsupportedError } from './errors';
import { Transport, TransportTraceEventData, TransportEvents, TransportObserverEvents } from './Transport'; import {
Transport,
TransportTraceEventData,
TransportEvents,
TransportObserverEvents,
TransportConstructorOptions
} from './Transport';
import { SctpParameters } from './SctpParameters';
export type DirectTransportOptions = export type DirectTransportOptions =
{ {
...@@ -14,7 +21,7 @@ export type DirectTransportOptions = ...@@ -14,7 +21,7 @@ export type DirectTransportOptions =
* Custom application data. * Custom application data.
*/ */
appData?: Record<string, unknown>; appData?: Record<string, unknown>;
} };
export type DirectTransportStat = export type DirectTransportStat =
{ {
...@@ -39,17 +46,27 @@ export type DirectTransportStat = ...@@ -39,17 +46,27 @@ export type DirectTransportStat =
availableOutgoingBitrate?: number; availableOutgoingBitrate?: number;
availableIncomingBitrate?: number; availableIncomingBitrate?: number;
maxIncomingBitrate?: number; maxIncomingBitrate?: number;
} };
export type DirectTransportEvents = TransportEvents & export type DirectTransportEvents = TransportEvents &
{ {
rtcp: [Buffer]; rtcp: [Buffer];
} };
export type DirectTransportObserverEvents = TransportObserverEvents & export type DirectTransportObserverEvents = TransportObserverEvents &
{ {
rtcp: [Buffer]; rtcp: [Buffer];
} };
type DirectTransportConstructorOptions = TransportConstructorOptions &
{
data: DirectTransportData;
};
export type DirectTransportData =
{
sctpParameters?: SctpParameters;
};
const logger = new Logger('DirectTransport'); const logger = new Logger('DirectTransport');
...@@ -57,23 +74,20 @@ export class DirectTransport extends ...@@ -57,23 +74,20 @@ export class DirectTransport extends
Transport<DirectTransportEvents, DirectTransportObserverEvents> Transport<DirectTransportEvents, DirectTransportObserverEvents>
{ {
// DirectTransport data. // DirectTransport data.
readonly #data: readonly #data: DirectTransportData;
{
// Nothing for now.
};
/** /**
* @private * @private
*/ */
constructor(params: any) constructor(options: DirectTransportConstructorOptions)
{ {
super(params); super(options);
logger.debug('constructor()'); logger.debug('constructor()');
this.#data = this.#data =
{ {
// Nothing for now. // Nothing.
}; };
this.handleWorkerNotifications(); this.handleWorkerNotifications();
......
...@@ -3,7 +3,7 @@ import { Logger } from './Logger'; ...@@ -3,7 +3,7 @@ import { Logger } from './Logger';
const logger = new Logger('EnhancedEventEmitter'); const logger = new Logger('EnhancedEventEmitter');
type Events = Record<string, any[]> type Events = Record<string, any[]>;
export class EnhancedEventEmitter<E extends Events = Events> extends EventEmitter export class EnhancedEventEmitter<E extends Events = Events> extends EventEmitter
{ {
......
...@@ -14,7 +14,7 @@ type Sent = ...@@ -14,7 +14,7 @@ type Sent =
resolve: (data?: any) => void; resolve: (data?: any) => void;
reject: (error: Error) => void; reject: (error: Error) => void;
close: () => void; close: () => void;
} };
// Binary length for a 4194304 bytes payload. // Binary length for a 4194304 bytes payload.
const MESSAGE_MAX_LEN = 4194308; const MESSAGE_MAX_LEN = 4194308;
......
...@@ -8,9 +8,10 @@ import { ...@@ -8,9 +8,10 @@ import {
TransportTraceEventData, TransportTraceEventData,
TransportEvents, TransportEvents,
TransportObserverEvents, TransportObserverEvents,
TransportConstructorOptions,
SctpState SctpState
} from './Transport'; } from './Transport';
import { Consumer } from './Consumer'; import { Consumer, ConsumerType } from './Consumer';
import { SctpParameters, NumSctpStreams } from './SctpParameters'; import { SctpParameters, NumSctpStreams } from './SctpParameters';
import { SrtpParameters } from './SrtpParameters'; import { SrtpParameters } from './SrtpParameters';
...@@ -67,7 +68,7 @@ export type PipeTransportOptions = ...@@ -67,7 +68,7 @@ export type PipeTransportOptions =
* Custom application data. * Custom application data.
*/ */
appData?: Record<string, unknown>; appData?: Record<string, unknown>;
} };
export type PipeTransportStat = export type PipeTransportStat =
{ {
...@@ -95,7 +96,7 @@ export type PipeTransportStat = ...@@ -95,7 +96,7 @@ export type PipeTransportStat =
maxIncomingBitrate?: number; maxIncomingBitrate?: number;
// PipeTransport specific. // PipeTransport specific.
tuple: TransportTuple; tuple: TransportTuple;
} };
export type PipeConsumerOptions = export type PipeConsumerOptions =
{ {
...@@ -108,17 +109,31 @@ export type PipeConsumerOptions = ...@@ -108,17 +109,31 @@ export type PipeConsumerOptions =
* Custom application data. * Custom application data.
*/ */
appData?: Record<string, unknown>; appData?: Record<string, unknown>;
} };
export type PipeTransportEvents = TransportEvents & export type PipeTransportEvents = TransportEvents &
{ {
sctpstatechange: [SctpState]; sctpstatechange: [SctpState];
} };
export type PipeTransportObserverEvents = TransportObserverEvents & export type PipeTransportObserverEvents = TransportObserverEvents &
{ {
sctpstatechange: [SctpState]; sctpstatechange: [SctpState];
} };
type PipeTransportConstructorOptions = TransportConstructorOptions &
{
data: PipeTransportData;
};
export type PipeTransportData =
{
tuple: TransportTuple;
sctpParameters?: SctpParameters;
sctpState?: SctpState;
rtx: boolean;
srtpParameters?: SrtpParameters;
};
const logger = new Logger('PipeTransport'); const logger = new Logger('PipeTransport');
...@@ -126,25 +141,18 @@ export class PipeTransport ...@@ -126,25 +141,18 @@ export class PipeTransport
extends Transport<PipeTransportEvents, PipeTransportObserverEvents> extends Transport<PipeTransportEvents, PipeTransportObserverEvents>
{ {
// PipeTransport data. // PipeTransport data.
readonly #data: readonly #data: PipeTransportData;
{
tuple: TransportTuple;
sctpParameters?: SctpParameters;
sctpState?: SctpState;
rtx: boolean;
srtpParameters?: SrtpParameters;
};
/** /**
* @private * @private
*/ */
constructor(params: any) constructor(options: PipeTransportConstructorOptions)
{ {
super(params); super(options);
logger.debug('constructor()'); logger.debug('constructor()');
const { data } = params; const { data } = options;
this.#data = this.#data =
{ {
...@@ -305,7 +313,7 @@ export class PipeTransport ...@@ -305,7 +313,7 @@ export class PipeTransport
producerId, producerId,
kind : producer.kind, kind : producer.kind,
rtpParameters, rtpParameters,
type : 'pipe' type : 'pipe' as ConsumerType
}; };
const consumer = new Consumer( const consumer = new Consumer(
......
...@@ -6,6 +6,7 @@ import { ...@@ -6,6 +6,7 @@ import {
TransportTraceEventData, TransportTraceEventData,
TransportEvents, TransportEvents,
TransportObserverEvents, TransportObserverEvents,
TransportConstructorOptions,
SctpState SctpState
} from './Transport'; } from './Transport';
import { SctpParameters, NumSctpStreams } from './SctpParameters'; import { SctpParameters, NumSctpStreams } from './SctpParameters';
...@@ -75,12 +76,7 @@ export type PlainTransportOptions = ...@@ -75,12 +76,7 @@ export type PlainTransportOptions =
* Custom application data. * Custom application data.
*/ */
appData?: Record<string, unknown>; appData?: Record<string, unknown>;
} };
/**
* DEPRECATED: Use PlainTransportOptions.
*/
export type PlainRtpTransportOptions = PlainTransportOptions;
export type PlainTransportStat = export type PlainTransportStat =
{ {
...@@ -111,26 +107,37 @@ export type PlainTransportStat = ...@@ -111,26 +107,37 @@ export type PlainTransportStat =
comedia: boolean; comedia: boolean;
tuple: TransportTuple; tuple: TransportTuple;
rtcpTuple?: TransportTuple; rtcpTuple?: TransportTuple;
} };
/**
* DEPRECATED: Use PlainTransportStat.
*/
export type PlainRtpTransportStat = PlainTransportStat;
export type PlainTransportEvents = TransportEvents & export type PlainTransportEvents = TransportEvents &
{ {
tuple: [TransportTuple]; tuple: [TransportTuple];
rtcptuple: [TransportTuple]; rtcptuple: [TransportTuple];
sctpstatechange: [SctpState]; sctpstatechange: [SctpState];
} };
export type PlainTransportObserverEvents = TransportObserverEvents & export type PlainTransportObserverEvents = TransportObserverEvents &
{ {
tuple: [TransportTuple]; tuple: [TransportTuple];
rtcptuple: [TransportTuple]; rtcptuple: [TransportTuple];
sctpstatechange: [SctpState]; sctpstatechange: [SctpState];
} };
type PlainTransportConstructorOptions = TransportConstructorOptions &
{
data: PlainTransportData;
};
export type PlainTransportData =
{
rtcpMux?: boolean;
comedia?: boolean;
tuple: TransportTuple;
rtcpTuple?: TransportTuple;
sctpParameters?: SctpParameters;
sctpState?: SctpState;
srtpParameters?: SrtpParameters;
};
const logger = new Logger('PlainTransport'); const logger = new Logger('PlainTransport');
...@@ -138,27 +145,18 @@ export class PlainTransport extends ...@@ -138,27 +145,18 @@ export class PlainTransport extends
Transport<PlainTransportEvents, PlainTransportObserverEvents> Transport<PlainTransportEvents, PlainTransportObserverEvents>
{ {
// PlainTransport data. // PlainTransport data.
readonly #data: readonly #data: PlainTransportData;
{
rtcpMux?: boolean;
comedia?: boolean;
tuple: TransportTuple;
rtcpTuple?: TransportTuple;
sctpParameters?: SctpParameters;
sctpState?: SctpState;
srtpParameters?: SrtpParameters;
};
/** /**
* @private * @private
*/ */
constructor(params: any) constructor(options: PlainTransportConstructorOptions)
{ {
super(params); super(options);
logger.debug('constructor()'); logger.debug('constructor()');
const { data } = params; const { data } = options;
this.#data = this.#data =
{ {
...@@ -364,14 +362,3 @@ export class PlainTransport extends ...@@ -364,14 +362,3 @@ export class PlainTransport extends
}); });
} }
} }
/**
* DEPRECATED: Use PlainTransport.
*/
export class PlainRtpTransport extends PlainTransport
{
constructor(params: any)
{
super(params);
}
}
...@@ -2,6 +2,7 @@ import { Logger } from './Logger'; ...@@ -2,6 +2,7 @@ import { Logger } from './Logger';
import { EnhancedEventEmitter } from './EnhancedEventEmitter'; import { EnhancedEventEmitter } from './EnhancedEventEmitter';
import { Channel } from './Channel'; import { Channel } from './Channel';
import { PayloadChannel } from './PayloadChannel'; import { PayloadChannel } from './PayloadChannel';
import { TransportInternal } from './Transport';
import { MediaKind, RtpParameters } from './RtpParameters'; import { MediaKind, RtpParameters } from './RtpParameters';
export type ProducerOptions = export type ProducerOptions =
...@@ -36,7 +37,7 @@ export type ProducerOptions = ...@@ -36,7 +37,7 @@ export type ProducerOptions =
* Custom application data. * Custom application data.
*/ */
appData?: Record<string, unknown>; appData?: Record<string, unknown>;
} };
/** /**
* Valid types for 'trace' event. * Valid types for 'trace' event.
...@@ -67,7 +68,7 @@ export type ProducerTraceEventData = ...@@ -67,7 +68,7 @@ export type ProducerTraceEventData =
* Per type information. * Per type information.
*/ */
info: any; info: any;
} };
export type ProducerScore = export type ProducerScore =
{ {
...@@ -85,7 +86,7 @@ export type ProducerScore = ...@@ -85,7 +86,7 @@ export type ProducerScore =
* The score of the RTP stream. * The score of the RTP stream.
*/ */
score: number; score: number;
} };
export type ProducerVideoOrientation = export type ProducerVideoOrientation =
{ {
...@@ -103,7 +104,7 @@ export type ProducerVideoOrientation = ...@@ -103,7 +104,7 @@ export type ProducerVideoOrientation =
* Rotation degrees (0, 90, 180 or 270). * Rotation degrees (0, 90, 180 or 270).
*/ */
rotation: number; rotation: number;
} };
export type ProducerStat = export type ProducerStat =
{ {
...@@ -133,7 +134,7 @@ export type ProducerStat = ...@@ -133,7 +134,7 @@ export type ProducerStat =
// RtpStreamRecv specific. // RtpStreamRecv specific.
jitter: number; jitter: number;
bitrateByLayer?: any; bitrateByLayer?: any;
} };
/** /**
* Producer type. * Producer type.
...@@ -148,7 +149,7 @@ export type ProducerEvents = ...@@ -148,7 +149,7 @@ export type ProducerEvents =
trace: [ProducerTraceEventData]; trace: [ProducerTraceEventData];
// Private events. // Private events.
'@close': []; '@close': [];
} };
export type ProducerObserverEvents = export type ProducerObserverEvents =
{ {
...@@ -158,28 +159,30 @@ export type ProducerObserverEvents = ...@@ -158,28 +159,30 @@ export type ProducerObserverEvents =
score: [ProducerScore[]]; score: [ProducerScore[]];
videoorientationchange: [ProducerVideoOrientation]; videoorientationchange: [ProducerVideoOrientation];
trace: [ProducerTraceEventData]; trace: [ProducerTraceEventData];
} };
type ProducerInternal = TransportInternal &
{
producerId: string;
};
type ProducerData =
{
kind: MediaKind;
rtpParameters: RtpParameters;
type: ProducerType;
consumableRtpParameters: RtpParameters;
};
const logger = new Logger('Producer'); const logger = new Logger('Producer');
export class Producer extends EnhancedEventEmitter<ProducerEvents> export class Producer extends EnhancedEventEmitter<ProducerEvents>
{ {
// Internal data. // Internal data.
readonly #internal: readonly #internal: ProducerInternal;
{
routerId: string;
transportId: string;
producerId: string;
};
// Producer data. // Producer data.
readonly #data: readonly #data: ProducerData;
{
kind: MediaKind;
rtpParameters: RtpParameters;
type: ProducerType;
consumableRtpParameters: RtpParameters;
};
// Channel instance. // Channel instance.
readonly #channel: Channel; readonly #channel: Channel;
...@@ -215,8 +218,8 @@ export class Producer extends EnhancedEventEmitter<ProducerEvents> ...@@ -215,8 +218,8 @@ export class Producer extends EnhancedEventEmitter<ProducerEvents>
paused paused
}: }:
{ {
internal: any; internal: ProducerInternal;
data: any; data: ProducerData;
channel: Channel; channel: Channel;
payloadChannel: PayloadChannel; payloadChannel: PayloadChannel;
appData?: Record<string, unknown>; appData?: Record<string, unknown>;
......
...@@ -31,7 +31,7 @@ export type RouterOptions = ...@@ -31,7 +31,7 @@ export type RouterOptions =
* Custom application data. * Custom application data.
*/ */
appData?: Record<string, unknown>; appData?: Record<string, unknown>;
} };
export type PipeToRouterOptions = export type PipeToRouterOptions =
{ {
...@@ -74,7 +74,7 @@ export type PipeToRouterOptions = ...@@ -74,7 +74,7 @@ export type PipeToRouterOptions =
* Enable SRTP. * Enable SRTP.
*/ */
enableSrtp?: boolean; enableSrtp?: boolean;
} };
export type PipeToRouterResult = export type PipeToRouterResult =
{ {
...@@ -97,7 +97,7 @@ export type PipeToRouterResult = ...@@ -97,7 +97,7 @@ export type PipeToRouterResult =
* The DataProducer created in the target Router. * The DataProducer created in the target Router.
*/ */
pipeDataProducer?: DataProducer; pipeDataProducer?: DataProducer;
} };
type PipeTransportPair = type PipeTransportPair =
{ {
...@@ -109,24 +109,26 @@ export type RouterEvents = ...@@ -109,24 +109,26 @@ export type RouterEvents =
workerclose: []; workerclose: [];
// Private events. // Private events.
'@close': []; '@close': [];
} };
export type RouterObserverEvents = export type RouterObserverEvents =
{ {
close: []; close: [];
newtransport: [Transport]; newtransport: [Transport];
newrtpobserver: [RtpObserver]; newrtpobserver: [RtpObserver];
} };
export type RouterInternal =
{
routerId: string;
};
const logger = new Logger('Router'); const logger = new Logger('Router');
export class Router extends EnhancedEventEmitter<RouterEvents> export class Router extends EnhancedEventEmitter<RouterEvents>
{ {
// Internal data. // Internal data.
readonly #internal: readonly #internal: RouterInternal;
{
routerId: string;
};
// Router data. // Router data.
readonly #data: readonly #data:
...@@ -178,7 +180,7 @@ export class Router extends EnhancedEventEmitter<RouterEvents> ...@@ -178,7 +180,7 @@ export class Router extends EnhancedEventEmitter<RouterEvents>
appData appData
}: }:
{ {
internal: any; internal: RouterInternal;
data: any; data: any;
channel: Channel; channel: Channel;
payloadChannel: PayloadChannel; payloadChannel: PayloadChannel;
......
...@@ -2,6 +2,7 @@ import { Logger } from './Logger'; ...@@ -2,6 +2,7 @@ import { Logger } from './Logger';
import { EnhancedEventEmitter } from './EnhancedEventEmitter'; import { EnhancedEventEmitter } from './EnhancedEventEmitter';
import { Channel } from './Channel'; import { Channel } from './Channel';
import { PayloadChannel } from './PayloadChannel'; import { PayloadChannel } from './PayloadChannel';
import { RouterInternal } from './Router';
import { Producer } from './Producer'; import { Producer } from './Producer';
export type RtpObserverEvents = export type RtpObserverEvents =
...@@ -9,7 +10,7 @@ export type RtpObserverEvents = ...@@ -9,7 +10,7 @@ export type RtpObserverEvents =
routerclose: []; routerclose: [];
// Private events. // Private events.
'@close': []; '@close': [];
} };
export type RtpObserverObserverEvents = export type RtpObserverObserverEvents =
{ {
...@@ -18,7 +19,21 @@ export type RtpObserverObserverEvents = ...@@ -18,7 +19,21 @@ export type RtpObserverObserverEvents =
resume: []; resume: [];
addproducer: [Producer]; addproducer: [Producer];
removeproducer: [Producer]; removeproducer: [Producer];
} };
export type RtpObserverConstructorOptions =
{
internal: RtpObserverObserverInternal;
channel: Channel;
payloadChannel: PayloadChannel;
appData?: Record<string, unknown>;
getProducerById: (producerId: string) => Producer | undefined;
};
export type RtpObserverObserverInternal = RouterInternal &
{
rtpObserverId: string;
};
const logger = new Logger('RtpObserver'); const logger = new Logger('RtpObserver');
...@@ -28,17 +43,13 @@ export type RtpObserverAddRemoveProducerOptions = ...@@ -28,17 +43,13 @@ export type RtpObserverAddRemoveProducerOptions =
* The id of the Producer to be added or removed. * The id of the Producer to be added or removed.
*/ */
producerId: string; producerId: string;
} };
export class RtpObserver<E extends RtpObserverEvents = RtpObserverEvents> export class RtpObserver<E extends RtpObserverEvents = RtpObserverEvents>
extends EnhancedEventEmitter<E> extends EnhancedEventEmitter<E>
{ {
// Internal data. // Internal data.
protected readonly internal: protected readonly internal: RtpObserverObserverInternal;
{
routerId: string;
rtpObserverId: string;
};
// Channel instance. // Channel instance.
protected readonly channel: Channel; protected readonly channel: Channel;
...@@ -56,7 +67,7 @@ export class RtpObserver<E extends RtpObserverEvents = RtpObserverEvents> ...@@ -56,7 +67,7 @@ export class RtpObserver<E extends RtpObserverEvents = RtpObserverEvents>
readonly #appData: Record<string, unknown>; readonly #appData: Record<string, unknown>;
// Method to retrieve a Producer. // Method to retrieve a Producer.
protected readonly getProducerById: (producerId: string) => Producer; protected readonly getProducerById: (producerId: string) => Producer | undefined;
// Observer instance. // Observer instance.
readonly #observer = new EnhancedEventEmitter<RtpObserverObserverEvents>(); readonly #observer = new EnhancedEventEmitter<RtpObserverObserverEvents>();
...@@ -72,14 +83,7 @@ export class RtpObserver<E extends RtpObserverEvents = RtpObserverEvents> ...@@ -72,14 +83,7 @@ export class RtpObserver<E extends RtpObserverEvents = RtpObserverEvents>
payloadChannel, payloadChannel,
appData, appData,
getProducerById getProducerById
}: }: RtpObserverConstructorOptions
{
internal: any;
channel: Channel;
payloadChannel: PayloadChannel;
appData?: Record<string, unknown>;
getProducerById: (producerId: string) => Producer;
}
) )
{ {
super(); super();
...@@ -236,6 +240,10 @@ export class RtpObserver<E extends RtpObserverEvents = RtpObserverEvents> ...@@ -236,6 +240,10 @@ export class RtpObserver<E extends RtpObserverEvents = RtpObserverEvents>
logger.debug('addProducer()'); logger.debug('addProducer()');
const producer = this.getProducerById(producerId); const producer = this.getProducerById(producerId);
if (!producer)
throw Error(`Producer with id "${producerId}" not found`);
const reqData = { producerId }; const reqData = { producerId };
await this.channel.request('rtpObserver.addProducer', this.internal.rtpObserverId, reqData); await this.channel.request('rtpObserver.addProducer', this.internal.rtpObserverId, reqData);
...@@ -252,6 +260,10 @@ export class RtpObserver<E extends RtpObserverEvents = RtpObserverEvents> ...@@ -252,6 +260,10 @@ export class RtpObserver<E extends RtpObserverEvents = RtpObserverEvents>
logger.debug('removeProducer()'); logger.debug('removeProducer()');
const producer = this.getProducerById(producerId); const producer = this.getProducerById(producerId);
if (!producer)
throw Error(`Producer with id "${producerId}" not found`);
const reqData = { producerId }; const reqData = { producerId };
await this.channel.request('rtpObserver.removeProducer', this.internal.rtpObserverId, reqData); await this.channel.request('rtpObserver.removeProducer', this.internal.rtpObserverId, reqData);
......
...@@ -13,7 +13,7 @@ export type RtpCapabilities = ...@@ -13,7 +13,7 @@ export type RtpCapabilities =
* Supported RTP header extensions. * Supported RTP header extensions.
*/ */
headerExtensions?: RtpHeaderExtension[]; headerExtensions?: RtpHeaderExtension[];
} };
/** /**
* Media kind ('audio' or 'video'). * Media kind ('audio' or 'video').
...@@ -76,7 +76,7 @@ export type RtpCodecCapability = ...@@ -76,7 +76,7 @@ export type RtpCodecCapability =
* Transport layer and codec-specific feedback messages for this codec. * Transport layer and codec-specific feedback messages for this codec.
*/ */
rtcpFeedback?: RtcpFeedback[]; rtcpFeedback?: RtcpFeedback[];
} };
/** /**
* Direction of RTP header extension. * Direction of RTP header extension.
...@@ -123,7 +123,7 @@ export type RtpHeaderExtension = ...@@ -123,7 +123,7 @@ export type RtpHeaderExtension =
* means that mediasoup can receive (but not send) it. * means that mediasoup can receive (but not send) it.
*/ */
direction?: RtpHeaderExtensionDirection; direction?: RtpHeaderExtensionDirection;
} };
/** /**
* The RTP send parameters describe a media stream received by mediasoup from * The RTP send parameters describe a media stream received by mediasoup from
...@@ -182,7 +182,7 @@ export type RtpParameters = ...@@ -182,7 +182,7 @@ export type RtpParameters =
* Parameters used for RTCP. * Parameters used for RTCP.
*/ */
rtcp?: RtcpParameters; rtcp?: RtcpParameters;
} };
/** /**
* Provides information on codec settings within the RTP parameters. The list * Provides information on codec settings within the RTP parameters. The list
...@@ -223,7 +223,7 @@ export type RtpCodecParameters = ...@@ -223,7 +223,7 @@ export type RtpCodecParameters =
* Transport layer and codec-specific feedback messages for this codec. * Transport layer and codec-specific feedback messages for this codec.
*/ */
rtcpFeedback?: RtcpFeedback[]; rtcpFeedback?: RtcpFeedback[];
} };
/** /**
* Provides information on RTCP feedback messages for a specific codec. Those * Provides information on RTCP feedback messages for a specific codec. Those
...@@ -242,7 +242,7 @@ export type RtcpFeedback = ...@@ -242,7 +242,7 @@ export type RtcpFeedback =
* RTCP feedback parameter. * RTCP feedback parameter.
*/ */
parameter?: string; parameter?: string;
} };
/** /**
* Provides information relating to an encoding, which represents a media RTP * Provides information relating to an encoding, which represents a media RTP
...@@ -291,7 +291,7 @@ export type RtpEncodingParameters = ...@@ -291,7 +291,7 @@ export type RtpEncodingParameters =
*/ */
scaleResolutionDownBy?: number; scaleResolutionDownBy?: number;
maxBitrate?: number; maxBitrate?: number;
} };
/** /**
* Defines a RTP header extension within the RTP parameters. The list of RTP * Defines a RTP header extension within the RTP parameters. The list of RTP
...@@ -322,7 +322,7 @@ export type RtpHeaderExtensionParameters = ...@@ -322,7 +322,7 @@ export type RtpHeaderExtensionParameters =
* Configuration parameters for the header extension. * Configuration parameters for the header extension.
*/ */
parameters?: any; parameters?: any;
} };
/** /**
* Provides information on RTCP settings within the RTP parameters. * Provides information on RTCP settings within the RTP parameters.
...@@ -350,4 +350,4 @@ export type RtcpParameters = ...@@ -350,4 +350,4 @@ export type RtcpParameters =
* Whether RTCP-mux is used. Default true. * Whether RTCP-mux is used. Default true.
*/ */
mux?: boolean; mux?: boolean;
} };
export type SctpCapabilities = export type SctpCapabilities =
{ {
numStreams: NumSctpStreams; numStreams: NumSctpStreams;
} };
/** /**
* Both OS and MIS are part of the SCTP INIT+ACK handshake. OS refers to the * Both OS and MIS are part of the SCTP INIT+ACK handshake. OS refers to the
...@@ -36,7 +36,7 @@ export type NumSctpStreams = ...@@ -36,7 +36,7 @@ export type NumSctpStreams =
* Maximum number of incoming SCTP streams. * Maximum number of incoming SCTP streams.
*/ */
MIS: number; MIS: number;
} };
export type SctpParameters = export type SctpParameters =
{ {
...@@ -59,7 +59,7 @@ export type SctpParameters = ...@@ -59,7 +59,7 @@ export type SctpParameters =
* Maximum allowed size for SCTP messages. * Maximum allowed size for SCTP messages.
*/ */
maxMessageSize: number; maxMessageSize: number;
} };
/** /**
* SCTP stream parameters describe the reliability of a certain SCTP stream. * SCTP stream parameters describe the reliability of a certain SCTP stream.
...@@ -92,4 +92,4 @@ export type SctpStreamParameters = ...@@ -92,4 +92,4 @@ export type SctpStreamParameters =
* be retransmitted. * be retransmitted.
*/ */
maxRetransmits?: number; maxRetransmits?: number;
} };
...@@ -12,7 +12,7 @@ export type SrtpParameters = ...@@ -12,7 +12,7 @@ export type SrtpParameters =
* SRTP keying material (master key and salt) in Base64. * SRTP keying material (master key and salt) in Base64.
*/ */
keyBase64: string; keyBase64: string;
} };
/** /**
* SRTP crypto suite. * SRTP crypto suite.
......
...@@ -5,8 +5,13 @@ import * as utils from './utils'; ...@@ -5,8 +5,13 @@ import * as utils from './utils';
import * as ortc from './ortc'; import * as ortc from './ortc';
import { Channel } from './Channel'; import { Channel } from './Channel';
import { PayloadChannel } from './PayloadChannel'; import { PayloadChannel } from './PayloadChannel';
import { RouterInternal } from './Router';
import { WebRtcTransportData } from './WebRtcTransport';
import { PlainTransportData } from './PlainTransport';
import { PipeTransportData } from './PipeTransport';
import { DirectTransportData } from './DirectTransport';
import { Producer, ProducerOptions } from './Producer'; import { Producer, ProducerOptions } from './Producer';
import { Consumer, ConsumerOptions } from './Consumer'; import { Consumer, ConsumerOptions, ConsumerType } from './Consumer';
import { import {
DataProducer, DataProducer,
DataProducerOptions, DataProducerOptions,
...@@ -18,7 +23,7 @@ import { ...@@ -18,7 +23,7 @@ import {
DataConsumerType DataConsumerType
} from './DataConsumer'; } from './DataConsumer';
import { RtpCapabilities } from './RtpParameters'; import { RtpCapabilities } from './RtpParameters';
import { SctpParameters, SctpStreamParameters } from './SctpParameters'; import { SctpStreamParameters } from './SctpParameters';
export interface TransportListenIp export interface TransportListenIp
{ {
...@@ -93,7 +98,7 @@ export type TransportEvents = ...@@ -93,7 +98,7 @@ export type TransportEvents =
'@newdataproducer': [DataProducer]; '@newdataproducer': [DataProducer];
'@dataproducerclose': [DataProducer]; '@dataproducerclose': [DataProducer];
'@listenserverclose': []; '@listenserverclose': [];
} };
export type TransportObserverEvents = export type TransportObserverEvents =
{ {
...@@ -103,7 +108,30 @@ export type TransportObserverEvents = ...@@ -103,7 +108,30 @@ export type TransportObserverEvents =
newdataproducer: [DataProducer]; newdataproducer: [DataProducer];
newdataconsumer: [DataConsumer]; newdataconsumer: [DataConsumer];
trace: [TransportTraceEventData]; trace: [TransportTraceEventData];
} };
export type TransportConstructorOptions =
{
internal: TransportInternal;
data: TransportData;
channel: Channel;
payloadChannel: PayloadChannel;
appData?: Record<string, unknown>;
getRouterRtpCapabilities: () => RtpCapabilities;
getProducerById: (producerId: string) => Producer | undefined;
getDataProducerById: (dataProducerId: string) => DataProducer | undefined;
};
export type TransportInternal = RouterInternal &
{
transportId: string;
};
type TransportData =
| WebRtcTransportData
| PlainTransportData
| PipeTransportData
| DirectTransportData;
const logger = new Logger('Transport'); const logger = new Logger('Transport');
...@@ -112,18 +140,10 @@ export class Transport<Events extends TransportEvents = TransportEvents, ...@@ -112,18 +140,10 @@ export class Transport<Events extends TransportEvents = TransportEvents,
extends EnhancedEventEmitter<Events> extends EnhancedEventEmitter<Events>
{ {
// Internal data. // Internal data.
protected readonly internal: protected readonly internal: TransportInternal;
{
routerId: string;
transportId: string;
};
// Transport data. This is set by the subclass. // Transport data. This is set by the subclass.
readonly #data: readonly #data: TransportData;
{
sctpParameters?: SctpParameters;
sctpState?: SctpState;
};
// Channel instance. // Channel instance.
protected readonly channel: Channel; protected readonly channel: Channel;
...@@ -141,10 +161,11 @@ export class Transport<Events extends TransportEvents = TransportEvents, ...@@ -141,10 +161,11 @@ export class Transport<Events extends TransportEvents = TransportEvents,
readonly #getRouterRtpCapabilities: () => RtpCapabilities; readonly #getRouterRtpCapabilities: () => RtpCapabilities;
// Method to retrieve a Producer. // Method to retrieve a Producer.
protected readonly getProducerById: (producerId: string) => Producer; protected readonly getProducerById: (producerId: string) => Producer | undefined;
// Method to retrieve a DataProducer. // Method to retrieve a DataProducer.
protected readonly getDataProducerById: (dataProducerId: string) => DataProducer; protected readonly getDataProducerById:
(dataProducerId: string) => DataProducer | undefined;
// Producers map. // Producers map.
readonly #producers: Map<string, Producer> = new Map(); readonly #producers: Map<string, Producer> = new Map();
...@@ -187,17 +208,7 @@ export class Transport<Events extends TransportEvents = TransportEvents, ...@@ -187,17 +208,7 @@ export class Transport<Events extends TransportEvents = TransportEvents,
getRouterRtpCapabilities, getRouterRtpCapabilities,
getProducerById, getProducerById,
getDataProducerById getDataProducerById
}: }: TransportConstructorOptions
{
internal: any;
data: any;
channel: Channel;
payloadChannel: PayloadChannel;
appData?: Record<string, unknown>;
getRouterRtpCapabilities: () => RtpCapabilities;
getProducerById: (producerId: string) => Producer;
getDataProducerById: (dataProducerId: string) => DataProducer;
}
) )
{ {
super(); super();
...@@ -706,7 +717,7 @@ export class Transport<Events extends TransportEvents = TransportEvents, ...@@ -706,7 +717,7 @@ export class Transport<Events extends TransportEvents = TransportEvents,
producerId, producerId,
kind : producer.kind, kind : producer.kind,
rtpParameters, rtpParameters,
type : pipe ? 'pipe' : producer.type type : pipe ? 'pipe' : producer.type as ConsumerType
}; };
const consumer = new Consumer( const consumer = new Consumer(
......
...@@ -39,31 +39,33 @@ export type WebRtcServerOptions = ...@@ -39,31 +39,33 @@ export type WebRtcServerOptions =
* Custom application data. * Custom application data.
*/ */
appData?: Record<string, unknown>; appData?: Record<string, unknown>;
} };
export type WebRtcServerEvents = export type WebRtcServerEvents =
{ {
workerclose: []; workerclose: [];
// Private events. // Private events.
'@close': []; '@close': [];
} };
export type WebRtcServerObserverEvents = export type WebRtcServerObserverEvents =
{ {
close: []; close: [];
webrtctransporthandled: [WebRtcTransport]; webrtctransporthandled: [WebRtcTransport];
webrtctransportunhandled: [WebRtcTransport]; webrtctransportunhandled: [WebRtcTransport];
} };
type WebRtcServerInternal =
{
webRtcServerId: string;
};
const logger = new Logger('WebRtcServer'); const logger = new Logger('WebRtcServer');
export class WebRtcServer extends EnhancedEventEmitter<WebRtcServerEvents> export class WebRtcServer extends EnhancedEventEmitter<WebRtcServerEvents>
{ {
// Internal data. // Internal data.
readonly #internal: readonly #internal: WebRtcServerInternal;
{
webRtcServerId: string;
};
// Channel instance. // Channel instance.
readonly #channel: Channel; readonly #channel: Channel;
...@@ -90,7 +92,7 @@ export class WebRtcServer extends EnhancedEventEmitter<WebRtcServerEvents> ...@@ -90,7 +92,7 @@ export class WebRtcServer extends EnhancedEventEmitter<WebRtcServerEvents>
appData appData
}: }:
{ {
internal: any; internal: WebRtcServerInternal;
channel: Channel; channel: Channel;
appData?: Record<string, unknown>; appData?: Record<string, unknown>;
} }
......
...@@ -7,6 +7,7 @@ import { ...@@ -7,6 +7,7 @@ import {
TransportTraceEventData, TransportTraceEventData,
TransportEvents, TransportEvents,
TransportObserverEvents, TransportObserverEvents,
TransportConstructorOptions,
SctpState SctpState
} from './Transport'; } from './Transport';
import { WebRtcServer } from './WebRtcServer'; import { WebRtcServer } from './WebRtcServer';
...@@ -26,7 +27,7 @@ export type WebRtcTransportListenIndividual = ...@@ -26,7 +27,7 @@ export type WebRtcTransportListenIndividual =
* range. * range.
*/ */
port?: number; port?: number;
} };
export type WebRtcTransportListenServer = export type WebRtcTransportListenServer =
{ {
...@@ -34,7 +35,7 @@ export type WebRtcTransportListenServer = ...@@ -34,7 +35,7 @@ export type WebRtcTransportListenServer =
* Instance of WebRtcServer. Mandatory unless listenIps is given. * Instance of WebRtcServer. Mandatory unless listenIps is given.
*/ */
webRtcServer: WebRtcServer; webRtcServer: WebRtcServer;
} };
export type WebRtcTransportListen = export type WebRtcTransportListen =
Either<WebRtcTransportListenIndividual, WebRtcTransportListenServer>; Either<WebRtcTransportListenIndividual, WebRtcTransportListenServer>;
...@@ -92,7 +93,7 @@ export type WebRtcTransportOptionsBase = ...@@ -92,7 +93,7 @@ export type WebRtcTransportOptionsBase =
* Custom application data. * Custom application data.
*/ */
appData?: Record<string, unknown>; appData?: Record<string, unknown>;
} };
export type WebRtcTransportOptions = WebRtcTransportOptionsBase & WebRtcTransportListen; export type WebRtcTransportOptions = WebRtcTransportOptionsBase & WebRtcTransportListen;
...@@ -101,7 +102,7 @@ export type IceParameters = ...@@ -101,7 +102,7 @@ export type IceParameters =
usernameFragment: string; usernameFragment: string;
password: string; password: string;
iceLite?: boolean; iceLite?: boolean;
} };
export type IceCandidate = export type IceCandidate =
{ {
...@@ -112,13 +113,13 @@ export type IceCandidate = ...@@ -112,13 +113,13 @@ export type IceCandidate =
port: number; port: number;
type: 'host'; type: 'host';
tcpType: 'passive' | undefined; tcpType: 'passive' | undefined;
} };
export type DtlsParameters = export type DtlsParameters =
{ {
role?: DtlsRole; role?: DtlsRole;
fingerprints: DtlsFingerprint[]; fingerprints: DtlsFingerprint[];
} };
/** /**
* The hash function algorithm (as defined in the "Hash function Textual Names" * The hash function algorithm (as defined in the "Hash function Textual Names"
...@@ -130,7 +131,7 @@ export type DtlsFingerprint = ...@@ -130,7 +131,7 @@ export type DtlsFingerprint =
{ {
algorithm: string; algorithm: string;
value: string; value: string;
} };
export type IceState = 'new' | 'connected' | 'completed' | 'disconnected' | 'closed'; export type IceState = 'new' | 'connected' | 'completed' | 'disconnected' | 'closed';
...@@ -167,7 +168,7 @@ export type WebRtcTransportStat = ...@@ -167,7 +168,7 @@ export type WebRtcTransportStat =
iceState: IceState; iceState: IceState;
iceSelectedTuple?: TransportTuple; iceSelectedTuple?: TransportTuple;
dtlsState: DtlsState; dtlsState: DtlsState;
} };
export type WebRtcTransportEvents = TransportEvents & export type WebRtcTransportEvents = TransportEvents &
{ {
...@@ -175,7 +176,7 @@ export type WebRtcTransportEvents = TransportEvents & ...@@ -175,7 +176,7 @@ export type WebRtcTransportEvents = TransportEvents &
iceselectedtuplechange: [TransportTuple]; iceselectedtuplechange: [TransportTuple];
dtlsstatechange: [DtlsState]; dtlsstatechange: [DtlsState];
sctpstatechange: [SctpState]; sctpstatechange: [SctpState];
} };
export type WebRtcTransportObserverEvents = TransportObserverEvents & export type WebRtcTransportObserverEvents = TransportObserverEvents &
{ {
...@@ -183,7 +184,26 @@ export type WebRtcTransportObserverEvents = TransportObserverEvents & ...@@ -183,7 +184,26 @@ export type WebRtcTransportObserverEvents = TransportObserverEvents &
iceselectedtuplechange: [TransportTuple]; iceselectedtuplechange: [TransportTuple];
dtlsstatechange: [DtlsState]; dtlsstatechange: [DtlsState];
sctpstatechange: [SctpState]; sctpstatechange: [SctpState];
} };
type WebRtcTransportConstructorOptions = TransportConstructorOptions &
{
data: WebRtcTransportData;
};
export type WebRtcTransportData =
{
iceRole: 'controlled';
iceParameters: IceParameters;
iceCandidates: IceCandidate[];
iceState: IceState;
iceSelectedTuple?: TransportTuple;
dtlsParameters: DtlsParameters;
dtlsState: DtlsState;
dtlsRemoteCert?: string;
sctpParameters?: SctpParameters;
sctpState?: SctpState;
};
const logger = new Logger('WebRtcTransport'); const logger = new Logger('WebRtcTransport');
...@@ -191,30 +211,18 @@ export class WebRtcTransport extends ...@@ -191,30 +211,18 @@ export class WebRtcTransport extends
Transport<WebRtcTransportEvents, WebRtcTransportObserverEvents> Transport<WebRtcTransportEvents, WebRtcTransportObserverEvents>
{ {
// WebRtcTransport data. // WebRtcTransport data.
readonly #data: readonly #data: WebRtcTransportData;
{
iceRole: 'controlled';
iceParameters: IceParameters;
iceCandidates: IceCandidate[];
iceState: IceState;
iceSelectedTuple?: TransportTuple;
dtlsParameters: DtlsParameters;
dtlsState: DtlsState;
dtlsRemoteCert?: string;
sctpParameters?: SctpParameters;
sctpState?: SctpState;
};
/** /**
* @private * @private
*/ */
constructor(params: any) constructor(options: WebRtcTransportConstructorOptions)
{ {
super(params); super(options);
logger.debug('constructor()'); logger.debug('constructor()');
const { data } = params; const { data } = options;
this.#data = this.#data =
{ {
......
...@@ -25,7 +25,7 @@ export type WorkerLogTag = ...@@ -25,7 +25,7 @@ export type WorkerLogTag =
| 'simulcast' | 'simulcast'
| 'svc' | 'svc'
| 'sctp' | 'sctp'
| 'message' | 'message';
export type WorkerSettings = export type WorkerSettings =
{ {
...@@ -68,7 +68,7 @@ export type WorkerSettings = ...@@ -68,7 +68,7 @@ export type WorkerSettings =
* Custom application data. * Custom application data.
*/ */
appData?: Record<string, unknown>; appData?: Record<string, unknown>;
} };
export type WorkerUpdateableSettings = Pick<WorkerSettings, 'logLevel' | 'logTags'>; export type WorkerUpdateableSettings = Pick<WorkerSettings, 'logLevel' | 'logTags'>;
...@@ -163,7 +163,7 @@ export type WorkerResourceUsage = ...@@ -163,7 +163,7 @@ export type WorkerResourceUsage =
ru_nivcsw: number; ru_nivcsw: number;
/* eslint-enable camelcase */ /* eslint-enable camelcase */
} };
export type WorkerEvents = export type WorkerEvents =
{ {
...@@ -171,14 +171,14 @@ export type WorkerEvents = ...@@ -171,14 +171,14 @@ export type WorkerEvents =
// Private events. // Private events.
'@success': []; '@success': [];
'@failure': [Error]; '@failure': [Error];
} };
export type WorkerObserverEvents = export type WorkerObserverEvents =
{ {
close: []; close: [];
newwebrtcserver: [WebRtcServer]; newwebrtcserver: [WebRtcServer];
newrouter: [Router]; newrouter: [Router];
} };
// If env MEDIASOUP_WORKER_BIN is given, use it as worker binary. // If env MEDIASOUP_WORKER_BIN is given, use it as worker binary.
// Otherwise if env MEDIASOUP_BUILDTYPE is 'Debug' use the Debug binary. // Otherwise if env MEDIASOUP_BUILDTYPE is 'Debug' use the Debug binary.
......
...@@ -26,7 +26,7 @@ const logger = new Logger(); ...@@ -26,7 +26,7 @@ const logger = new Logger();
export type ObserverEvents = export type ObserverEvents =
{ {
newworker: [Worker]; newworker: [Worker];
} };
const observer = new EnhancedEventEmitter<ObserverEvents>(); const observer = new EnhancedEventEmitter<ObserverEvents>();
......
...@@ -37,7 +37,7 @@ type RtpMapping = ...@@ -37,7 +37,7 @@ type RtpMapping =
scalabilityMode?: string; scalabilityMode?: string;
mappedSsrc: number; mappedSsrc: number;
}[]; }[];
} };
const DynamicPayloadTypes = const DynamicPayloadTypes =
[ [
......
...@@ -6,7 +6,7 @@ export type ScalabilityMode = ...@@ -6,7 +6,7 @@ export type ScalabilityMode =
spatialLayers: number; spatialLayers: number;
temporalLayers: number; temporalLayers: number;
ksvc: boolean; ksvc: boolean;
} };
export function parse(scalabilityMode?: string): ScalabilityMode export function parse(scalabilityMode?: string): ScalabilityMode
{ {
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论