Skip to content

Commit

Permalink
ref(TPCUtils) Make options default to {}.
Browse files Browse the repository at this point in the history
  • Loading branch information
jallamsetty1 committed Nov 25, 2024
1 parent 60e680e commit 8768906
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion modules/RTC/TPCUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions modules/RTC/TPCUtils.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 8768906

Please sign in to comment.