web_sys/features/
gen_ImageCapture.rs

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