maxcountryman_web_sys/features/
gen_ImageCapture.rs

1#![allow(unused_imports)]
2use super::*;
3use wasm_bindgen::prelude::*;
4#[cfg(web_sys_unstable_apis)]
5#[wasm_bindgen]
6extern "C" {
7    # [wasm_bindgen (extends = :: js_sys :: Object , js_name = ImageCapture , typescript_type = "ImageCapture")]
8    #[derive(Debug, Clone, PartialEq, Eq)]
9    #[doc = "The `ImageCapture` class."]
10    #[doc = ""]
11    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ImageCapture)"]
12    #[doc = ""]
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)*"]
17    pub type ImageCapture;
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."]
22    #[doc = ""]
23    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ImageCapture/track)"]
24    #[doc = ""]
25    #[doc = "*This API requires the following crate features to be activated: `ImageCapture`, `MediaStreamTrack`*"]
26    #[doc = ""]
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`."]
34    #[doc = ""]
35    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ImageCapture/ImageCapture)"]
36    #[doc = ""]
37    #[doc = "*This API requires the following crate features to be activated: `ImageCapture`, `MediaStreamTrack`*"]
38    #[doc = ""]
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."]
45    #[doc = ""]
46    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ImageCapture/getPhotoCapabilities)"]
47    #[doc = ""]
48    #[doc = "*This API requires the following crate features to be activated: `ImageCapture`*"]
49    #[doc = ""]
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)"]
58    #[doc = ""]
59    #[doc = "*This API requires the following crate features to be activated: `ImageCapture`*"]
60    #[doc = ""]
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)"]
69    #[doc = ""]
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)]
77    #[doc = "The `takePhoto()` method."]
78    #[doc = ""]
79    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ImageCapture/takePhoto)"]
80    #[doc = ""]
81    #[doc = "*This API requires the following crate features to be activated: `ImageCapture`*"]
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;
86}