web_sys/features/
gen_RtcrtpStreamStats.rs

1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7    # [wasm_bindgen (extends = :: js_sys :: Object , js_name = RTCRTPStreamStats)]
8    #[derive(Debug, Clone, PartialEq, Eq)]
9    #[doc = "The `RtcrtpStreamStats` dictionary."]
10    #[doc = ""]
11    #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"]
12    pub type RtcrtpStreamStats;
13    #[doc = "Get the `id` field of this object."]
14    #[doc = ""]
15    #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"]
16    #[wasm_bindgen(method, getter = "id")]
17    pub fn get_id(this: &RtcrtpStreamStats) -> Option<::alloc::string::String>;
18    #[doc = "Change the `id` field of this object."]
19    #[doc = ""]
20    #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"]
21    #[wasm_bindgen(method, setter = "id")]
22    pub fn set_id(this: &RtcrtpStreamStats, val: &str);
23    #[doc = "Get the `timestamp` field of this object."]
24    #[doc = ""]
25    #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"]
26    #[wasm_bindgen(method, getter = "timestamp")]
27    pub fn get_timestamp(this: &RtcrtpStreamStats) -> Option<f64>;
28    #[doc = "Change the `timestamp` field of this object."]
29    #[doc = ""]
30    #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"]
31    #[wasm_bindgen(method, setter = "timestamp")]
32    pub fn set_timestamp(this: &RtcrtpStreamStats, val: f64);
33    #[cfg(feature = "RtcStatsType")]
34    #[doc = "Get the `type` field of this object."]
35    #[doc = ""]
36    #[doc = "*This API requires the following crate features to be activated: `RtcStatsType`, `RtcrtpStreamStats`*"]
37    #[wasm_bindgen(method, getter = "type")]
38    pub fn get_type(this: &RtcrtpStreamStats) -> Option<RtcStatsType>;
39    #[cfg(feature = "RtcStatsType")]
40    #[doc = "Change the `type` field of this object."]
41    #[doc = ""]
42    #[doc = "*This API requires the following crate features to be activated: `RtcStatsType`, `RtcrtpStreamStats`*"]
43    #[wasm_bindgen(method, setter = "type")]
44    pub fn set_type(this: &RtcrtpStreamStats, val: RtcStatsType);
45    #[doc = "Get the `bitrateMean` field of this object."]
46    #[doc = ""]
47    #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"]
48    #[wasm_bindgen(method, getter = "bitrateMean")]
49    pub fn get_bitrate_mean(this: &RtcrtpStreamStats) -> Option<f64>;
50    #[doc = "Change the `bitrateMean` field of this object."]
51    #[doc = ""]
52    #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"]
53    #[wasm_bindgen(method, setter = "bitrateMean")]
54    pub fn set_bitrate_mean(this: &RtcrtpStreamStats, val: f64);
55    #[doc = "Get the `bitrateStdDev` field of this object."]
56    #[doc = ""]
57    #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"]
58    #[wasm_bindgen(method, getter = "bitrateStdDev")]
59    pub fn get_bitrate_std_dev(this: &RtcrtpStreamStats) -> Option<f64>;
60    #[doc = "Change the `bitrateStdDev` field of this object."]
61    #[doc = ""]
62    #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"]
63    #[wasm_bindgen(method, setter = "bitrateStdDev")]
64    pub fn set_bitrate_std_dev(this: &RtcrtpStreamStats, val: f64);
65    #[doc = "Get the `codecId` field of this object."]
66    #[doc = ""]
67    #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"]
68    #[wasm_bindgen(method, getter = "codecId")]
69    pub fn get_codec_id(this: &RtcrtpStreamStats) -> Option<::alloc::string::String>;
70    #[doc = "Change the `codecId` field of this object."]
71    #[doc = ""]
72    #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"]
73    #[wasm_bindgen(method, setter = "codecId")]
74    pub fn set_codec_id(this: &RtcrtpStreamStats, val: &str);
75    #[doc = "Get the `firCount` field of this object."]
76    #[doc = ""]
77    #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"]
78    #[wasm_bindgen(method, getter = "firCount")]
79    pub fn get_fir_count(this: &RtcrtpStreamStats) -> Option<u32>;
80    #[doc = "Change the `firCount` field of this object."]
81    #[doc = ""]
82    #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"]
83    #[wasm_bindgen(method, setter = "firCount")]
84    pub fn set_fir_count(this: &RtcrtpStreamStats, val: u32);
85    #[doc = "Get the `framerateMean` field of this object."]
86    #[doc = ""]
87    #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"]
88    #[wasm_bindgen(method, getter = "framerateMean")]
89    pub fn get_framerate_mean(this: &RtcrtpStreamStats) -> Option<f64>;
90    #[doc = "Change the `framerateMean` field of this object."]
91    #[doc = ""]
92    #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"]
93    #[wasm_bindgen(method, setter = "framerateMean")]
94    pub fn set_framerate_mean(this: &RtcrtpStreamStats, val: f64);
95    #[doc = "Get the `framerateStdDev` field of this object."]
96    #[doc = ""]
97    #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"]
98    #[wasm_bindgen(method, getter = "framerateStdDev")]
99    pub fn get_framerate_std_dev(this: &RtcrtpStreamStats) -> Option<f64>;
100    #[doc = "Change the `framerateStdDev` field of this object."]
101    #[doc = ""]
102    #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"]
103    #[wasm_bindgen(method, setter = "framerateStdDev")]
104    pub fn set_framerate_std_dev(this: &RtcrtpStreamStats, val: f64);
105    #[doc = "Get the `isRemote` field of this object."]
106    #[doc = ""]
107    #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"]
108    #[wasm_bindgen(method, getter = "isRemote")]
109    pub fn get_is_remote(this: &RtcrtpStreamStats) -> Option<bool>;
110    #[doc = "Change the `isRemote` field of this object."]
111    #[doc = ""]
112    #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"]
113    #[wasm_bindgen(method, setter = "isRemote")]
114    pub fn set_is_remote(this: &RtcrtpStreamStats, val: bool);
115    #[doc = "Get the `mediaTrackId` field of this object."]
116    #[doc = ""]
117    #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"]
118    #[wasm_bindgen(method, getter = "mediaTrackId")]
119    pub fn get_media_track_id(this: &RtcrtpStreamStats) -> Option<::alloc::string::String>;
120    #[doc = "Change the `mediaTrackId` field of this object."]
121    #[doc = ""]
122    #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"]
123    #[wasm_bindgen(method, setter = "mediaTrackId")]
124    pub fn set_media_track_id(this: &RtcrtpStreamStats, val: &str);
125    #[doc = "Get the `mediaType` field of this object."]
126    #[doc = ""]
127    #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"]
128    #[wasm_bindgen(method, getter = "mediaType")]
129    pub fn get_media_type(this: &RtcrtpStreamStats) -> Option<::alloc::string::String>;
130    #[doc = "Change the `mediaType` field of this object."]
131    #[doc = ""]
132    #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"]
133    #[wasm_bindgen(method, setter = "mediaType")]
134    pub fn set_media_type(this: &RtcrtpStreamStats, val: &str);
135    #[doc = "Get the `nackCount` field of this object."]
136    #[doc = ""]
137    #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"]
138    #[wasm_bindgen(method, getter = "nackCount")]
139    pub fn get_nack_count(this: &RtcrtpStreamStats) -> Option<u32>;
140    #[doc = "Change the `nackCount` field of this object."]
141    #[doc = ""]
142    #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"]
143    #[wasm_bindgen(method, setter = "nackCount")]
144    pub fn set_nack_count(this: &RtcrtpStreamStats, val: u32);
145    #[doc = "Get the `pliCount` field of this object."]
146    #[doc = ""]
147    #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"]
148    #[wasm_bindgen(method, getter = "pliCount")]
149    pub fn get_pli_count(this: &RtcrtpStreamStats) -> Option<u32>;
150    #[doc = "Change the `pliCount` field of this object."]
151    #[doc = ""]
152    #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"]
153    #[wasm_bindgen(method, setter = "pliCount")]
154    pub fn set_pli_count(this: &RtcrtpStreamStats, val: u32);
155    #[doc = "Get the `remoteId` field of this object."]
156    #[doc = ""]
157    #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"]
158    #[wasm_bindgen(method, getter = "remoteId")]
159    pub fn get_remote_id(this: &RtcrtpStreamStats) -> Option<::alloc::string::String>;
160    #[doc = "Change the `remoteId` field of this object."]
161    #[doc = ""]
162    #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"]
163    #[wasm_bindgen(method, setter = "remoteId")]
164    pub fn set_remote_id(this: &RtcrtpStreamStats, val: &str);
165    #[doc = "Get the `ssrc` field of this object."]
166    #[doc = ""]
167    #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"]
168    #[wasm_bindgen(method, getter = "ssrc")]
169    pub fn get_ssrc(this: &RtcrtpStreamStats) -> Option<::alloc::string::String>;
170    #[doc = "Change the `ssrc` field of this object."]
171    #[doc = ""]
172    #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"]
173    #[wasm_bindgen(method, setter = "ssrc")]
174    pub fn set_ssrc(this: &RtcrtpStreamStats, val: &str);
175    #[doc = "Get the `transportId` field of this object."]
176    #[doc = ""]
177    #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"]
178    #[wasm_bindgen(method, getter = "transportId")]
179    pub fn get_transport_id(this: &RtcrtpStreamStats) -> Option<::alloc::string::String>;
180    #[doc = "Change the `transportId` field of this object."]
181    #[doc = ""]
182    #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"]
183    #[wasm_bindgen(method, setter = "transportId")]
184    pub fn set_transport_id(this: &RtcrtpStreamStats, val: &str);
185}
186impl RtcrtpStreamStats {
187    #[doc = "Construct a new `RtcrtpStreamStats`."]
188    #[doc = ""]
189    #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"]
190    pub fn new() -> Self {
191        #[allow(unused_mut)]
192        let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
193        ret
194    }
195    #[deprecated = "Use `set_id()` instead."]
196    pub fn id(&mut self, val: &str) -> &mut Self {
197        self.set_id(val);
198        self
199    }
200    #[deprecated = "Use `set_timestamp()` instead."]
201    pub fn timestamp(&mut self, val: f64) -> &mut Self {
202        self.set_timestamp(val);
203        self
204    }
205    #[cfg(feature = "RtcStatsType")]
206    #[deprecated = "Use `set_type()` instead."]
207    pub fn type_(&mut self, val: RtcStatsType) -> &mut Self {
208        self.set_type(val);
209        self
210    }
211    #[deprecated = "Use `set_bitrate_mean()` instead."]
212    pub fn bitrate_mean(&mut self, val: f64) -> &mut Self {
213        self.set_bitrate_mean(val);
214        self
215    }
216    #[deprecated = "Use `set_bitrate_std_dev()` instead."]
217    pub fn bitrate_std_dev(&mut self, val: f64) -> &mut Self {
218        self.set_bitrate_std_dev(val);
219        self
220    }
221    #[deprecated = "Use `set_codec_id()` instead."]
222    pub fn codec_id(&mut self, val: &str) -> &mut Self {
223        self.set_codec_id(val);
224        self
225    }
226    #[deprecated = "Use `set_fir_count()` instead."]
227    pub fn fir_count(&mut self, val: u32) -> &mut Self {
228        self.set_fir_count(val);
229        self
230    }
231    #[deprecated = "Use `set_framerate_mean()` instead."]
232    pub fn framerate_mean(&mut self, val: f64) -> &mut Self {
233        self.set_framerate_mean(val);
234        self
235    }
236    #[deprecated = "Use `set_framerate_std_dev()` instead."]
237    pub fn framerate_std_dev(&mut self, val: f64) -> &mut Self {
238        self.set_framerate_std_dev(val);
239        self
240    }
241    #[deprecated = "Use `set_is_remote()` instead."]
242    pub fn is_remote(&mut self, val: bool) -> &mut Self {
243        self.set_is_remote(val);
244        self
245    }
246    #[deprecated = "Use `set_media_track_id()` instead."]
247    pub fn media_track_id(&mut self, val: &str) -> &mut Self {
248        self.set_media_track_id(val);
249        self
250    }
251    #[deprecated = "Use `set_media_type()` instead."]
252    pub fn media_type(&mut self, val: &str) -> &mut Self {
253        self.set_media_type(val);
254        self
255    }
256    #[deprecated = "Use `set_nack_count()` instead."]
257    pub fn nack_count(&mut self, val: u32) -> &mut Self {
258        self.set_nack_count(val);
259        self
260    }
261    #[deprecated = "Use `set_pli_count()` instead."]
262    pub fn pli_count(&mut self, val: u32) -> &mut Self {
263        self.set_pli_count(val);
264        self
265    }
266    #[deprecated = "Use `set_remote_id()` instead."]
267    pub fn remote_id(&mut self, val: &str) -> &mut Self {
268        self.set_remote_id(val);
269        self
270    }
271    #[deprecated = "Use `set_ssrc()` instead."]
272    pub fn ssrc(&mut self, val: &str) -> &mut Self {
273        self.set_ssrc(val);
274        self
275    }
276    #[deprecated = "Use `set_transport_id()` instead."]
277    pub fn transport_id(&mut self, val: &str) -> &mut Self {
278        self.set_transport_id(val);
279        self
280    }
281}
282impl Default for RtcrtpStreamStats {
283    fn default() -> Self {
284        Self::new()
285    }
286}