Skip to content

Commit

Permalink
Add bindings for RTCPeerConnection.setConfiguration() (#4105)
Browse files Browse the repository at this point in the history
  • Loading branch information
k-wasniowski authored Sep 16, 2024
1 parent 71af617 commit 20c010d
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@

### Added

* Add bindings for `RTCPeerConnection.setConfiguration(RTCConfiguration)` method.
[#4105](https://github.com/rustwasm/wasm-bindgen/pull/4105)

* Add bindings to `RTCRtpTransceiverDirection.stopped`.
[#4102](https://github.com/rustwasm/wasm-bindgen/pull/4102)

Expand Down
18 changes: 18 additions & 0 deletions crates/web-sys/src/features/gen_RtcPeerConnection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -775,6 +775,24 @@ extern "C" {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcPeerConnection`, `RtcRtpSender`*"]
pub fn remove_track(this: &RtcPeerConnection, sender: &RtcRtpSender);
# [wasm_bindgen (catch , method , structural , js_class = "RTCPeerConnection" , js_name = setConfiguration)]
#[doc = "The `setConfiguration()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection/setConfiguration)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcPeerConnection`*"]
pub fn set_configuration(this: &RtcPeerConnection) -> Result<(), JsValue>;
#[cfg(feature = "RtcConfiguration")]
# [wasm_bindgen (catch , method , structural , js_class = "RTCPeerConnection" , js_name = setConfiguration)]
#[doc = "The `setConfiguration()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection/setConfiguration)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcConfiguration`, `RtcPeerConnection`*"]
pub fn set_configuration_with_configuration(
this: &RtcPeerConnection,
configuration: &RtcConfiguration,
) -> Result<(), JsValue>;
# [wasm_bindgen (method , structural , js_class = "RTCPeerConnection" , js_name = setIdentityProvider)]
#[doc = "The `setIdentityProvider()` method."]
#[doc = ""]
Expand Down
4 changes: 3 additions & 1 deletion crates/web-sys/webidls/enabled/RTCPeerConnection.webidl
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,9 @@ interface RTCPeerConnection : EventTarget {
[ChromeOnly]
attribute DOMString id;

RTCConfiguration getConfiguration ();
[Throws]
undefined setConfiguration(optional RTCConfiguration configuration = {});
RTCConfiguration getConfiguration ();
[Deprecated="RTCPeerConnectionGetStreams"]
sequence<MediaStream> getLocalStreams ();
[Deprecated="RTCPeerConnectionGetStreams"]
Expand Down

0 comments on commit 20c010d

Please sign in to comment.