web_sys/features/
gen_RtcConfiguration.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 = RTCConfiguration)]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `RtcConfiguration` dictionary."]
10 #[doc = ""]
11 #[doc = "*This API requires the following crate features to be activated: `RtcConfiguration`*"]
12 pub type RtcConfiguration;
13 #[cfg(feature = "RtcBundlePolicy")]
14 #[doc = "Get the `bundlePolicy` field of this object."]
15 #[doc = ""]
16 #[doc = "*This API requires the following crate features to be activated: `RtcBundlePolicy`, `RtcConfiguration`*"]
17 #[wasm_bindgen(method, getter = "bundlePolicy")]
18 pub fn get_bundle_policy(this: &RtcConfiguration) -> Option<RtcBundlePolicy>;
19 #[cfg(feature = "RtcBundlePolicy")]
20 #[doc = "Change the `bundlePolicy` field of this object."]
21 #[doc = ""]
22 #[doc = "*This API requires the following crate features to be activated: `RtcBundlePolicy`, `RtcConfiguration`*"]
23 #[wasm_bindgen(method, setter = "bundlePolicy")]
24 pub fn set_bundle_policy(this: &RtcConfiguration, val: RtcBundlePolicy);
25 #[doc = "Get the `certificates` field of this object."]
26 #[doc = ""]
27 #[doc = "*This API requires the following crate features to be activated: `RtcConfiguration`*"]
28 #[wasm_bindgen(method, getter = "certificates")]
29 pub fn get_certificates(this: &RtcConfiguration) -> Option<::js_sys::Array>;
30 #[doc = "Change the `certificates` field of this object."]
31 #[doc = ""]
32 #[doc = "*This API requires the following crate features to be activated: `RtcConfiguration`*"]
33 #[wasm_bindgen(method, setter = "certificates")]
34 pub fn set_certificates(this: &RtcConfiguration, val: &::wasm_bindgen::JsValue);
35 #[doc = "Get the `iceServers` field of this object."]
36 #[doc = ""]
37 #[doc = "*This API requires the following crate features to be activated: `RtcConfiguration`*"]
38 #[wasm_bindgen(method, getter = "iceServers")]
39 pub fn get_ice_servers(this: &RtcConfiguration) -> Option<::js_sys::Array>;
40 #[doc = "Change the `iceServers` field of this object."]
41 #[doc = ""]
42 #[doc = "*This API requires the following crate features to be activated: `RtcConfiguration`*"]
43 #[wasm_bindgen(method, setter = "iceServers")]
44 pub fn set_ice_servers(this: &RtcConfiguration, val: &::wasm_bindgen::JsValue);
45 #[cfg(feature = "RtcIceTransportPolicy")]
46 #[doc = "Get the `iceTransportPolicy` field of this object."]
47 #[doc = ""]
48 #[doc = "*This API requires the following crate features to be activated: `RtcConfiguration`, `RtcIceTransportPolicy`*"]
49 #[wasm_bindgen(method, getter = "iceTransportPolicy")]
50 pub fn get_ice_transport_policy(this: &RtcConfiguration) -> Option<RtcIceTransportPolicy>;
51 #[cfg(feature = "RtcIceTransportPolicy")]
52 #[doc = "Change the `iceTransportPolicy` field of this object."]
53 #[doc = ""]
54 #[doc = "*This API requires the following crate features to be activated: `RtcConfiguration`, `RtcIceTransportPolicy`*"]
55 #[wasm_bindgen(method, setter = "iceTransportPolicy")]
56 pub fn set_ice_transport_policy(this: &RtcConfiguration, val: RtcIceTransportPolicy);
57 #[doc = "Get the `peerIdentity` field of this object."]
58 #[doc = ""]
59 #[doc = "*This API requires the following crate features to be activated: `RtcConfiguration`*"]
60 #[wasm_bindgen(method, getter = "peerIdentity")]
61 pub fn get_peer_identity(this: &RtcConfiguration) -> Option<::alloc::string::String>;
62 #[doc = "Change the `peerIdentity` field of this object."]
63 #[doc = ""]
64 #[doc = "*This API requires the following crate features to be activated: `RtcConfiguration`*"]
65 #[wasm_bindgen(method, setter = "peerIdentity")]
66 pub fn set_peer_identity(this: &RtcConfiguration, val: Option<&str>);
67}
68impl RtcConfiguration {
69 #[doc = "Construct a new `RtcConfiguration`."]
70 #[doc = ""]
71 #[doc = "*This API requires the following crate features to be activated: `RtcConfiguration`*"]
72 pub fn new() -> Self {
73 #[allow(unused_mut)]
74 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
75 ret
76 }
77 #[cfg(feature = "RtcBundlePolicy")]
78 #[deprecated = "Use `set_bundle_policy()` instead."]
79 pub fn bundle_policy(&mut self, val: RtcBundlePolicy) -> &mut Self {
80 self.set_bundle_policy(val);
81 self
82 }
83 #[deprecated = "Use `set_certificates()` instead."]
84 pub fn certificates(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
85 self.set_certificates(val);
86 self
87 }
88 #[deprecated = "Use `set_ice_servers()` instead."]
89 pub fn ice_servers(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
90 self.set_ice_servers(val);
91 self
92 }
93 #[cfg(feature = "RtcIceTransportPolicy")]
94 #[deprecated = "Use `set_ice_transport_policy()` instead."]
95 pub fn ice_transport_policy(&mut self, val: RtcIceTransportPolicy) -> &mut Self {
96 self.set_ice_transport_policy(val);
97 self
98 }
99 #[deprecated = "Use `set_peer_identity()` instead."]
100 pub fn peer_identity(&mut self, val: Option<&str>) -> &mut Self {
101 self.set_peer_identity(val);
102 self
103 }
104}
105impl Default for RtcConfiguration {
106 fn default() -> Self {
107 Self::new()
108 }
109}