summaryrefslogtreecommitdiffstats
path: root/vendor/web-sys/src/features/gen_RtcRtpEncodingParameters.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 02:49:50 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 02:49:50 +0000
commit9835e2ae736235810b4ea1c162ca5e65c547e770 (patch)
tree3fcebf40ed70e581d776a8a4c65923e8ec20e026 /vendor/web-sys/src/features/gen_RtcRtpEncodingParameters.rs
parentReleasing progress-linux version 1.70.0+dfsg2-1~progress7.99u1. (diff)
downloadrustc-9835e2ae736235810b4ea1c162ca5e65c547e770.tar.xz
rustc-9835e2ae736235810b4ea1c162ca5e65c547e770.zip
Merging upstream version 1.71.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/web-sys/src/features/gen_RtcRtpEncodingParameters.rs')
-rw-r--r--vendor/web-sys/src/features/gen_RtcRtpEncodingParameters.rs165
1 files changed, 165 insertions, 0 deletions
diff --git a/vendor/web-sys/src/features/gen_RtcRtpEncodingParameters.rs b/vendor/web-sys/src/features/gen_RtcRtpEncodingParameters.rs
new file mode 100644
index 000000000..339ec385a
--- /dev/null
+++ b/vendor/web-sys/src/features/gen_RtcRtpEncodingParameters.rs
@@ -0,0 +1,165 @@
+#![allow(unused_imports)]
+use super::*;
+use wasm_bindgen::prelude::*;
+#[wasm_bindgen]
+extern "C" {
+ # [wasm_bindgen (extends = :: js_sys :: Object , js_name = RTCRtpEncodingParameters)]
+ #[derive(Debug, Clone, PartialEq, Eq)]
+ #[doc = "The `RtcRtpEncodingParameters` dictionary."]
+ #[doc = ""]
+ #[doc = "*This API requires the following crate features to be activated: `RtcRtpEncodingParameters`*"]
+ pub type RtcRtpEncodingParameters;
+}
+impl RtcRtpEncodingParameters {
+ #[doc = "Construct a new `RtcRtpEncodingParameters`."]
+ #[doc = ""]
+ #[doc = "*This API requires the following crate features to be activated: `RtcRtpEncodingParameters`*"]
+ pub fn new() -> Self {
+ #[allow(unused_mut)]
+ let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
+ ret
+ }
+ #[doc = "Change the `active` field of this object."]
+ #[doc = ""]
+ #[doc = "*This API requires the following crate features to be activated: `RtcRtpEncodingParameters`*"]
+ pub fn active(&mut self, val: bool) -> &mut Self {
+ use wasm_bindgen::JsValue;
+ let r =
+ ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("active"), &JsValue::from(val));
+ debug_assert!(
+ r.is_ok(),
+ "setting properties should never fail on our dictionary objects"
+ );
+ let _ = r;
+ self
+ }
+ #[cfg(feature = "RtcDegradationPreference")]
+ #[doc = "Change the `degradationPreference` field of this object."]
+ #[doc = ""]
+ #[doc = "*This API requires the following crate features to be activated: `RtcDegradationPreference`, `RtcRtpEncodingParameters`*"]
+ pub fn degradation_preference(&mut self, val: RtcDegradationPreference) -> &mut Self {
+ use wasm_bindgen::JsValue;
+ let r = ::js_sys::Reflect::set(
+ self.as_ref(),
+ &JsValue::from("degradationPreference"),
+ &JsValue::from(val),
+ );
+ debug_assert!(
+ r.is_ok(),
+ "setting properties should never fail on our dictionary objects"
+ );
+ let _ = r;
+ self
+ }
+ #[cfg(feature = "RtcFecParameters")]
+ #[doc = "Change the `fec` field of this object."]
+ #[doc = ""]
+ #[doc = "*This API requires the following crate features to be activated: `RtcFecParameters`, `RtcRtpEncodingParameters`*"]
+ pub fn fec(&mut self, val: &RtcFecParameters) -> &mut Self {
+ use wasm_bindgen::JsValue;
+ let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("fec"), &JsValue::from(val));
+ debug_assert!(
+ r.is_ok(),
+ "setting properties should never fail on our dictionary objects"
+ );
+ let _ = r;
+ self
+ }
+ #[doc = "Change the `maxBitrate` field of this object."]
+ #[doc = ""]
+ #[doc = "*This API requires the following crate features to be activated: `RtcRtpEncodingParameters`*"]
+ pub fn max_bitrate(&mut self, val: u32) -> &mut Self {
+ use wasm_bindgen::JsValue;
+ let r = ::js_sys::Reflect::set(
+ self.as_ref(),
+ &JsValue::from("maxBitrate"),
+ &JsValue::from(val),
+ );
+ debug_assert!(
+ r.is_ok(),
+ "setting properties should never fail on our dictionary objects"
+ );
+ let _ = r;
+ self
+ }
+ #[cfg(feature = "RtcPriorityType")]
+ #[doc = "Change the `priority` field of this object."]
+ #[doc = ""]
+ #[doc = "*This API requires the following crate features to be activated: `RtcPriorityType`, `RtcRtpEncodingParameters`*"]
+ pub fn priority(&mut self, val: RtcPriorityType) -> &mut Self {
+ use wasm_bindgen::JsValue;
+ let r = ::js_sys::Reflect::set(
+ self.as_ref(),
+ &JsValue::from("priority"),
+ &JsValue::from(val),
+ );
+ debug_assert!(
+ r.is_ok(),
+ "setting properties should never fail on our dictionary objects"
+ );
+ let _ = r;
+ self
+ }
+ #[doc = "Change the `rid` field of this object."]
+ #[doc = ""]
+ #[doc = "*This API requires the following crate features to be activated: `RtcRtpEncodingParameters`*"]
+ pub fn rid(&mut self, val: &str) -> &mut Self {
+ use wasm_bindgen::JsValue;
+ let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("rid"), &JsValue::from(val));
+ debug_assert!(
+ r.is_ok(),
+ "setting properties should never fail on our dictionary objects"
+ );
+ let _ = r;
+ self
+ }
+ #[cfg(feature = "RtcRtxParameters")]
+ #[doc = "Change the `rtx` field of this object."]
+ #[doc = ""]
+ #[doc = "*This API requires the following crate features to be activated: `RtcRtpEncodingParameters`, `RtcRtxParameters`*"]
+ pub fn rtx(&mut self, val: &RtcRtxParameters) -> &mut Self {
+ use wasm_bindgen::JsValue;
+ let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("rtx"), &JsValue::from(val));
+ debug_assert!(
+ r.is_ok(),
+ "setting properties should never fail on our dictionary objects"
+ );
+ let _ = r;
+ self
+ }
+ #[doc = "Change the `scaleResolutionDownBy` field of this object."]
+ #[doc = ""]
+ #[doc = "*This API requires the following crate features to be activated: `RtcRtpEncodingParameters`*"]
+ pub fn scale_resolution_down_by(&mut self, val: f32) -> &mut Self {
+ use wasm_bindgen::JsValue;
+ let r = ::js_sys::Reflect::set(
+ self.as_ref(),
+ &JsValue::from("scaleResolutionDownBy"),
+ &JsValue::from(val),
+ );
+ debug_assert!(
+ r.is_ok(),
+ "setting properties should never fail on our dictionary objects"
+ );
+ let _ = r;
+ self
+ }
+ #[doc = "Change the `ssrc` field of this object."]
+ #[doc = ""]
+ #[doc = "*This API requires the following crate features to be activated: `RtcRtpEncodingParameters`*"]
+ pub fn ssrc(&mut self, val: u32) -> &mut Self {
+ use wasm_bindgen::JsValue;
+ let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("ssrc"), &JsValue::from(val));
+ debug_assert!(
+ r.is_ok(),
+ "setting properties should never fail on our dictionary objects"
+ );
+ let _ = r;
+ self
+ }
+}
+impl Default for RtcRtpEncodingParameters {
+ fn default() -> Self {
+ Self::new()
+ }
+}