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