web_sys/features/
gen_RtcMediaStreamTrackStats.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
#![allow(unused_imports)]
#![allow(clippy::all)]
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;
    #[doc = "Get the `id` field of this object."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"]
    #[wasm_bindgen(method, getter = "id")]
    pub fn get_id(this: &RtcMediaStreamTrackStats) -> Option<::alloc::string::String>;
    #[doc = "Change the `id` field of this object."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"]
    #[wasm_bindgen(method, setter = "id")]
    pub fn set_id(this: &RtcMediaStreamTrackStats, val: &str);
    #[doc = "Get the `timestamp` field of this object."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"]
    #[wasm_bindgen(method, getter = "timestamp")]
    pub fn get_timestamp(this: &RtcMediaStreamTrackStats) -> Option<f64>;
    #[doc = "Change the `timestamp` field of this object."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"]
    #[wasm_bindgen(method, setter = "timestamp")]
    pub fn set_timestamp(this: &RtcMediaStreamTrackStats, val: f64);
    #[cfg(feature = "RtcStatsType")]
    #[doc = "Get the `type` field of this object."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`, `RtcStatsType`*"]
    #[wasm_bindgen(method, getter = "type")]
    pub fn get_type(this: &RtcMediaStreamTrackStats) -> Option<RtcStatsType>;
    #[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`*"]
    #[wasm_bindgen(method, setter = "type")]
    pub fn set_type(this: &RtcMediaStreamTrackStats, val: RtcStatsType);
    #[doc = "Get the `audioLevel` field of this object."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"]
    #[wasm_bindgen(method, getter = "audioLevel")]
    pub fn get_audio_level(this: &RtcMediaStreamTrackStats) -> Option<f64>;
    #[doc = "Change the `audioLevel` field of this object."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"]
    #[wasm_bindgen(method, setter = "audioLevel")]
    pub fn set_audio_level(this: &RtcMediaStreamTrackStats, val: f64);
    #[doc = "Get the `echoReturnLoss` field of this object."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"]
    #[wasm_bindgen(method, getter = "echoReturnLoss")]
    pub fn get_echo_return_loss(this: &RtcMediaStreamTrackStats) -> Option<f64>;
    #[doc = "Change the `echoReturnLoss` field of this object."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"]
    #[wasm_bindgen(method, setter = "echoReturnLoss")]
    pub fn set_echo_return_loss(this: &RtcMediaStreamTrackStats, val: f64);
    #[doc = "Get the `echoReturnLossEnhancement` field of this object."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"]
    #[wasm_bindgen(method, getter = "echoReturnLossEnhancement")]
    pub fn get_echo_return_loss_enhancement(this: &RtcMediaStreamTrackStats) -> Option<f64>;
    #[doc = "Change the `echoReturnLossEnhancement` field of this object."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"]
    #[wasm_bindgen(method, setter = "echoReturnLossEnhancement")]
    pub fn set_echo_return_loss_enhancement(this: &RtcMediaStreamTrackStats, val: f64);
    #[doc = "Get the `frameHeight` field of this object."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"]
    #[wasm_bindgen(method, getter = "frameHeight")]
    pub fn get_frame_height(this: &RtcMediaStreamTrackStats) -> Option<u32>;
    #[doc = "Change the `frameHeight` field of this object."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"]
    #[wasm_bindgen(method, setter = "frameHeight")]
    pub fn set_frame_height(this: &RtcMediaStreamTrackStats, val: u32);
    #[doc = "Get the `frameWidth` field of this object."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"]
    #[wasm_bindgen(method, getter = "frameWidth")]
    pub fn get_frame_width(this: &RtcMediaStreamTrackStats) -> Option<u32>;
    #[doc = "Change the `frameWidth` field of this object."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"]
    #[wasm_bindgen(method, setter = "frameWidth")]
    pub fn set_frame_width(this: &RtcMediaStreamTrackStats, val: u32);
    #[doc = "Get the `framesCorrupted` field of this object."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"]
    #[wasm_bindgen(method, getter = "framesCorrupted")]
    pub fn get_frames_corrupted(this: &RtcMediaStreamTrackStats) -> Option<u32>;
    #[doc = "Change the `framesCorrupted` field of this object."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"]
    #[wasm_bindgen(method, setter = "framesCorrupted")]
    pub fn set_frames_corrupted(this: &RtcMediaStreamTrackStats, val: u32);
    #[doc = "Get the `framesDecoded` field of this object."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"]
    #[wasm_bindgen(method, getter = "framesDecoded")]
    pub fn get_frames_decoded(this: &RtcMediaStreamTrackStats) -> Option<u32>;
    #[doc = "Change the `framesDecoded` field of this object."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"]
    #[wasm_bindgen(method, setter = "framesDecoded")]
    pub fn set_frames_decoded(this: &RtcMediaStreamTrackStats, val: u32);
    #[doc = "Get the `framesDropped` field of this object."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"]
    #[wasm_bindgen(method, getter = "framesDropped")]
    pub fn get_frames_dropped(this: &RtcMediaStreamTrackStats) -> Option<u32>;
    #[doc = "Change the `framesDropped` field of this object."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"]
    #[wasm_bindgen(method, setter = "framesDropped")]
    pub fn set_frames_dropped(this: &RtcMediaStreamTrackStats, val: u32);
    #[doc = "Get the `framesPerSecond` field of this object."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"]
    #[wasm_bindgen(method, getter = "framesPerSecond")]
    pub fn get_frames_per_second(this: &RtcMediaStreamTrackStats) -> Option<f64>;
    #[doc = "Change the `framesPerSecond` field of this object."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"]
    #[wasm_bindgen(method, setter = "framesPerSecond")]
    pub fn set_frames_per_second(this: &RtcMediaStreamTrackStats, val: f64);
    #[doc = "Get the `framesReceived` field of this object."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"]
    #[wasm_bindgen(method, getter = "framesReceived")]
    pub fn get_frames_received(this: &RtcMediaStreamTrackStats) -> Option<u32>;
    #[doc = "Change the `framesReceived` field of this object."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"]
    #[wasm_bindgen(method, setter = "framesReceived")]
    pub fn set_frames_received(this: &RtcMediaStreamTrackStats, val: u32);
    #[doc = "Get the `framesSent` field of this object."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"]
    #[wasm_bindgen(method, getter = "framesSent")]
    pub fn get_frames_sent(this: &RtcMediaStreamTrackStats) -> Option<u32>;
    #[doc = "Change the `framesSent` field of this object."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"]
    #[wasm_bindgen(method, setter = "framesSent")]
    pub fn set_frames_sent(this: &RtcMediaStreamTrackStats, val: u32);
    #[doc = "Get the `remoteSource` field of this object."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"]
    #[wasm_bindgen(method, getter = "remoteSource")]
    pub fn get_remote_source(this: &RtcMediaStreamTrackStats) -> Option<bool>;
    #[doc = "Change the `remoteSource` field of this object."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"]
    #[wasm_bindgen(method, setter = "remoteSource")]
    pub fn set_remote_source(this: &RtcMediaStreamTrackStats, val: bool);
    #[doc = "Get the `ssrcIds` field of this object."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"]
    #[wasm_bindgen(method, getter = "ssrcIds")]
    pub fn get_ssrc_ids(this: &RtcMediaStreamTrackStats) -> Option<::js_sys::Array>;
    #[doc = "Change the `ssrcIds` field of this object."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"]
    #[wasm_bindgen(method, setter = "ssrcIds")]
    pub fn set_ssrc_ids(this: &RtcMediaStreamTrackStats, val: &::wasm_bindgen::JsValue);
    #[doc = "Get the `trackIdentifier` field of this object."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"]
    #[wasm_bindgen(method, getter = "trackIdentifier")]
    pub fn get_track_identifier(this: &RtcMediaStreamTrackStats)
        -> Option<::alloc::string::String>;
    #[doc = "Change the `trackIdentifier` field of this object."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"]
    #[wasm_bindgen(method, setter = "trackIdentifier")]
    pub fn set_track_identifier(this: &RtcMediaStreamTrackStats, val: &str);
}
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
    }
    #[deprecated = "Use `set_id()` instead."]
    pub fn id(&mut self, val: &str) -> &mut Self {
        self.set_id(val);
        self
    }
    #[deprecated = "Use `set_timestamp()` instead."]
    pub fn timestamp(&mut self, val: f64) -> &mut Self {
        self.set_timestamp(val);
        self
    }
    #[cfg(feature = "RtcStatsType")]
    #[deprecated = "Use `set_type()` instead."]
    pub fn type_(&mut self, val: RtcStatsType) -> &mut Self {
        self.set_type(val);
        self
    }
    #[deprecated = "Use `set_audio_level()` instead."]
    pub fn audio_level(&mut self, val: f64) -> &mut Self {
        self.set_audio_level(val);
        self
    }
    #[deprecated = "Use `set_echo_return_loss()` instead."]
    pub fn echo_return_loss(&mut self, val: f64) -> &mut Self {
        self.set_echo_return_loss(val);
        self
    }
    #[deprecated = "Use `set_echo_return_loss_enhancement()` instead."]
    pub fn echo_return_loss_enhancement(&mut self, val: f64) -> &mut Self {
        self.set_echo_return_loss_enhancement(val);
        self
    }
    #[deprecated = "Use `set_frame_height()` instead."]
    pub fn frame_height(&mut self, val: u32) -> &mut Self {
        self.set_frame_height(val);
        self
    }
    #[deprecated = "Use `set_frame_width()` instead."]
    pub fn frame_width(&mut self, val: u32) -> &mut Self {
        self.set_frame_width(val);
        self
    }
    #[deprecated = "Use `set_frames_corrupted()` instead."]
    pub fn frames_corrupted(&mut self, val: u32) -> &mut Self {
        self.set_frames_corrupted(val);
        self
    }
    #[deprecated = "Use `set_frames_decoded()` instead."]
    pub fn frames_decoded(&mut self, val: u32) -> &mut Self {
        self.set_frames_decoded(val);
        self
    }
    #[deprecated = "Use `set_frames_dropped()` instead."]
    pub fn frames_dropped(&mut self, val: u32) -> &mut Self {
        self.set_frames_dropped(val);
        self
    }
    #[deprecated = "Use `set_frames_per_second()` instead."]
    pub fn frames_per_second(&mut self, val: f64) -> &mut Self {
        self.set_frames_per_second(val);
        self
    }
    #[deprecated = "Use `set_frames_received()` instead."]
    pub fn frames_received(&mut self, val: u32) -> &mut Self {
        self.set_frames_received(val);
        self
    }
    #[deprecated = "Use `set_frames_sent()` instead."]
    pub fn frames_sent(&mut self, val: u32) -> &mut Self {
        self.set_frames_sent(val);
        self
    }
    #[deprecated = "Use `set_remote_source()` instead."]
    pub fn remote_source(&mut self, val: bool) -> &mut Self {
        self.set_remote_source(val);
        self
    }
    #[deprecated = "Use `set_ssrc_ids()` instead."]
    pub fn ssrc_ids(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
        self.set_ssrc_ids(val);
        self
    }
    #[deprecated = "Use `set_track_identifier()` instead."]
    pub fn track_identifier(&mut self, val: &str) -> &mut Self {
        self.set_track_identifier(val);
        self
    }
}
impl Default for RtcMediaStreamTrackStats {
    fn default() -> Self {
        Self::new()
    }
}