diff --git a/modules/RTC/TPCUtils.js b/modules/RTC/TPCUtils.js index b6e07d1d41..68f4febd25 100644 --- a/modules/RTC/TPCUtils.js +++ b/modules/RTC/TPCUtils.js @@ -31,8 +31,12 @@ export class TPCUtils { * Creates a new instance for a given TraceablePeerConnection * * @param peerconnection - the tpc instance for which we have utility functions. + * @param options - additional options that can be passed to the utility functions. + * @param options.audioQuality - the audio quality settings that are used to calculate the audio codec parameters. + * @param options.isP2P - whether the connection is a P2P connection. + * @param options.videoQuality - the video quality settings that are used to calculate the encoding parameters. */ - constructor(peerconnection, options) { + constructor(peerconnection, options = {}) { this.pc = peerconnection; this.options = options; this.codecSettings = cloneDeep(STANDARD_CODEC_SETTINGS); diff --git a/modules/RTC/TPCUtils.spec.js b/modules/RTC/TPCUtils.spec.js index 9faf4d5b6c..0231557917 100644 --- a/modules/RTC/TPCUtils.spec.js +++ b/modules/RTC/TPCUtils.spec.js @@ -99,7 +99,7 @@ describe('TPCUtils', () => { it('sort ssrcs in case the first ssrc in the SIM group is not present at the top', () => { const pc = new MockPeerConnection(); - const tpcUtils = new TPCUtils(pc, { }); + const tpcUtils = new TPCUtils(pc); const source = new RTCSessionDescription({ type: 'offer', sdp: getSourceSdp() @@ -163,7 +163,7 @@ describe('TPCUtils', () => { it('sort ssrcs in case there is a single FID group', () => { const pc = new MockPeerConnection(); - const tpcUtils = new TPCUtils(pc, { }); + const tpcUtils = new TPCUtils(pc); const source = new RTCSessionDescription({ type: 'offer', sdp: getSourceSdp()