Skip to content

Commit

Permalink
Revert addition of iceParameters in "connect" event
Browse files Browse the repository at this point in the history
  • Loading branch information
ibc committed Feb 19, 2024
1 parent ffc84f6 commit 4c32e21
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 21 deletions.
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
"debug": "^4.3.4",
"event-target-shim": "^6.0.2",
"fake-mediastreamtrack": "^1.2.0",
"mediasoup-client": "^3.7.3",
"mediasoup-client": "^3.7.4",
"netstring": "^0.3.0",
"sdp-transform": "^2.14.2",
"uuid": "^9.0.1"
Expand Down
12 changes: 1 addition & 11 deletions src/Handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1173,11 +1173,6 @@ export class Handler extends HandlerInterface {
localSdpObject = sdpTransform.parse(offer.sdp);
}

// Get our local ICE parameters.
const iceParameters = sdpCommonUtils.extractIceParameters({
sdpObject: localSdpObject,
});

// Get our local DTLS parameters.
const dtlsParameters = sdpCommonUtils.extractDtlsParameters({
sdpObject: localSdpObject,
Expand All @@ -1193,12 +1188,7 @@ export class Handler extends HandlerInterface {

// Need to tell the remote transport about our parameters.
await new Promise<void>((resolve, reject) => {
this.safeEmit(
'@connect',
{ iceParameters, dtlsParameters },
resolve,
reject
);
this.safeEmit('@connect', { dtlsParameters }, resolve, reject);
});

this.#transportReady = true;
Expand Down
4 changes: 2 additions & 2 deletions src/test/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ beforeEach(async () => {
ctx.connectedSendTransport.on(
'connect',
// eslint-disable-next-line no-shadow, @typescript-eslint/no-unused-vars
({ iceParameters, dtlsParameters }, callback /* errback */) => {
({ dtlsParameters }, callback /* errback */) => {
setTimeout(callback);
}
);
Expand Down Expand Up @@ -88,7 +88,7 @@ beforeEach(async () => {
ctx.connectedRecvTransport.on(
'connect',
// eslint-disable-next-line no-shadow, @typescript-eslint/no-unused-vars
({ iceParameters, dtlsParameters }, callback /* errback */) => {
({ dtlsParameters }, callback /* errback */) => {
setTimeout(callback);
}
);
Expand Down

0 comments on commit 4c32e21

Please sign in to comment.