web_sys/features/
gen_RtcRtpCodecParameters.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 = RTCRtpCodecParameters)]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `RtcRtpCodecParameters` dictionary."]
10 #[doc = ""]
11 #[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecParameters`*"]
12 pub type RtcRtpCodecParameters;
13 #[doc = "Get the `channels` field of this object."]
14 #[doc = ""]
15 #[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecParameters`*"]
16 #[wasm_bindgen(method, getter = "channels")]
17 pub fn get_channels(this: &RtcRtpCodecParameters) -> Option<u16>;
18 #[doc = "Change the `channels` field of this object."]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecParameters`*"]
21 #[wasm_bindgen(method, setter = "channels")]
22 pub fn set_channels(this: &RtcRtpCodecParameters, val: u16);
23 #[doc = "Get the `clockRate` field of this object."]
24 #[doc = ""]
25 #[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecParameters`*"]
26 #[wasm_bindgen(method, getter = "clockRate")]
27 pub fn get_clock_rate(this: &RtcRtpCodecParameters) -> Option<u32>;
28 #[doc = "Change the `clockRate` field of this object."]
29 #[doc = ""]
30 #[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecParameters`*"]
31 #[wasm_bindgen(method, setter = "clockRate")]
32 pub fn set_clock_rate(this: &RtcRtpCodecParameters, val: u32);
33 #[doc = "Get the `mimeType` field of this object."]
34 #[doc = ""]
35 #[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecParameters`*"]
36 #[wasm_bindgen(method, getter = "mimeType")]
37 pub fn get_mime_type(this: &RtcRtpCodecParameters) -> Option<::alloc::string::String>;
38 #[doc = "Change the `mimeType` field of this object."]
39 #[doc = ""]
40 #[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecParameters`*"]
41 #[wasm_bindgen(method, setter = "mimeType")]
42 pub fn set_mime_type(this: &RtcRtpCodecParameters, val: &str);
43 #[doc = "Get the `payloadType` field of this object."]
44 #[doc = ""]
45 #[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecParameters`*"]
46 #[wasm_bindgen(method, getter = "payloadType")]
47 pub fn get_payload_type(this: &RtcRtpCodecParameters) -> Option<u16>;
48 #[doc = "Change the `payloadType` field of this object."]
49 #[doc = ""]
50 #[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecParameters`*"]
51 #[wasm_bindgen(method, setter = "payloadType")]
52 pub fn set_payload_type(this: &RtcRtpCodecParameters, val: u16);
53 #[doc = "Get the `sdpFmtpLine` field of this object."]
54 #[doc = ""]
55 #[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecParameters`*"]
56 #[wasm_bindgen(method, getter = "sdpFmtpLine")]
57 pub fn get_sdp_fmtp_line(this: &RtcRtpCodecParameters) -> Option<::alloc::string::String>;
58 #[doc = "Change the `sdpFmtpLine` field of this object."]
59 #[doc = ""]
60 #[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecParameters`*"]
61 #[wasm_bindgen(method, setter = "sdpFmtpLine")]
62 pub fn set_sdp_fmtp_line(this: &RtcRtpCodecParameters, val: &str);
63}
64impl RtcRtpCodecParameters {
65 #[doc = "Construct a new `RtcRtpCodecParameters`."]
66 #[doc = ""]
67 #[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecParameters`*"]
68 pub fn new() -> Self {
69 #[allow(unused_mut)]
70 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
71 ret
72 }
73 #[deprecated = "Use `set_channels()` instead."]
74 pub fn channels(&mut self, val: u16) -> &mut Self {
75 self.set_channels(val);
76 self
77 }
78 #[deprecated = "Use `set_clock_rate()` instead."]
79 pub fn clock_rate(&mut self, val: u32) -> &mut Self {
80 self.set_clock_rate(val);
81 self
82 }
83 #[deprecated = "Use `set_mime_type()` instead."]
84 pub fn mime_type(&mut self, val: &str) -> &mut Self {
85 self.set_mime_type(val);
86 self
87 }
88 #[deprecated = "Use `set_payload_type()` instead."]
89 pub fn payload_type(&mut self, val: u16) -> &mut Self {
90 self.set_payload_type(val);
91 self
92 }
93 #[deprecated = "Use `set_sdp_fmtp_line()` instead."]
94 pub fn sdp_fmtp_line(&mut self, val: &str) -> &mut Self {
95 self.set_sdp_fmtp_line(val);
96 self
97 }
98}
99impl Default for RtcRtpCodecParameters {
100 fn default() -> Self {
101 Self::new()
102 }
103}