maxcountryman_web_sys/features/
gen_TextTrack.rs1#![allow(unused_imports)]
2use super::*;
3use wasm_bindgen::prelude::*;
4#[wasm_bindgen]
5extern "C" {
6 # [wasm_bindgen (extends = EventTarget , extends = :: js_sys :: Object , js_name = TextTrack , typescript_type = "TextTrack")]
7 #[derive(Debug, Clone, PartialEq, Eq)]
8 #[doc = "The `TextTrack` class."]
9 #[doc = ""]
10 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TextTrack)"]
11 #[doc = ""]
12 #[doc = "*This API requires the following crate features to be activated: `TextTrack`*"]
13 pub type TextTrack;
14 #[cfg(feature = "TextTrackKind")]
15 # [wasm_bindgen (structural , method , getter , js_class = "TextTrack" , js_name = kind)]
16 #[doc = "Getter for the `kind` field of this object."]
17 #[doc = ""]
18 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TextTrack/kind)"]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `TextTrack`, `TextTrackKind`*"]
21 pub fn kind(this: &TextTrack) -> TextTrackKind;
22 # [wasm_bindgen (structural , method , getter , js_class = "TextTrack" , js_name = label)]
23 #[doc = "Getter for the `label` field of this object."]
24 #[doc = ""]
25 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TextTrack/label)"]
26 #[doc = ""]
27 #[doc = "*This API requires the following crate features to be activated: `TextTrack`*"]
28 pub fn label(this: &TextTrack) -> String;
29 # [wasm_bindgen (structural , method , getter , js_class = "TextTrack" , js_name = language)]
30 #[doc = "Getter for the `language` field of this object."]
31 #[doc = ""]
32 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TextTrack/language)"]
33 #[doc = ""]
34 #[doc = "*This API requires the following crate features to be activated: `TextTrack`*"]
35 pub fn language(this: &TextTrack) -> String;
36 # [wasm_bindgen (structural , method , getter , js_class = "TextTrack" , js_name = id)]
37 #[doc = "Getter for the `id` field of this object."]
38 #[doc = ""]
39 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TextTrack/id)"]
40 #[doc = ""]
41 #[doc = "*This API requires the following crate features to be activated: `TextTrack`*"]
42 pub fn id(this: &TextTrack) -> String;
43 # [wasm_bindgen (structural , method , getter , js_class = "TextTrack" , js_name = inBandMetadataTrackDispatchType)]
44 #[doc = "Getter for the `inBandMetadataTrackDispatchType` field of this object."]
45 #[doc = ""]
46 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TextTrack/inBandMetadataTrackDispatchType)"]
47 #[doc = ""]
48 #[doc = "*This API requires the following crate features to be activated: `TextTrack`*"]
49 pub fn in_band_metadata_track_dispatch_type(this: &TextTrack) -> String;
50 #[cfg(feature = "TextTrackMode")]
51 # [wasm_bindgen (structural , method , getter , js_class = "TextTrack" , js_name = mode)]
52 #[doc = "Getter for the `mode` field of this object."]
53 #[doc = ""]
54 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TextTrack/mode)"]
55 #[doc = ""]
56 #[doc = "*This API requires the following crate features to be activated: `TextTrack`, `TextTrackMode`*"]
57 pub fn mode(this: &TextTrack) -> TextTrackMode;
58 #[cfg(feature = "TextTrackMode")]
59 # [wasm_bindgen (structural , method , setter , js_class = "TextTrack" , js_name = mode)]
60 #[doc = "Setter for the `mode` field of this object."]
61 #[doc = ""]
62 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TextTrack/mode)"]
63 #[doc = ""]
64 #[doc = "*This API requires the following crate features to be activated: `TextTrack`, `TextTrackMode`*"]
65 pub fn set_mode(this: &TextTrack, value: TextTrackMode);
66 #[cfg(feature = "TextTrackCueList")]
67 # [wasm_bindgen (structural , method , getter , js_class = "TextTrack" , js_name = cues)]
68 #[doc = "Getter for the `cues` field of this object."]
69 #[doc = ""]
70 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TextTrack/cues)"]
71 #[doc = ""]
72 #[doc = "*This API requires the following crate features to be activated: `TextTrack`, `TextTrackCueList`*"]
73 pub fn cues(this: &TextTrack) -> Option<TextTrackCueList>;
74 #[cfg(feature = "TextTrackCueList")]
75 # [wasm_bindgen (structural , method , getter , js_class = "TextTrack" , js_name = activeCues)]
76 #[doc = "Getter for the `activeCues` field of this object."]
77 #[doc = ""]
78 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TextTrack/activeCues)"]
79 #[doc = ""]
80 #[doc = "*This API requires the following crate features to be activated: `TextTrack`, `TextTrackCueList`*"]
81 pub fn active_cues(this: &TextTrack) -> Option<TextTrackCueList>;
82 # [wasm_bindgen (structural , method , getter , js_class = "TextTrack" , js_name = oncuechange)]
83 #[doc = "Getter for the `oncuechange` field of this object."]
84 #[doc = ""]
85 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TextTrack/oncuechange)"]
86 #[doc = ""]
87 #[doc = "*This API requires the following crate features to be activated: `TextTrack`*"]
88 pub fn oncuechange(this: &TextTrack) -> Option<::js_sys::Function>;
89 # [wasm_bindgen (structural , method , setter , js_class = "TextTrack" , js_name = oncuechange)]
90 #[doc = "Setter for the `oncuechange` field of this object."]
91 #[doc = ""]
92 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TextTrack/oncuechange)"]
93 #[doc = ""]
94 #[doc = "*This API requires the following crate features to be activated: `TextTrack`*"]
95 pub fn set_oncuechange(this: &TextTrack, value: Option<&::js_sys::Function>);
96 #[cfg(feature = "VttCue")]
97 # [wasm_bindgen (method , structural , js_class = "TextTrack" , js_name = addCue)]
98 #[doc = "The `addCue()` method."]
99 #[doc = ""]
100 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TextTrack/addCue)"]
101 #[doc = ""]
102 #[doc = "*This API requires the following crate features to be activated: `TextTrack`, `VttCue`*"]
103 pub fn add_cue(this: &TextTrack, cue: &VttCue);
104 #[cfg(feature = "VttCue")]
105 # [wasm_bindgen (catch , method , structural , js_class = "TextTrack" , js_name = removeCue)]
106 #[doc = "The `removeCue()` method."]
107 #[doc = ""]
108 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TextTrack/removeCue)"]
109 #[doc = ""]
110 #[doc = "*This API requires the following crate features to be activated: `TextTrack`, `VttCue`*"]
111 pub fn remove_cue(this: &TextTrack, cue: &VttCue) -> Result<(), JsValue>;
112}