Skip to content

Commit

Permalink
Merge branch 'v3' into ci-really-run-fuzzer
Browse files Browse the repository at this point in the history
  • Loading branch information
ibc authored Feb 21, 2024
2 parents 35ac768 + 780bd7a commit 947b682
Show file tree
Hide file tree
Showing 19 changed files with 851 additions and 533 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Changelog

### Next
### 3.13.20

- Add server side ICE consent checks to detect silent WebRTC disconnections ([PR #1332](https://github.com/versatica/mediasoup/pull/1332)).
- Fix regression (crash) in transport-cc feedback generation ([PR #1339](https://github.com/versatica/mediasoup/pull/1339)).

### 3.13.19
Expand Down
4 changes: 3 additions & 1 deletion node/src/Router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,7 @@ export class Router<
numSctpStreams = { OS: 1024, MIS: 1024 },
maxSctpMessageSize = 262144,
sctpSendBufferSize = 262144,
iceConsentTimeout = 30,
appData,
}: WebRtcTransportOptions<WebRtcTransportAppData>): Promise<
WebRtcTransport<WebRtcTransportAppData>
Expand Down Expand Up @@ -596,7 +597,8 @@ export class Router<
enableUdp,
enableTcp,
preferUdp,
preferTcp
preferTcp,
iceConsentTimeout
);

const requestOffset = new FbsRouter.CreateWebRtcTransportRequestT(
Expand Down
6 changes: 5 additions & 1 deletion node/src/WebRtcTransport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,11 @@ export type WebRtcTransportOptionsBase<WebRtcTransportAppData> = {
*/
preferTcp?: boolean;

/**
* ICE consent timeout (in seconds). If 0 it is disabled. Default 30.
*/
iceConsentTimeout?: number;

/**
* Initial available outgoing bitrate (in bps). Default 600000.
*/
Expand Down Expand Up @@ -836,7 +841,6 @@ function createConnectRequest({
// Serialize DtlsParameters. This can throw.
const dtlsParametersOffset = serializeDtlsParameters(builder, dtlsParameters);

// Create request.
return FbsWebRtcTransport.ConnectRequest.createConnectRequest(
builder,
dtlsParametersOffset
Expand Down
8 changes: 6 additions & 2 deletions node/src/test/test-WebRtcTransport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -299,12 +299,16 @@ test('webRtcTransport.connect() succeeds', async () => {
};

await expect(
webRtcTransport.connect({ dtlsParameters: dtlsRemoteParameters })
webRtcTransport.connect({
dtlsParameters: dtlsRemoteParameters,
})
).resolves.toBeUndefined();

// Must fail if connected.
await expect(
webRtcTransport.connect({ dtlsParameters: dtlsRemoteParameters })
webRtcTransport.connect({
dtlsParameters: dtlsRemoteParameters,
})
).rejects.toThrow(Error);

expect(webRtcTransport.dtlsParameters.role).toBe('server');
Expand Down
Loading

0 comments on commit 947b682

Please sign in to comment.