diff --git a/CHANGELOG.md b/CHANGELOG.md index 8dab8ee44b..bc416bf343 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ### NEXT +- Expose `extras` namespace which exports `EnhancedEventEmitter` and `enhancedOnce()` for now ([PR #1464](https://github.com/versatica/mediasoup/pull/1464)). + ### 3.15.0 - Node: Add TypeScript interfaces for all exported classes ([PR #1463](https://github.com/versatica/mediasoup/pull/1463)). diff --git a/node/src/RtpObserver.ts b/node/src/RtpObserver.ts index ec42cedc6d..93c26e5231 100644 --- a/node/src/RtpObserver.ts +++ b/node/src/RtpObserver.ts @@ -53,7 +53,7 @@ export abstract class RtpObserverImpl< // Observer instance. readonly #observer: Observer; - constructor( + protected constructor( { internal, channel, diff --git a/node/src/Transport.ts b/node/src/Transport.ts index 7bbc28f4dd..d298dc5f0b 100644 --- a/node/src/Transport.ts +++ b/node/src/Transport.ts @@ -175,7 +175,7 @@ export abstract class TransportImpl< // Observer instance. readonly #observer: Observer; - constructor( + protected constructor( { internal, data, diff --git a/node/src/extras.ts b/node/src/extras.ts new file mode 100644 index 0000000000..72ecee7755 --- /dev/null +++ b/node/src/extras.ts @@ -0,0 +1 @@ +export { EnhancedEventEmitter, enhancedOnce } from './enhancedEvents'; diff --git a/node/src/index.ts b/node/src/index.ts index c366b0d357..241c928ab6 100644 --- a/node/src/index.ts +++ b/node/src/index.ts @@ -146,3 +146,8 @@ export function getSupportedRtpCapabilities(): RtpCapabilities { * Expose parseScalabilityMode() function. */ export { parseScalabilityMode } from './scalabilityModesUtils'; + +/** + * Expose extras module. + */ +export * as extras from './extras';