diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-18 02:49:50 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-18 02:49:50 +0000 |
commit | 9835e2ae736235810b4ea1c162ca5e65c547e770 (patch) | |
tree | 3fcebf40ed70e581d776a8a4c65923e8ec20e026 /vendor/web-sys/src/features/gen_RtcMediaStreamTrackStats.rs | |
parent | Releasing progress-linux version 1.70.0+dfsg2-1~progress7.99u1. (diff) | |
download | rustc-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_RtcMediaStreamTrackStats.rs')
-rw-r--r-- | vendor/web-sys/src/features/gen_RtcMediaStreamTrackStats.rs | 309 |
1 files changed, 309 insertions, 0 deletions
diff --git a/vendor/web-sys/src/features/gen_RtcMediaStreamTrackStats.rs b/vendor/web-sys/src/features/gen_RtcMediaStreamTrackStats.rs new file mode 100644 index 000000000..8caa05807 --- /dev/null +++ b/vendor/web-sys/src/features/gen_RtcMediaStreamTrackStats.rs @@ -0,0 +1,309 @@ +#![allow(unused_imports)] +use super::*; +use wasm_bindgen::prelude::*; +#[wasm_bindgen] +extern "C" { + # [wasm_bindgen (extends = :: js_sys :: Object , js_name = RTCMediaStreamTrackStats)] + #[derive(Debug, Clone, PartialEq, Eq)] + #[doc = "The `RtcMediaStreamTrackStats` dictionary."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] + pub type RtcMediaStreamTrackStats; +} +impl RtcMediaStreamTrackStats { + #[doc = "Construct a new `RtcMediaStreamTrackStats`."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] + pub fn new() -> Self { + #[allow(unused_mut)] + let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); + ret + } + #[doc = "Change the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] + pub fn id(&mut self, val: &str) -> &mut Self { + use wasm_bindgen::JsValue; + let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("id"), &JsValue::from(val)); + debug_assert!( + r.is_ok(), + "setting properties should never fail on our dictionary objects" + ); + let _ = r; + self + } + #[doc = "Change the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] + pub fn timestamp(&mut self, val: f64) -> &mut Self { + use wasm_bindgen::JsValue; + let r = ::js_sys::Reflect::set( + self.as_ref(), + &JsValue::from("timestamp"), + &JsValue::from(val), + ); + debug_assert!( + r.is_ok(), + "setting properties should never fail on our dictionary objects" + ); + let _ = r; + self + } + #[cfg(feature = "RtcStatsType")] + #[doc = "Change the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`, `RtcStatsType`*"] + pub fn type_(&mut self, val: RtcStatsType) -> &mut Self { + use wasm_bindgen::JsValue; + let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("type"), &JsValue::from(val)); + debug_assert!( + r.is_ok(), + "setting properties should never fail on our dictionary objects" + ); + let _ = r; + self + } + #[doc = "Change the `audioLevel` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] + pub fn audio_level(&mut self, val: f64) -> &mut Self { + use wasm_bindgen::JsValue; + let r = ::js_sys::Reflect::set( + self.as_ref(), + &JsValue::from("audioLevel"), + &JsValue::from(val), + ); + debug_assert!( + r.is_ok(), + "setting properties should never fail on our dictionary objects" + ); + let _ = r; + self + } + #[doc = "Change the `echoReturnLoss` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] + pub fn echo_return_loss(&mut self, val: f64) -> &mut Self { + use wasm_bindgen::JsValue; + let r = ::js_sys::Reflect::set( + self.as_ref(), + &JsValue::from("echoReturnLoss"), + &JsValue::from(val), + ); + debug_assert!( + r.is_ok(), + "setting properties should never fail on our dictionary objects" + ); + let _ = r; + self + } + #[doc = "Change the `echoReturnLossEnhancement` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] + pub fn echo_return_loss_enhancement(&mut self, val: f64) -> &mut Self { + use wasm_bindgen::JsValue; + let r = ::js_sys::Reflect::set( + self.as_ref(), + &JsValue::from("echoReturnLossEnhancement"), + &JsValue::from(val), + ); + debug_assert!( + r.is_ok(), + "setting properties should never fail on our dictionary objects" + ); + let _ = r; + self + } + #[doc = "Change the `frameHeight` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] + pub fn frame_height(&mut self, val: u32) -> &mut Self { + use wasm_bindgen::JsValue; + let r = ::js_sys::Reflect::set( + self.as_ref(), + &JsValue::from("frameHeight"), + &JsValue::from(val), + ); + debug_assert!( + r.is_ok(), + "setting properties should never fail on our dictionary objects" + ); + let _ = r; + self + } + #[doc = "Change the `frameWidth` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] + pub fn frame_width(&mut self, val: u32) -> &mut Self { + use wasm_bindgen::JsValue; + let r = ::js_sys::Reflect::set( + self.as_ref(), + &JsValue::from("frameWidth"), + &JsValue::from(val), + ); + debug_assert!( + r.is_ok(), + "setting properties should never fail on our dictionary objects" + ); + let _ = r; + self + } + #[doc = "Change the `framesCorrupted` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] + pub fn frames_corrupted(&mut self, val: u32) -> &mut Self { + use wasm_bindgen::JsValue; + let r = ::js_sys::Reflect::set( + self.as_ref(), + &JsValue::from("framesCorrupted"), + &JsValue::from(val), + ); + debug_assert!( + r.is_ok(), + "setting properties should never fail on our dictionary objects" + ); + let _ = r; + self + } + #[doc = "Change the `framesDecoded` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] + pub fn frames_decoded(&mut self, val: u32) -> &mut Self { + use wasm_bindgen::JsValue; + let r = ::js_sys::Reflect::set( + self.as_ref(), + &JsValue::from("framesDecoded"), + &JsValue::from(val), + ); + debug_assert!( + r.is_ok(), + "setting properties should never fail on our dictionary objects" + ); + let _ = r; + self + } + #[doc = "Change the `framesDropped` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] + pub fn frames_dropped(&mut self, val: u32) -> &mut Self { + use wasm_bindgen::JsValue; + let r = ::js_sys::Reflect::set( + self.as_ref(), + &JsValue::from("framesDropped"), + &JsValue::from(val), + ); + debug_assert!( + r.is_ok(), + "setting properties should never fail on our dictionary objects" + ); + let _ = r; + self + } + #[doc = "Change the `framesPerSecond` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] + pub fn frames_per_second(&mut self, val: f64) -> &mut Self { + use wasm_bindgen::JsValue; + let r = ::js_sys::Reflect::set( + self.as_ref(), + &JsValue::from("framesPerSecond"), + &JsValue::from(val), + ); + debug_assert!( + r.is_ok(), + "setting properties should never fail on our dictionary objects" + ); + let _ = r; + self + } + #[doc = "Change the `framesReceived` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] + pub fn frames_received(&mut self, val: u32) -> &mut Self { + use wasm_bindgen::JsValue; + let r = ::js_sys::Reflect::set( + self.as_ref(), + &JsValue::from("framesReceived"), + &JsValue::from(val), + ); + debug_assert!( + r.is_ok(), + "setting properties should never fail on our dictionary objects" + ); + let _ = r; + self + } + #[doc = "Change the `framesSent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] + pub fn frames_sent(&mut self, val: u32) -> &mut Self { + use wasm_bindgen::JsValue; + let r = ::js_sys::Reflect::set( + self.as_ref(), + &JsValue::from("framesSent"), + &JsValue::from(val), + ); + debug_assert!( + r.is_ok(), + "setting properties should never fail on our dictionary objects" + ); + let _ = r; + self + } + #[doc = "Change the `remoteSource` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] + pub fn remote_source(&mut self, val: bool) -> &mut Self { + use wasm_bindgen::JsValue; + let r = ::js_sys::Reflect::set( + self.as_ref(), + &JsValue::from("remoteSource"), + &JsValue::from(val), + ); + debug_assert!( + r.is_ok(), + "setting properties should never fail on our dictionary objects" + ); + let _ = r; + self + } + #[doc = "Change the `ssrcIds` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] + pub fn ssrc_ids(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { + use wasm_bindgen::JsValue; + let r = ::js_sys::Reflect::set( + self.as_ref(), + &JsValue::from("ssrcIds"), + &JsValue::from(val), + ); + debug_assert!( + r.is_ok(), + "setting properties should never fail on our dictionary objects" + ); + let _ = r; + self + } + #[doc = "Change the `trackIdentifier` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] + pub fn track_identifier(&mut self, val: &str) -> &mut Self { + use wasm_bindgen::JsValue; + let r = ::js_sys::Reflect::set( + self.as_ref(), + &JsValue::from("trackIdentifier"), + &JsValue::from(val), + ); + debug_assert!( + r.is_ok(), + "setting properties should never fail on our dictionary objects" + ); + let _ = r; + self + } +} +impl Default for RtcMediaStreamTrackStats { + fn default() -> Self { + Self::new() + } +} |