Skip to main content

web_sys/features/
gen_DelayNode.rs

1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7    #[wasm_bindgen(
8        extends = "AudioNode",
9        extends = "EventTarget",
10        extends = "::js_sys::Object",
11        js_name = "DelayNode",
12        typescript_type = "DelayNode"
13    )]
14    #[derive(Debug, Clone, PartialEq, Eq)]
15    #[doc = "The `DelayNode` class."]
16    #[doc = ""]
17    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DelayNode)"]
18    #[doc = ""]
19    #[doc = "*This API requires the following crate features to be activated: `DelayNode`*"]
20    pub type DelayNode;
21    #[cfg(feature = "AudioParam")]
22    #[wasm_bindgen(method, getter, js_class = "DelayNode", js_name = "delayTime")]
23    #[doc = "Getter for the `delayTime` field of this object."]
24    #[doc = ""]
25    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DelayNode/delayTime)"]
26    #[doc = ""]
27    #[doc = "*This API requires the following crate features to be activated: `AudioParam`, `DelayNode`*"]
28    pub fn delay_time(this: &DelayNode) -> AudioParam;
29    #[cfg(feature = "BaseAudioContext")]
30    #[wasm_bindgen(catch, constructor, js_class = "DelayNode")]
31    #[doc = "The `new DelayNode(..)` constructor, creating a new instance of `DelayNode`."]
32    #[doc = ""]
33    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DelayNode/DelayNode)"]
34    #[doc = ""]
35    #[doc = "*This API requires the following crate features to be activated: `BaseAudioContext`, `DelayNode`*"]
36    pub fn new(context: &BaseAudioContext) -> Result<DelayNode, JsValue>;
37    #[cfg(all(feature = "BaseAudioContext", feature = "DelayOptions",))]
38    #[wasm_bindgen(catch, constructor, js_class = "DelayNode")]
39    #[doc = "The `new DelayNode(..)` constructor, creating a new instance of `DelayNode`."]
40    #[doc = ""]
41    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DelayNode/DelayNode)"]
42    #[doc = ""]
43    #[doc = "*This API requires the following crate features to be activated: `BaseAudioContext`, `DelayNode`, `DelayOptions`*"]
44    pub fn new_with_options(
45        context: &BaseAudioContext,
46        options: &DelayOptions,
47    ) -> Result<DelayNode, JsValue>;
48}