web_sys/features/
gen_RtcOfferOptions.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 = RTCOfferOptions)]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `RtcOfferOptions` dictionary."]
10 #[doc = ""]
11 #[doc = "*This API requires the following crate features to be activated: `RtcOfferOptions`*"]
12 pub type RtcOfferOptions;
13 #[doc = "Get the `iceRestart` field of this object."]
14 #[doc = ""]
15 #[doc = "*This API requires the following crate features to be activated: `RtcOfferOptions`*"]
16 #[wasm_bindgen(method, getter = "iceRestart")]
17 pub fn get_ice_restart(this: &RtcOfferOptions) -> Option<bool>;
18 #[doc = "Change the `iceRestart` field of this object."]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `RtcOfferOptions`*"]
21 #[wasm_bindgen(method, setter = "iceRestart")]
22 pub fn set_ice_restart(this: &RtcOfferOptions, val: bool);
23 #[doc = "Get the `offerToReceiveAudio` field of this object."]
24 #[doc = ""]
25 #[doc = "*This API requires the following crate features to be activated: `RtcOfferOptions`*"]
26 #[wasm_bindgen(method, getter = "offerToReceiveAudio")]
27 pub fn get_offer_to_receive_audio(this: &RtcOfferOptions) -> Option<bool>;
28 #[doc = "Change the `offerToReceiveAudio` field of this object."]
29 #[doc = ""]
30 #[doc = "*This API requires the following crate features to be activated: `RtcOfferOptions`*"]
31 #[wasm_bindgen(method, setter = "offerToReceiveAudio")]
32 pub fn set_offer_to_receive_audio(this: &RtcOfferOptions, val: bool);
33 #[doc = "Get the `offerToReceiveVideo` field of this object."]
34 #[doc = ""]
35 #[doc = "*This API requires the following crate features to be activated: `RtcOfferOptions`*"]
36 #[wasm_bindgen(method, getter = "offerToReceiveVideo")]
37 pub fn get_offer_to_receive_video(this: &RtcOfferOptions) -> Option<bool>;
38 #[doc = "Change the `offerToReceiveVideo` field of this object."]
39 #[doc = ""]
40 #[doc = "*This API requires the following crate features to be activated: `RtcOfferOptions`*"]
41 #[wasm_bindgen(method, setter = "offerToReceiveVideo")]
42 pub fn set_offer_to_receive_video(this: &RtcOfferOptions, val: bool);
43}
44impl RtcOfferOptions {
45 #[doc = "Construct a new `RtcOfferOptions`."]
46 #[doc = ""]
47 #[doc = "*This API requires the following crate features to be activated: `RtcOfferOptions`*"]
48 pub fn new() -> Self {
49 #[allow(unused_mut)]
50 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
51 ret
52 }
53 #[deprecated = "Use `set_ice_restart()` instead."]
54 pub fn ice_restart(&mut self, val: bool) -> &mut Self {
55 self.set_ice_restart(val);
56 self
57 }
58 #[deprecated = "Use `set_offer_to_receive_audio()` instead."]
59 pub fn offer_to_receive_audio(&mut self, val: bool) -> &mut Self {
60 self.set_offer_to_receive_audio(val);
61 self
62 }
63 #[deprecated = "Use `set_offer_to_receive_video()` instead."]
64 pub fn offer_to_receive_video(&mut self, val: bool) -> &mut Self {
65 self.set_offer_to_receive_video(val);
66 self
67 }
68}
69impl Default for RtcOfferOptions {
70 fn default() -> Self {
71 Self::new()
72 }
73}