Add sendEncodings in RTCRtpTransceiverInit (#3642)

This commit is contained in:
logist322 2023-10-05 17:42:03 +03:00 committed by GitHub
parent 9e80eb269c
commit 5d0f935d65
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 21 additions and 2 deletions

View File

@ -5,6 +5,9 @@
### Added
* Add bindings for `RTCRtpTransceiverInit.sendEncodings`.
[#3642](https://github.com/rustwasm/wasm-bindgen/pull/3642)
* Add bindings for the Web Locks API to `web-sys`.
[#3604](https://github.com/rustwasm/wasm-bindgen/pull/3604)

View File

@ -38,6 +38,23 @@ impl RtcRtpTransceiverInit {
let _ = r;
self
}
#[doc = "Change the `sendEncodings` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcRtpTransceiverInit`*"]
pub fn send_encodings(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
use wasm_bindgen::JsValue;
let r = ::js_sys::Reflect::set(
self.as_ref(),
&JsValue::from("sendEncodings"),
&JsValue::from(val),
);
debug_assert!(
r.is_ok(),
"setting properties should never fail on our dictionary objects"
);
let _ = r;
self
}
#[doc = "Change the `streams` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcRtpTransceiverInit`*"]

View File

@ -17,8 +17,7 @@ enum RTCRtpTransceiverDirection {
dictionary RTCRtpTransceiverInit {
RTCRtpTransceiverDirection direction = "sendrecv";
sequence<MediaStream> streams = [];
// TODO: bug 1396918
// sequence<RTCRtpEncodingParameters> sendEncodings;
sequence<RTCRtpEncodingParameters> sendEncodings = [];
};
[Pref="media.peerconnection.enabled",