]>
git.proxmox.com Git - rustc.git/blob - vendor/web-sys/src/features/gen_RtcrtpStreamStats.rs
1 #![allow(unused_imports)]
3 use wasm_bindgen
::prelude
::*;
6 # [wasm_bindgen (extends = :: js_sys :: Object , js_name = RTCRTPStreamStats)]
7 #[derive(Debug, Clone, PartialEq, Eq)]
8 #[doc = "The `RtcrtpStreamStats` dictionary."]
10 #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"]
11 pub type RtcrtpStreamStats
;
13 impl RtcrtpStreamStats
{
14 #[doc = "Construct a new `RtcrtpStreamStats`."]
16 #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"]
17 pub fn new() -> Self {
19 let mut ret
: Self = ::wasm_bindgen
::JsCast
::unchecked_into(::js_sys
::Object
::new());
22 #[doc = "Change the `id` field of this object."]
24 #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"]
25 pub fn id(&mut self, val
: &str) -> &mut Self {
26 use wasm_bindgen
::JsValue
;
27 let r
= ::js_sys
::Reflect
::set(self.as_ref(), &JsValue
::from("id"), &JsValue
::from(val
));
30 "setting properties should never fail on our dictionary objects"
35 #[doc = "Change the `timestamp` field of this object."]
37 #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"]
38 pub fn timestamp(&mut self, val
: f64) -> &mut Self {
39 use wasm_bindgen
::JsValue
;
40 let r
= ::js_sys
::Reflect
::set(
42 &JsValue
::from("timestamp"),
47 "setting properties should never fail on our dictionary objects"
52 #[cfg(feature = "RtcStatsType")]
53 #[doc = "Change the `type` field of this object."]
55 #[doc = "*This API requires the following crate features to be activated: `RtcStatsType`, `RtcrtpStreamStats`*"]
56 pub fn type_(&mut self, val
: RtcStatsType
) -> &mut Self {
57 use wasm_bindgen
::JsValue
;
58 let r
= ::js_sys
::Reflect
::set(self.as_ref(), &JsValue
::from("type"), &JsValue
::from(val
));
61 "setting properties should never fail on our dictionary objects"
66 #[doc = "Change the `bitrateMean` field of this object."]
68 #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"]
69 pub fn bitrate_mean(&mut self, val
: f64) -> &mut Self {
70 use wasm_bindgen
::JsValue
;
71 let r
= ::js_sys
::Reflect
::set(
73 &JsValue
::from("bitrateMean"),
78 "setting properties should never fail on our dictionary objects"
83 #[doc = "Change the `bitrateStdDev` field of this object."]
85 #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"]
86 pub fn bitrate_std_dev(&mut self, val
: f64) -> &mut Self {
87 use wasm_bindgen
::JsValue
;
88 let r
= ::js_sys
::Reflect
::set(
90 &JsValue
::from("bitrateStdDev"),
95 "setting properties should never fail on our dictionary objects"
100 #[doc = "Change the `codecId` field of this object."]
102 #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"]
103 pub fn codec_id(&mut self, val
: &str) -> &mut Self {
104 use wasm_bindgen
::JsValue
;
105 let r
= ::js_sys
::Reflect
::set(
107 &JsValue
::from("codecId"),
112 "setting properties should never fail on our dictionary objects"
117 #[doc = "Change the `firCount` field of this object."]
119 #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"]
120 pub fn fir_count(&mut self, val
: u32) -> &mut Self {
121 use wasm_bindgen
::JsValue
;
122 let r
= ::js_sys
::Reflect
::set(
124 &JsValue
::from("firCount"),
129 "setting properties should never fail on our dictionary objects"
134 #[doc = "Change the `framerateMean` field of this object."]
136 #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"]
137 pub fn framerate_mean(&mut self, val
: f64) -> &mut Self {
138 use wasm_bindgen
::JsValue
;
139 let r
= ::js_sys
::Reflect
::set(
141 &JsValue
::from("framerateMean"),
146 "setting properties should never fail on our dictionary objects"
151 #[doc = "Change the `framerateStdDev` field of this object."]
153 #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"]
154 pub fn framerate_std_dev(&mut self, val
: f64) -> &mut Self {
155 use wasm_bindgen
::JsValue
;
156 let r
= ::js_sys
::Reflect
::set(
158 &JsValue
::from("framerateStdDev"),
163 "setting properties should never fail on our dictionary objects"
168 #[doc = "Change the `isRemote` field of this object."]
170 #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"]
171 pub fn is_remote(&mut self, val
: bool
) -> &mut Self {
172 use wasm_bindgen
::JsValue
;
173 let r
= ::js_sys
::Reflect
::set(
175 &JsValue
::from("isRemote"),
180 "setting properties should never fail on our dictionary objects"
185 #[doc = "Change the `mediaTrackId` field of this object."]
187 #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"]
188 pub fn media_track_id(&mut self, val
: &str) -> &mut Self {
189 use wasm_bindgen
::JsValue
;
190 let r
= ::js_sys
::Reflect
::set(
192 &JsValue
::from("mediaTrackId"),
197 "setting properties should never fail on our dictionary objects"
202 #[doc = "Change the `mediaType` field of this object."]
204 #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"]
205 pub fn media_type(&mut self, val
: &str) -> &mut Self {
206 use wasm_bindgen
::JsValue
;
207 let r
= ::js_sys
::Reflect
::set(
209 &JsValue
::from("mediaType"),
214 "setting properties should never fail on our dictionary objects"
219 #[doc = "Change the `nackCount` field of this object."]
221 #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"]
222 pub fn nack_count(&mut self, val
: u32) -> &mut Self {
223 use wasm_bindgen
::JsValue
;
224 let r
= ::js_sys
::Reflect
::set(
226 &JsValue
::from("nackCount"),
231 "setting properties should never fail on our dictionary objects"
236 #[doc = "Change the `pliCount` field of this object."]
238 #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"]
239 pub fn pli_count(&mut self, val
: u32) -> &mut Self {
240 use wasm_bindgen
::JsValue
;
241 let r
= ::js_sys
::Reflect
::set(
243 &JsValue
::from("pliCount"),
248 "setting properties should never fail on our dictionary objects"
253 #[doc = "Change the `remoteId` field of this object."]
255 #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"]
256 pub fn remote_id(&mut self, val
: &str) -> &mut Self {
257 use wasm_bindgen
::JsValue
;
258 let r
= ::js_sys
::Reflect
::set(
260 &JsValue
::from("remoteId"),
265 "setting properties should never fail on our dictionary objects"
270 #[doc = "Change the `ssrc` field of this object."]
272 #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"]
273 pub fn ssrc(&mut self, val
: &str) -> &mut Self {
274 use wasm_bindgen
::JsValue
;
275 let r
= ::js_sys
::Reflect
::set(self.as_ref(), &JsValue
::from("ssrc"), &JsValue
::from(val
));
278 "setting properties should never fail on our dictionary objects"
283 #[doc = "Change the `transportId` field of this object."]
285 #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"]
286 pub fn transport_id(&mut self, val
: &str) -> &mut Self {
287 use wasm_bindgen
::JsValue
;
288 let r
= ::js_sys
::Reflect
::set(
290 &JsValue
::from("transportId"),
295 "setting properties should never fail on our dictionary objects"
301 impl Default
for RtcrtpStreamStats
{
302 fn default() -> Self {