diff --git a/bin/wasm-node/CHANGELOG.md b/bin/wasm-node/CHANGELOG.md index d0aa5f4af1..51a982f3c3 100644 --- a/bin/wasm-node/CHANGELOG.md +++ b/bin/wasm-node/CHANGELOG.md @@ -4,6 +4,7 @@ ### Changed +- The `enableExperimentalWebRTC` field has been removed from `ClientConfig`, and replaced with a `forbidWebRtc` option. WebRTC is now considered stable enough to be enabled by default. ([#2977](https://github.com/paritytech/smoldot/pull/2977)) - Reduced the number of networking round-trips after a connection has been opened by assuming that the remote supports the desired networking protocols instead of waiting for its confirmation. ([#2984](https://github.com/paritytech/smoldot/pull/2984)) ## 0.7.6 - 2022-11-04 diff --git a/bin/wasm-node/javascript/src/client.ts b/bin/wasm-node/javascript/src/client.ts index 693ba76a9f..5295e40ff7 100644 --- a/bin/wasm-node/javascript/src/client.ts +++ b/bin/wasm-node/javascript/src/client.ts @@ -252,14 +252,13 @@ export interface ClientOptions { forbidWss?: boolean; /** - * Enable experimental support for WebRTC connections. - * - * Support for WebRTC connections is currently in progress and might have significant issues. + * If `true`, then the client will never open any WebRTC connection. + * Defaults to `false`. * - * This flag currently defaults to `false`. In a later version, it will be removed and WebRTC - * connections will be enabled by default. + * This option has no effect in environments where non-secure WebSocket connections aren't + * supported anyway. */ - enableExperimentalWebRTC?: boolean; + forbidWebRtc?: boolean; } /** diff --git a/bin/wasm-node/javascript/src/index-browser.ts b/bin/wasm-node/javascript/src/index-browser.ts index 5cfcfbee2c..f1e0b85898 100644 --- a/bin/wasm-node/javascript/src/index-browser.ts +++ b/bin/wasm-node/javascript/src/index-browser.ts @@ -65,7 +65,7 @@ export function start(options?: ClientOptions): Client { options?.forbidWs || false, options?.forbidNonLocalWs || false, options?.forbidWss || false, - !(options?.enableExperimentalWebRTC || false) + options?.forbidWebRtc || false ) } })