web_sys/features/
gen_HtmlVideoElement.rs1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7 #[wasm_bindgen(
8 extends = "HtmlMediaElement",
9 extends = "HtmlElement",
10 extends = "Element",
11 extends = "Node",
12 extends = "EventTarget",
13 extends = "::js_sys::Object",
14 js_name = "HTMLVideoElement",
15 typescript_type = "HTMLVideoElement"
16 )]
17 #[derive(Debug, Clone, PartialEq, Eq)]
18 #[doc = "The `HtmlVideoElement` class."]
19 #[doc = ""]
20 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLVideoElement)"]
21 #[doc = ""]
22 #[doc = "*This API requires the following crate features to be activated: `HtmlVideoElement`*"]
23 pub type HtmlVideoElement;
24 #[wasm_bindgen(method, getter, js_class = "HTMLVideoElement", js_name = "width")]
25 #[doc = "Getter for the `width` field of this object."]
26 #[doc = ""]
27 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLVideoElement/width)"]
28 #[doc = ""]
29 #[doc = "*This API requires the following crate features to be activated: `HtmlVideoElement`*"]
30 pub fn width(this: &HtmlVideoElement) -> u32;
31 #[wasm_bindgen(method, setter, js_class = "HTMLVideoElement", js_name = "width")]
32 #[doc = "Setter for the `width` field of this object."]
33 #[doc = ""]
34 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLVideoElement/width)"]
35 #[doc = ""]
36 #[doc = "*This API requires the following crate features to be activated: `HtmlVideoElement`*"]
37 pub fn set_width(this: &HtmlVideoElement, value: u32);
38 #[wasm_bindgen(method, getter, js_class = "HTMLVideoElement", js_name = "height")]
39 #[doc = "Getter for the `height` field of this object."]
40 #[doc = ""]
41 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLVideoElement/height)"]
42 #[doc = ""]
43 #[doc = "*This API requires the following crate features to be activated: `HtmlVideoElement`*"]
44 pub fn height(this: &HtmlVideoElement) -> u32;
45 #[wasm_bindgen(method, setter, js_class = "HTMLVideoElement", js_name = "height")]
46 #[doc = "Setter for the `height` field of this object."]
47 #[doc = ""]
48 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLVideoElement/height)"]
49 #[doc = ""]
50 #[doc = "*This API requires the following crate features to be activated: `HtmlVideoElement`*"]
51 pub fn set_height(this: &HtmlVideoElement, value: u32);
52 #[wasm_bindgen(method, getter, js_class = "HTMLVideoElement", js_name = "videoWidth")]
53 #[doc = "Getter for the `videoWidth` field of this object."]
54 #[doc = ""]
55 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLVideoElement/videoWidth)"]
56 #[doc = ""]
57 #[doc = "*This API requires the following crate features to be activated: `HtmlVideoElement`*"]
58 pub fn video_width(this: &HtmlVideoElement) -> u32;
59 #[wasm_bindgen(method, getter, js_class = "HTMLVideoElement", js_name = "videoHeight")]
60 #[doc = "Getter for the `videoHeight` field of this object."]
61 #[doc = ""]
62 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLVideoElement/videoHeight)"]
63 #[doc = ""]
64 #[doc = "*This API requires the following crate features to be activated: `HtmlVideoElement`*"]
65 pub fn video_height(this: &HtmlVideoElement) -> u32;
66 #[wasm_bindgen(method, getter, js_class = "HTMLVideoElement", js_name = "poster")]
67 #[doc = "Getter for the `poster` field of this object."]
68 #[doc = ""]
69 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLVideoElement/poster)"]
70 #[doc = ""]
71 #[doc = "*This API requires the following crate features to be activated: `HtmlVideoElement`*"]
72 pub fn poster(this: &HtmlVideoElement) -> ::alloc::string::String;
73 #[wasm_bindgen(method, setter, js_class = "HTMLVideoElement", js_name = "poster")]
74 #[doc = "Setter for the `poster` field of this object."]
75 #[doc = ""]
76 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLVideoElement/poster)"]
77 #[doc = ""]
78 #[doc = "*This API requires the following crate features to be activated: `HtmlVideoElement`*"]
79 pub fn set_poster(this: &HtmlVideoElement, value: &str);
80 #[cfg(web_sys_unstable_apis)]
81 #[wasm_bindgen(
82 method,
83 getter,
84 js_class = "HTMLVideoElement",
85 js_name = "onenterpictureinpicture"
86 )]
87 #[doc = "Getter for the `onenterpictureinpicture` field of this object."]
88 #[doc = ""]
89 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLVideoElement/onenterpictureinpicture)"]
90 #[doc = ""]
91 #[doc = "*This API requires the following crate features to be activated: `HtmlVideoElement`*"]
92 #[doc = ""]
93 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
94 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
95 pub fn onenterpictureinpicture(this: &HtmlVideoElement) -> Option<::js_sys::Function>;
96 #[cfg(web_sys_unstable_apis)]
97 #[wasm_bindgen(
98 method,
99 setter,
100 js_class = "HTMLVideoElement",
101 js_name = "onenterpictureinpicture"
102 )]
103 #[doc = "Setter for the `onenterpictureinpicture` field of this object."]
104 #[doc = ""]
105 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLVideoElement/onenterpictureinpicture)"]
106 #[doc = ""]
107 #[doc = "*This API requires the following crate features to be activated: `HtmlVideoElement`*"]
108 #[doc = ""]
109 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
110 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
111 pub fn set_onenterpictureinpicture(this: &HtmlVideoElement, value: Option<&::js_sys::Function>);
112 #[cfg(web_sys_unstable_apis)]
113 #[wasm_bindgen(
114 method,
115 getter,
116 js_class = "HTMLVideoElement",
117 js_name = "onleavepictureinpicture"
118 )]
119 #[doc = "Getter for the `onleavepictureinpicture` field of this object."]
120 #[doc = ""]
121 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLVideoElement/onleavepictureinpicture)"]
122 #[doc = ""]
123 #[doc = "*This API requires the following crate features to be activated: `HtmlVideoElement`*"]
124 #[doc = ""]
125 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
126 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
127 pub fn onleavepictureinpicture(this: &HtmlVideoElement) -> Option<::js_sys::Function>;
128 #[cfg(web_sys_unstable_apis)]
129 #[wasm_bindgen(
130 method,
131 setter,
132 js_class = "HTMLVideoElement",
133 js_name = "onleavepictureinpicture"
134 )]
135 #[doc = "Setter for the `onleavepictureinpicture` field of this object."]
136 #[doc = ""]
137 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLVideoElement/onleavepictureinpicture)"]
138 #[doc = ""]
139 #[doc = "*This API requires the following crate features to be activated: `HtmlVideoElement`*"]
140 #[doc = ""]
141 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
142 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
143 pub fn set_onleavepictureinpicture(this: &HtmlVideoElement, value: Option<&::js_sys::Function>);
144 #[cfg(web_sys_unstable_apis)]
145 #[wasm_bindgen(
146 method,
147 getter,
148 js_class = "HTMLVideoElement",
149 js_name = "disablePictureInPicture"
150 )]
151 #[doc = "Getter for the `disablePictureInPicture` field of this object."]
152 #[doc = ""]
153 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLVideoElement/disablePictureInPicture)"]
154 #[doc = ""]
155 #[doc = "*This API requires the following crate features to be activated: `HtmlVideoElement`*"]
156 #[doc = ""]
157 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
158 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
159 pub fn disable_picture_in_picture(this: &HtmlVideoElement) -> bool;
160 #[cfg(web_sys_unstable_apis)]
161 #[wasm_bindgen(
162 method,
163 setter,
164 js_class = "HTMLVideoElement",
165 js_name = "disablePictureInPicture"
166 )]
167 #[doc = "Setter for the `disablePictureInPicture` field of this object."]
168 #[doc = ""]
169 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLVideoElement/disablePictureInPicture)"]
170 #[doc = ""]
171 #[doc = "*This API requires the following crate features to be activated: `HtmlVideoElement`*"]
172 #[doc = ""]
173 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
174 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
175 pub fn set_disable_picture_in_picture(this: &HtmlVideoElement, value: bool);
176 #[cfg(feature = "VideoPlaybackQuality")]
177 #[wasm_bindgen(
178 method,
179 js_class = "HTMLVideoElement",
180 js_name = "getVideoPlaybackQuality"
181 )]
182 #[doc = "The `getVideoPlaybackQuality()` method."]
183 #[doc = ""]
184 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLVideoElement/getVideoPlaybackQuality)"]
185 #[doc = ""]
186 #[doc = "*This API requires the following crate features to be activated: `HtmlVideoElement`, `VideoPlaybackQuality`*"]
187 pub fn get_video_playback_quality(this: &HtmlVideoElement) -> VideoPlaybackQuality;
188 #[cfg(web_sys_unstable_apis)]
189 #[cfg(feature = "PictureInPictureWindow")]
190 #[wasm_bindgen(
191 method,
192 js_class = "HTMLVideoElement",
193 js_name = "requestPictureInPicture"
194 )]
195 #[doc = "The `requestPictureInPicture()` method."]
196 #[doc = ""]
197 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLVideoElement/requestPictureInPicture)"]
198 #[doc = ""]
199 #[doc = "*This API requires the following crate features to be activated: `HtmlVideoElement`, `PictureInPictureWindow`*"]
200 #[doc = ""]
201 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
202 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
203 pub fn request_picture_in_picture(
204 this: &HtmlVideoElement,
205 ) -> ::js_sys::Promise<PictureInPictureWindow>;
206}