web_sys/features/
gen_TrackEventInit.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 = TrackEventInit)]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `TrackEventInit` dictionary."]
10 #[doc = ""]
11 #[doc = "*This API requires the following crate features to be activated: `TrackEventInit`*"]
12 pub type TrackEventInit;
13 #[doc = "Get the `bubbles` field of this object."]
14 #[doc = ""]
15 #[doc = "*This API requires the following crate features to be activated: `TrackEventInit`*"]
16 #[wasm_bindgen(method, getter = "bubbles")]
17 pub fn get_bubbles(this: &TrackEventInit) -> Option<bool>;
18 #[doc = "Change the `bubbles` field of this object."]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `TrackEventInit`*"]
21 #[wasm_bindgen(method, setter = "bubbles")]
22 pub fn set_bubbles(this: &TrackEventInit, val: bool);
23 #[doc = "Get the `cancelable` field of this object."]
24 #[doc = ""]
25 #[doc = "*This API requires the following crate features to be activated: `TrackEventInit`*"]
26 #[wasm_bindgen(method, getter = "cancelable")]
27 pub fn get_cancelable(this: &TrackEventInit) -> Option<bool>;
28 #[doc = "Change the `cancelable` field of this object."]
29 #[doc = ""]
30 #[doc = "*This API requires the following crate features to be activated: `TrackEventInit`*"]
31 #[wasm_bindgen(method, setter = "cancelable")]
32 pub fn set_cancelable(this: &TrackEventInit, val: bool);
33 #[doc = "Get the `composed` field of this object."]
34 #[doc = ""]
35 #[doc = "*This API requires the following crate features to be activated: `TrackEventInit`*"]
36 #[wasm_bindgen(method, getter = "composed")]
37 pub fn get_composed(this: &TrackEventInit) -> Option<bool>;
38 #[doc = "Change the `composed` field of this object."]
39 #[doc = ""]
40 #[doc = "*This API requires the following crate features to be activated: `TrackEventInit`*"]
41 #[wasm_bindgen(method, setter = "composed")]
42 pub fn set_composed(this: &TrackEventInit, val: bool);
43 #[doc = "Get the `track` field of this object."]
44 #[doc = ""]
45 #[doc = "*This API requires the following crate features to be activated: `TrackEventInit`*"]
46 #[wasm_bindgen(method, getter = "track")]
47 pub fn get_track(this: &TrackEventInit) -> Option<::js_sys::Object>;
48 #[doc = "Change the `track` field of this object."]
49 #[doc = ""]
50 #[doc = "*This API requires the following crate features to be activated: `TrackEventInit`*"]
51 #[wasm_bindgen(method, setter = "track")]
52 pub fn set_track(this: &TrackEventInit, val: Option<&::js_sys::Object>);
53 #[cfg(feature = "VideoTrack")]
54 #[doc = "Change the `track` field of this object."]
55 #[doc = ""]
56 #[doc = "*This API requires the following crate features to be activated: `TrackEventInit`*"]
57 #[wasm_bindgen(method, setter = "track")]
58 pub fn set_track_opt_video_track(this: &TrackEventInit, val: Option<&VideoTrack>);
59 #[cfg(feature = "AudioTrack")]
60 #[doc = "Change the `track` field of this object."]
61 #[doc = ""]
62 #[doc = "*This API requires the following crate features to be activated: `TrackEventInit`*"]
63 #[wasm_bindgen(method, setter = "track")]
64 pub fn set_track_opt_audio_track(this: &TrackEventInit, val: Option<&AudioTrack>);
65 #[cfg(feature = "TextTrack")]
66 #[doc = "Change the `track` field of this object."]
67 #[doc = ""]
68 #[doc = "*This API requires the following crate features to be activated: `TrackEventInit`*"]
69 #[wasm_bindgen(method, setter = "track")]
70 pub fn set_track_opt_text_track(this: &TrackEventInit, val: Option<&TextTrack>);
71}
72impl TrackEventInit {
73 #[doc = "Construct a new `TrackEventInit`."]
74 #[doc = ""]
75 #[doc = "*This API requires the following crate features to be activated: `TrackEventInit`*"]
76 pub fn new() -> Self {
77 #[allow(unused_mut)]
78 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
79 ret
80 }
81 #[deprecated = "Use `set_bubbles()` instead."]
82 pub fn bubbles(&mut self, val: bool) -> &mut Self {
83 self.set_bubbles(val);
84 self
85 }
86 #[deprecated = "Use `set_cancelable()` instead."]
87 pub fn cancelable(&mut self, val: bool) -> &mut Self {
88 self.set_cancelable(val);
89 self
90 }
91 #[deprecated = "Use `set_composed()` instead."]
92 pub fn composed(&mut self, val: bool) -> &mut Self {
93 self.set_composed(val);
94 self
95 }
96 #[deprecated = "Use `set_track()` instead."]
97 pub fn track(&mut self, val: Option<&::js_sys::Object>) -> &mut Self {
98 self.set_track(val);
99 self
100 }
101}
102impl Default for TrackEventInit {
103 fn default() -> Self {
104 Self::new()
105 }
106}