Skip to main content

web_sys/features/
gen_MediaStreamTrackGenerator.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(
9        extends = "MediaStreamTrack",
10        extends = "EventTarget",
11        extends = "::js_sys::Object",
12        js_name = "MediaStreamTrackGenerator",
13        typescript_type = "MediaStreamTrackGenerator"
14    )]
15    #[derive(Debug, Clone, PartialEq, Eq)]
16    #[doc = "The `MediaStreamTrackGenerator` class."]
17    #[doc = ""]
18    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamTrackGenerator)"]
19    #[doc = ""]
20    #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrackGenerator`*"]
21    #[doc = ""]
22    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
23    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
24    pub type MediaStreamTrackGenerator;
25    #[cfg(web_sys_unstable_apis)]
26    #[cfg(feature = "WritableStream")]
27    #[wasm_bindgen(
28        method,
29        getter,
30        js_class = "MediaStreamTrackGenerator",
31        js_name = "writable"
32    )]
33    #[doc = "Getter for the `writable` field of this object."]
34    #[doc = ""]
35    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamTrackGenerator/writable)"]
36    #[doc = ""]
37    #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrackGenerator`, `WritableStream`*"]
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://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
41    pub fn writable(this: &MediaStreamTrackGenerator) -> WritableStream;
42    #[cfg(web_sys_unstable_apis)]
43    #[cfg(feature = "WritableStream")]
44    #[wasm_bindgen(
45        method,
46        setter,
47        js_class = "MediaStreamTrackGenerator",
48        js_name = "writable"
49    )]
50    #[doc = "Setter for the `writable` field of this object."]
51    #[doc = ""]
52    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamTrackGenerator/writable)"]
53    #[doc = ""]
54    #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrackGenerator`, `WritableStream`*"]
55    #[doc = ""]
56    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
57    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
58    pub fn set_writable(this: &MediaStreamTrackGenerator, value: &WritableStream);
59    #[cfg(web_sys_unstable_apis)]
60    #[cfg(feature = "MediaStreamTrackGeneratorInit")]
61    #[wasm_bindgen(catch, constructor, js_class = "MediaStreamTrackGenerator")]
62    #[doc = "The `new MediaStreamTrackGenerator(..)` constructor, creating a new instance of `MediaStreamTrackGenerator`."]
63    #[doc = ""]
64    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamTrackGenerator/MediaStreamTrackGenerator)"]
65    #[doc = ""]
66    #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrackGenerator`, `MediaStreamTrackGeneratorInit`*"]
67    #[doc = ""]
68    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
69    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
70    pub fn new(init: &MediaStreamTrackGeneratorInit) -> Result<MediaStreamTrackGenerator, JsValue>;
71}