web_sys/features/
gen_RtcRtpParameters.rs1#![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 = RTCRtpParameters)]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `RtcRtpParameters` dictionary."]
10 #[doc = ""]
11 #[doc = "*This API requires the following crate features to be activated: `RtcRtpParameters`*"]
12 pub type RtcRtpParameters;
13 #[doc = "Get the `codecs` field of this object."]
14 #[doc = ""]
15 #[doc = "*This API requires the following crate features to be activated: `RtcRtpParameters`*"]
16 #[wasm_bindgen(method, getter = "codecs")]
17 pub fn get_codecs(this: &RtcRtpParameters) -> Option<::js_sys::Array>;
18 #[doc = "Change the `codecs` field of this object."]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `RtcRtpParameters`*"]
21 #[wasm_bindgen(method, setter = "codecs")]
22 pub fn set_codecs(this: &RtcRtpParameters, val: &::wasm_bindgen::JsValue);
23 #[doc = "Get the `encodings` field of this object."]
24 #[doc = ""]
25 #[doc = "*This API requires the following crate features to be activated: `RtcRtpParameters`*"]
26 #[wasm_bindgen(method, getter = "encodings")]
27 pub fn get_encodings(this: &RtcRtpParameters) -> Option<::js_sys::Array>;
28 #[doc = "Change the `encodings` field of this object."]
29 #[doc = ""]
30 #[doc = "*This API requires the following crate features to be activated: `RtcRtpParameters`*"]
31 #[wasm_bindgen(method, setter = "encodings")]
32 pub fn set_encodings(this: &RtcRtpParameters, val: &::wasm_bindgen::JsValue);
33 #[doc = "Get the `headerExtensions` field of this object."]
34 #[doc = ""]
35 #[doc = "*This API requires the following crate features to be activated: `RtcRtpParameters`*"]
36 #[wasm_bindgen(method, getter = "headerExtensions")]
37 pub fn get_header_extensions(this: &RtcRtpParameters) -> Option<::js_sys::Array>;
38 #[doc = "Change the `headerExtensions` field of this object."]
39 #[doc = ""]
40 #[doc = "*This API requires the following crate features to be activated: `RtcRtpParameters`*"]
41 #[wasm_bindgen(method, setter = "headerExtensions")]
42 pub fn set_header_extensions(this: &RtcRtpParameters, val: &::wasm_bindgen::JsValue);
43 #[cfg(feature = "RtcRtcpParameters")]
44 #[doc = "Get the `rtcp` field of this object."]
45 #[doc = ""]
46 #[doc = "*This API requires the following crate features to be activated: `RtcRtcpParameters`, `RtcRtpParameters`*"]
47 #[wasm_bindgen(method, getter = "rtcp")]
48 pub fn get_rtcp(this: &RtcRtpParameters) -> Option<RtcRtcpParameters>;
49 #[cfg(feature = "RtcRtcpParameters")]
50 #[doc = "Change the `rtcp` field of this object."]
51 #[doc = ""]
52 #[doc = "*This API requires the following crate features to be activated: `RtcRtcpParameters`, `RtcRtpParameters`*"]
53 #[wasm_bindgen(method, setter = "rtcp")]
54 pub fn set_rtcp(this: &RtcRtpParameters, val: &RtcRtcpParameters);
55}
56impl RtcRtpParameters {
57 #[doc = "Construct a new `RtcRtpParameters`."]
58 #[doc = ""]
59 #[doc = "*This API requires the following crate features to be activated: `RtcRtpParameters`*"]
60 pub fn new() -> Self {
61 #[allow(unused_mut)]
62 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
63 ret
64 }
65 #[deprecated = "Use `set_codecs()` instead."]
66 pub fn codecs(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
67 self.set_codecs(val);
68 self
69 }
70 #[deprecated = "Use `set_encodings()` instead."]
71 pub fn encodings(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
72 self.set_encodings(val);
73 self
74 }
75 #[deprecated = "Use `set_header_extensions()` instead."]
76 pub fn header_extensions(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
77 self.set_header_extensions(val);
78 self
79 }
80 #[cfg(feature = "RtcRtcpParameters")]
81 #[deprecated = "Use `set_rtcp()` instead."]
82 pub fn rtcp(&mut self, val: &RtcRtcpParameters) -> &mut Self {
83 self.set_rtcp(val);
84 self
85 }
86}
87impl Default for RtcRtpParameters {
88 fn default() -> Self {
89 Self::new()
90 }
91}