-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added WebCodecs API * Added missing files * Added features to cargo.toml * Fixed VideoFrame constructors
- Loading branch information
Showing
54 changed files
with
5,547 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#![allow(unused_imports)] | ||
use wasm_bindgen::prelude::*; | ||
#[cfg(web_sys_unstable_apis)] | ||
#[wasm_bindgen] | ||
#[doc = "The `AlphaOption` enum."] | ||
#[doc = ""] | ||
#[doc = "*This API requires the following crate features to be activated: `AlphaOption`*"] | ||
#[doc = ""] | ||
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] | ||
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] | ||
#[derive(Debug, Clone, Copy, PartialEq, Eq)] | ||
pub enum AlphaOption { | ||
Keep = "keep", | ||
Discard = "discard", | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,151 @@ | ||
#![allow(unused_imports)] | ||
use super::*; | ||
use wasm_bindgen::prelude::*; | ||
#[cfg(web_sys_unstable_apis)] | ||
#[wasm_bindgen] | ||
extern "C" { | ||
# [wasm_bindgen (extends = :: js_sys :: Object , js_name = AudioData , typescript_type = "AudioData")] | ||
#[derive(Debug, Clone, PartialEq, Eq)] | ||
#[doc = "The `AudioData` class."] | ||
#[doc = ""] | ||
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioData)"] | ||
#[doc = ""] | ||
#[doc = "*This API requires the following crate features to be activated: `AudioData`*"] | ||
#[doc = ""] | ||
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] | ||
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] | ||
pub type AudioData; | ||
#[cfg(web_sys_unstable_apis)] | ||
#[cfg(feature = "AudioSampleFormat")] | ||
# [wasm_bindgen (structural , method , getter , js_class = "AudioData" , js_name = format)] | ||
#[doc = "Getter for the `format` field of this object."] | ||
#[doc = ""] | ||
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioData/format)"] | ||
#[doc = ""] | ||
#[doc = "*This API requires the following crate features to be activated: `AudioData`, `AudioSampleFormat`*"] | ||
#[doc = ""] | ||
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] | ||
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] | ||
pub fn format(this: &AudioData) -> Option<AudioSampleFormat>; | ||
#[cfg(web_sys_unstable_apis)] | ||
# [wasm_bindgen (structural , method , getter , js_class = "AudioData" , js_name = sampleRate)] | ||
#[doc = "Getter for the `sampleRate` field of this object."] | ||
#[doc = ""] | ||
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioData/sampleRate)"] | ||
#[doc = ""] | ||
#[doc = "*This API requires the following crate features to be activated: `AudioData`*"] | ||
#[doc = ""] | ||
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] | ||
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] | ||
pub fn sample_rate(this: &AudioData) -> f32; | ||
#[cfg(web_sys_unstable_apis)] | ||
# [wasm_bindgen (structural , method , getter , js_class = "AudioData" , js_name = numberOfFrames)] | ||
#[doc = "Getter for the `numberOfFrames` field of this object."] | ||
#[doc = ""] | ||
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioData/numberOfFrames)"] | ||
#[doc = ""] | ||
#[doc = "*This API requires the following crate features to be activated: `AudioData`*"] | ||
#[doc = ""] | ||
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] | ||
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] | ||
pub fn number_of_frames(this: &AudioData) -> u32; | ||
#[cfg(web_sys_unstable_apis)] | ||
# [wasm_bindgen (structural , method , getter , js_class = "AudioData" , js_name = numberOfChannels)] | ||
#[doc = "Getter for the `numberOfChannels` field of this object."] | ||
#[doc = ""] | ||
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioData/numberOfChannels)"] | ||
#[doc = ""] | ||
#[doc = "*This API requires the following crate features to be activated: `AudioData`*"] | ||
#[doc = ""] | ||
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] | ||
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] | ||
pub fn number_of_channels(this: &AudioData) -> u32; | ||
#[cfg(web_sys_unstable_apis)] | ||
# [wasm_bindgen (structural , method , getter , js_class = "AudioData" , js_name = duration)] | ||
#[doc = "Getter for the `duration` field of this object."] | ||
#[doc = ""] | ||
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioData/duration)"] | ||
#[doc = ""] | ||
#[doc = "*This API requires the following crate features to be activated: `AudioData`*"] | ||
#[doc = ""] | ||
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] | ||
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] | ||
pub fn duration(this: &AudioData) -> f64; | ||
#[cfg(web_sys_unstable_apis)] | ||
# [wasm_bindgen (structural , method , getter , js_class = "AudioData" , js_name = timestamp)] | ||
#[doc = "Getter for the `timestamp` field of this object."] | ||
#[doc = ""] | ||
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioData/timestamp)"] | ||
#[doc = ""] | ||
#[doc = "*This API requires the following crate features to be activated: `AudioData`*"] | ||
#[doc = ""] | ||
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] | ||
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] | ||
pub fn timestamp(this: &AudioData) -> f64; | ||
#[cfg(web_sys_unstable_apis)] | ||
#[cfg(feature = "AudioDataCopyToOptions")] | ||
# [wasm_bindgen (method , structural , js_class = "AudioData" , js_name = allocationSize)] | ||
#[doc = "The `allocationSize()` method."] | ||
#[doc = ""] | ||
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioData/allocationSize)"] | ||
#[doc = ""] | ||
#[doc = "*This API requires the following crate features to be activated: `AudioData`, `AudioDataCopyToOptions`*"] | ||
#[doc = ""] | ||
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] | ||
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] | ||
pub fn allocation_size(this: &AudioData, options: &AudioDataCopyToOptions) -> u32; | ||
#[cfg(web_sys_unstable_apis)] | ||
# [wasm_bindgen (method , structural , js_class = "AudioData" , js_name = clone)] | ||
#[doc = "The `clone()` method."] | ||
#[doc = ""] | ||
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioData/clone)"] | ||
#[doc = ""] | ||
#[doc = "*This API requires the following crate features to be activated: `AudioData`*"] | ||
#[doc = ""] | ||
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] | ||
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] | ||
pub fn clone(this: &AudioData) -> AudioData; | ||
#[cfg(web_sys_unstable_apis)] | ||
# [wasm_bindgen (method , structural , js_class = "AudioData" , js_name = close)] | ||
#[doc = "The `close()` method."] | ||
#[doc = ""] | ||
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioData/close)"] | ||
#[doc = ""] | ||
#[doc = "*This API requires the following crate features to be activated: `AudioData`*"] | ||
#[doc = ""] | ||
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] | ||
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] | ||
pub fn close(this: &AudioData); | ||
#[cfg(web_sys_unstable_apis)] | ||
#[cfg(feature = "AudioDataCopyToOptions")] | ||
# [wasm_bindgen (method , structural , js_class = "AudioData" , js_name = copyTo)] | ||
#[doc = "The `copyTo()` method."] | ||
#[doc = ""] | ||
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioData/copyTo)"] | ||
#[doc = ""] | ||
#[doc = "*This API requires the following crate features to be activated: `AudioData`, `AudioDataCopyToOptions`*"] | ||
#[doc = ""] | ||
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] | ||
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] | ||
pub fn copy_to_with_buffer_source( | ||
this: &AudioData, | ||
destination: &::js_sys::Object, | ||
options: &AudioDataCopyToOptions, | ||
); | ||
#[cfg(web_sys_unstable_apis)] | ||
#[cfg(feature = "AudioDataCopyToOptions")] | ||
# [wasm_bindgen (method , structural , js_class = "AudioData" , js_name = copyTo)] | ||
#[doc = "The `copyTo()` method."] | ||
#[doc = ""] | ||
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioData/copyTo)"] | ||
#[doc = ""] | ||
#[doc = "*This API requires the following crate features to be activated: `AudioData`, `AudioDataCopyToOptions`*"] | ||
#[doc = ""] | ||
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] | ||
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] | ||
pub fn copy_to_with_u8_array( | ||
this: &AudioData, | ||
destination: &mut [u8], | ||
options: &AudioDataCopyToOptions, | ||
); | ||
} |
Oops, something went wrong.