web_sys/features/
gen_DelayOptions.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 = DelayOptions)]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `DelayOptions` dictionary."]
10 #[doc = ""]
11 #[doc = "*This API requires the following crate features to be activated: `DelayOptions`*"]
12 pub type DelayOptions;
13 #[doc = "Get the `channelCount` field of this object."]
14 #[doc = ""]
15 #[doc = "*This API requires the following crate features to be activated: `DelayOptions`*"]
16 #[wasm_bindgen(method, getter = "channelCount")]
17 pub fn get_channel_count(this: &DelayOptions) -> Option<u32>;
18 #[doc = "Change the `channelCount` field of this object."]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `DelayOptions`*"]
21 #[wasm_bindgen(method, setter = "channelCount")]
22 pub fn set_channel_count(this: &DelayOptions, val: u32);
23 #[cfg(feature = "ChannelCountMode")]
24 #[doc = "Get the `channelCountMode` field of this object."]
25 #[doc = ""]
26 #[doc = "*This API requires the following crate features to be activated: `ChannelCountMode`, `DelayOptions`*"]
27 #[wasm_bindgen(method, getter = "channelCountMode")]
28 pub fn get_channel_count_mode(this: &DelayOptions) -> Option<ChannelCountMode>;
29 #[cfg(feature = "ChannelCountMode")]
30 #[doc = "Change the `channelCountMode` field of this object."]
31 #[doc = ""]
32 #[doc = "*This API requires the following crate features to be activated: `ChannelCountMode`, `DelayOptions`*"]
33 #[wasm_bindgen(method, setter = "channelCountMode")]
34 pub fn set_channel_count_mode(this: &DelayOptions, val: ChannelCountMode);
35 #[cfg(feature = "ChannelInterpretation")]
36 #[doc = "Get the `channelInterpretation` field of this object."]
37 #[doc = ""]
38 #[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `DelayOptions`*"]
39 #[wasm_bindgen(method, getter = "channelInterpretation")]
40 pub fn get_channel_interpretation(this: &DelayOptions) -> Option<ChannelInterpretation>;
41 #[cfg(feature = "ChannelInterpretation")]
42 #[doc = "Change the `channelInterpretation` field of this object."]
43 #[doc = ""]
44 #[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `DelayOptions`*"]
45 #[wasm_bindgen(method, setter = "channelInterpretation")]
46 pub fn set_channel_interpretation(this: &DelayOptions, val: ChannelInterpretation);
47 #[doc = "Get the `delayTime` field of this object."]
48 #[doc = ""]
49 #[doc = "*This API requires the following crate features to be activated: `DelayOptions`*"]
50 #[wasm_bindgen(method, getter = "delayTime")]
51 pub fn get_delay_time(this: &DelayOptions) -> Option<f64>;
52 #[doc = "Change the `delayTime` field of this object."]
53 #[doc = ""]
54 #[doc = "*This API requires the following crate features to be activated: `DelayOptions`*"]
55 #[wasm_bindgen(method, setter = "delayTime")]
56 pub fn set_delay_time(this: &DelayOptions, val: f64);
57 #[doc = "Get the `maxDelayTime` field of this object."]
58 #[doc = ""]
59 #[doc = "*This API requires the following crate features to be activated: `DelayOptions`*"]
60 #[wasm_bindgen(method, getter = "maxDelayTime")]
61 pub fn get_max_delay_time(this: &DelayOptions) -> Option<f64>;
62 #[doc = "Change the `maxDelayTime` field of this object."]
63 #[doc = ""]
64 #[doc = "*This API requires the following crate features to be activated: `DelayOptions`*"]
65 #[wasm_bindgen(method, setter = "maxDelayTime")]
66 pub fn set_max_delay_time(this: &DelayOptions, val: f64);
67}
68impl DelayOptions {
69 #[doc = "Construct a new `DelayOptions`."]
70 #[doc = ""]
71 #[doc = "*This API requires the following crate features to be activated: `DelayOptions`*"]
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 #[deprecated = "Use `set_channel_count()` instead."]
78 pub fn channel_count(&mut self, val: u32) -> &mut Self {
79 self.set_channel_count(val);
80 self
81 }
82 #[cfg(feature = "ChannelCountMode")]
83 #[deprecated = "Use `set_channel_count_mode()` instead."]
84 pub fn channel_count_mode(&mut self, val: ChannelCountMode) -> &mut Self {
85 self.set_channel_count_mode(val);
86 self
87 }
88 #[cfg(feature = "ChannelInterpretation")]
89 #[deprecated = "Use `set_channel_interpretation()` instead."]
90 pub fn channel_interpretation(&mut self, val: ChannelInterpretation) -> &mut Self {
91 self.set_channel_interpretation(val);
92 self
93 }
94 #[deprecated = "Use `set_delay_time()` instead."]
95 pub fn delay_time(&mut self, val: f64) -> &mut Self {
96 self.set_delay_time(val);
97 self
98 }
99 #[deprecated = "Use `set_max_delay_time()` instead."]
100 pub fn max_delay_time(&mut self, val: f64) -> &mut Self {
101 self.set_max_delay_time(val);
102 self
103 }
104}
105impl Default for DelayOptions {
106 fn default() -> Self {
107 Self::new()
108 }
109}