From 5abb6bec5a340df1666bd366934df5106649847d Mon Sep 17 00:00:00 2001 From: tymccart Date: Fri, 11 Mar 2022 12:13:24 -0600 Subject: [PATCH] feat: add getunderlyingrtcpeerconnection method on peerconnection class (#64) --- src/peer-connection.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/peer-connection.ts b/src/peer-connection.ts index 1c031ad..0986b9c 100644 --- a/src/peer-connection.ts +++ b/src/peer-connection.ts @@ -1,6 +1,6 @@ import { EventEmitter } from './event-emitter'; -import { log } from './util/logger'; import { createRTCPeerConnection } from './rtc-peer-connection-factory'; +import { log } from './util/logger'; /** * A type-safe form of the DOMString used in the MediaStreamTrack.kind field. @@ -45,6 +45,15 @@ class PeerConnection extends EventEmitter { }; } + /** + * Get the underlying RTCPeerConnection. + * + * @returns The underlying RTCPeerConnection. + */ + getUnderlyingRTCPeerConnection(): RTCPeerConnection { + return this.pc; + } + /** * Adds a new media track to the set of tracks which will be transmitted to the other peer. *