|
1 | 1 | #![allow(unused_imports)]
|
2 | 2 | use super::*;
|
3 | 3 | use wasm_bindgen::prelude::*;
|
| 4 | +#[cfg(web_sys_unstable_apis)] |
4 | 5 | #[wasm_bindgen]
|
5 | 6 | extern "C" {
|
6 |
| - # [wasm_bindgen (extends = EventTarget , extends = :: js_sys :: Object , js_name = ImageCapture , typescript_type = "ImageCapture")] |
| 7 | + # [wasm_bindgen (extends = :: js_sys :: Object , js_name = ImageCapture , typescript_type = "ImageCapture")] |
7 | 8 | #[derive(Debug, Clone, PartialEq, Eq)]
|
8 | 9 | #[doc = "The `ImageCapture` class."]
|
9 | 10 | #[doc = ""]
|
10 | 11 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ImageCapture)"]
|
11 | 12 | #[doc = ""]
|
12 | 13 | #[doc = "*This API requires the following crate features to be activated: `ImageCapture`*"]
|
| 14 | + #[doc = ""] |
| 15 | + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] |
| 16 | + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] |
13 | 17 | pub type ImageCapture;
|
14 |
| - #[cfg(feature = "VideoStreamTrack")] |
15 |
| - # [wasm_bindgen (structural , method , getter , js_class = "ImageCapture" , js_name = videoStreamTrack)] |
16 |
| - #[doc = "Getter for the `videoStreamTrack` field of this object."] |
| 18 | + #[cfg(web_sys_unstable_apis)] |
| 19 | + #[cfg(feature = "MediaStreamTrack")] |
| 20 | + # [wasm_bindgen (structural , method , getter , js_class = "ImageCapture" , js_name = track)] |
| 21 | + #[doc = "Getter for the `track` field of this object."] |
17 | 22 | #[doc = ""]
|
18 |
| - #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ImageCapture/videoStreamTrack)"] |
| 23 | + #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ImageCapture/track)"] |
19 | 24 | #[doc = ""]
|
20 |
| - #[doc = "*This API requires the following crate features to be activated: `ImageCapture`, `VideoStreamTrack`*"] |
21 |
| - pub fn video_stream_track(this: &ImageCapture) -> VideoStreamTrack; |
22 |
| - # [wasm_bindgen (structural , method , getter , js_class = "ImageCapture" , js_name = onphoto)] |
23 |
| - #[doc = "Getter for the `onphoto` field of this object."] |
| 25 | + #[doc = "*This API requires the following crate features to be activated: `ImageCapture`, `MediaStreamTrack`*"] |
24 | 26 | #[doc = ""]
|
25 |
| - #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ImageCapture/onphoto)"] |
| 27 | + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] |
| 28 | + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] |
| 29 | + pub fn track(this: &ImageCapture) -> MediaStreamTrack; |
| 30 | + #[cfg(web_sys_unstable_apis)] |
| 31 | + #[cfg(feature = "MediaStreamTrack")] |
| 32 | + #[wasm_bindgen(catch, constructor, js_class = "ImageCapture")] |
| 33 | + #[doc = "The `new ImageCapture(..)` constructor, creating a new instance of `ImageCapture`."] |
26 | 34 | #[doc = ""]
|
27 |
| - #[doc = "*This API requires the following crate features to be activated: `ImageCapture`*"] |
28 |
| - pub fn onphoto(this: &ImageCapture) -> Option<::js_sys::Function>; |
29 |
| - # [wasm_bindgen (structural , method , setter , js_class = "ImageCapture" , js_name = onphoto)] |
30 |
| - #[doc = "Setter for the `onphoto` field of this object."] |
| 35 | + #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ImageCapture/ImageCapture)"] |
31 | 36 | #[doc = ""]
|
32 |
| - #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ImageCapture/onphoto)"] |
| 37 | + #[doc = "*This API requires the following crate features to be activated: `ImageCapture`, `MediaStreamTrack`*"] |
33 | 38 | #[doc = ""]
|
34 |
| - #[doc = "*This API requires the following crate features to be activated: `ImageCapture`*"] |
35 |
| - pub fn set_onphoto(this: &ImageCapture, value: Option<&::js_sys::Function>); |
36 |
| - # [wasm_bindgen (structural , method , getter , js_class = "ImageCapture" , js_name = onerror)] |
37 |
| - #[doc = "Getter for the `onerror` field of this object."] |
| 39 | + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] |
| 40 | + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] |
| 41 | + pub fn new(video_track: &MediaStreamTrack) -> Result<ImageCapture, JsValue>; |
| 42 | + #[cfg(web_sys_unstable_apis)] |
| 43 | + # [wasm_bindgen (method , structural , js_class = "ImageCapture" , js_name = getPhotoCapabilities)] |
| 44 | + #[doc = "The `getPhotoCapabilities()` method."] |
38 | 45 | #[doc = ""]
|
39 |
| - #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ImageCapture/onerror)"] |
| 46 | + #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ImageCapture/getPhotoCapabilities)"] |
40 | 47 | #[doc = ""]
|
41 | 48 | #[doc = "*This API requires the following crate features to be activated: `ImageCapture`*"]
|
42 |
| - pub fn onerror(this: &ImageCapture) -> Option<::js_sys::Function>; |
43 |
| - # [wasm_bindgen (structural , method , setter , js_class = "ImageCapture" , js_name = onerror)] |
44 |
| - #[doc = "Setter for the `onerror` field of this object."] |
45 | 49 | #[doc = ""]
|
46 |
| - #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ImageCapture/onerror)"] |
| 50 | + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] |
| 51 | + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] |
| 52 | + pub fn get_photo_capabilities(this: &ImageCapture) -> ::js_sys::Promise; |
| 53 | + #[cfg(web_sys_unstable_apis)] |
| 54 | + # [wasm_bindgen (method , structural , js_class = "ImageCapture" , js_name = getPhotoSettings)] |
| 55 | + #[doc = "The `getPhotoSettings()` method."] |
| 56 | + #[doc = ""] |
| 57 | + #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ImageCapture/getPhotoSettings)"] |
47 | 58 | #[doc = ""]
|
48 | 59 | #[doc = "*This API requires the following crate features to be activated: `ImageCapture`*"]
|
49 |
| - pub fn set_onerror(this: &ImageCapture, value: Option<&::js_sys::Function>); |
50 |
| - #[cfg(feature = "VideoStreamTrack")] |
51 |
| - #[wasm_bindgen(catch, constructor, js_class = "ImageCapture")] |
52 |
| - #[doc = "The `new ImageCapture(..)` constructor, creating a new instance of `ImageCapture`."] |
53 | 60 | #[doc = ""]
|
54 |
| - #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ImageCapture/ImageCapture)"] |
| 61 | + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] |
| 62 | + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] |
| 63 | + pub fn get_photo_settings(this: &ImageCapture) -> ::js_sys::Promise; |
| 64 | + #[cfg(web_sys_unstable_apis)] |
| 65 | + # [wasm_bindgen (method , structural , js_class = "ImageCapture" , js_name = grabFrame)] |
| 66 | + #[doc = "The `grabFrame()` method."] |
| 67 | + #[doc = ""] |
| 68 | + #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ImageCapture/grabFrame)"] |
55 | 69 | #[doc = ""]
|
56 |
| - #[doc = "*This API requires the following crate features to be activated: `ImageCapture`, `VideoStreamTrack`*"] |
57 |
| - pub fn new(track: &VideoStreamTrack) -> Result<ImageCapture, JsValue>; |
58 |
| - # [wasm_bindgen (catch , method , structural , js_class = "ImageCapture" , js_name = takePhoto)] |
| 70 | + #[doc = "*This API requires the following crate features to be activated: `ImageCapture`*"] |
| 71 | + #[doc = ""] |
| 72 | + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] |
| 73 | + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] |
| 74 | + pub fn grab_frame(this: &ImageCapture) -> ::js_sys::Promise; |
| 75 | + #[cfg(web_sys_unstable_apis)] |
| 76 | + # [wasm_bindgen (method , structural , js_class = "ImageCapture" , js_name = takePhoto)] |
59 | 77 | #[doc = "The `takePhoto()` method."]
|
60 | 78 | #[doc = ""]
|
61 | 79 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ImageCapture/takePhoto)"]
|
62 | 80 | #[doc = ""]
|
63 | 81 | #[doc = "*This API requires the following crate features to be activated: `ImageCapture`*"]
|
64 |
| - pub fn take_photo(this: &ImageCapture) -> Result<(), JsValue>; |
| 82 | + #[doc = ""] |
| 83 | + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] |
| 84 | + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] |
| 85 | + pub fn take_photo(this: &ImageCapture) -> ::js_sys::Promise; |
65 | 86 | }
|
0 commit comments