Package-level declarations

Types

Link copied to clipboard
sealed interface AlphaOption
Link copied to clipboard

The AudioData interface of the WebCodecs API represents an audio sample.

Link copied to clipboard
Link copied to clipboard
interface AudioDataInit
Link copied to clipboard
typealias AudioDataOutputCallback = (output: AudioData) -> Unit
Link copied to clipboard

The AudioDecoder interface of the WebCodecs API decodes chunks of audio. Available only in secure contexts.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The AudioEncoder interface of the WebCodecs API encodes AudioData objects. Available only in secure contexts.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
sealed interface AudioSampleFormat
Link copied to clipboard
sealed interface AvcBitstreamFormat
Link copied to clipboard
Link copied to clipboard
sealed interface BitrateMode
Link copied to clipboard
sealed interface CodecState
Link copied to clipboard

The EncodedAudioChunk interface of the WebCodecs API represents a chunk of encoded audio data.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
sealed interface EncodedAudioChunkType
Link copied to clipboard

The EncodedVideoChunk interface of the WebCodecs API represents a chunk of encoded video data.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
sealed interface EncodedVideoChunkType
Link copied to clipboard
sealed interface HardwareAcceleration
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open class ImageDecoder(init: ImageDecoderInit)

The ImageDecoder interface of the WebCodecs API provides a way to unpack and decode encoded image data. Available only in secure contexts.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The ImageTrack interface of the WebCodecs API represents an individual image track.

Link copied to clipboard

The ImageTrackList interface of the WebCodecs API represents a list of image tracks.

Link copied to clipboard
sealed interface LatencyMode
Link copied to clipboard
sealed interface OpusBitstreamFormat
Link copied to clipboard
Link copied to clipboard
interface PlaneLayout
Link copied to clipboard
sealed interface VideoColorPrimaries
Link copied to clipboard
open class VideoColorSpace(init: VideoColorSpaceInit = definedExternally)

The VideoColorSpace interface of the WebCodecs API represents the color space of a video.

Link copied to clipboard
Link copied to clipboard

The VideoDecoder interface of the WebCodecs API decodes chunks of video. Available only in secure contexts.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The VideoEncoder interface of the WebCodecs API encodes VideoFrame objects into EncodedVideoChunks. Available only in secure contexts.

Link copied to clipboard
sealed interface VideoEncoderBitrateMode
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The VideoFrame interface of the Web Codecs API represents a frame of a video.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
interface VideoFrameInit
Link copied to clipboard
typealias VideoFrameOutputCallback = (output: VideoFrame) -> Unit
Link copied to clipboard
sealed interface VideoMatrixCoefficients
Link copied to clipboard
sealed interface VideoPixelFormat
Link copied to clipboard
Link copied to clipboard
typealias WebCodecsErrorCallback = (error: DOMException) -> Unit

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard

The copyTo() method of the VideoFrame interface copies the contents of the VideoFrame to an ArrayBuffer.

Link copied to clipboard
inline suspend fun ImageDecoder.decode(): ImageDecodeResult

The decode() method of the ImageDecoder interface enqueues a control message to decode the frame of an image.

Link copied to clipboard
inline suspend fun AudioDecoder.flush()

The flush() method of the AudioDecoder interface returns a Promise that resolves once all pending messages in the queue have been completed.

inline suspend fun AudioEncoder.flush()

The flush() method of the AudioEncoder interface returns a Promise that resolves once all pending messages in the queue have been completed.

inline suspend fun VideoDecoder.flush()

The flush() method of the VideoDecoder interface returns a Promise that resolves once all pending messages in the queue have been completed.

inline suspend fun VideoEncoder.flush()

The flush() method of the VideoEncoder interface forces all pending encodes to complete.

Link copied to clipboard

The isConfigSupported() static method of the AudioDecoder interface checks if the given config is supported (that is, if AudioDecoder objects can be successfully configured with the given config).

The isConfigSupported() static method of the AudioEncoder interface checks if the given config is supported (that is, if AudioEncoder objects can be successfully configured with the given config).

The isConfigSupported() static method of the VideoDecoder interface checks if the given config is supported (that is, if VideoDecoder objects can be successfully configured with the given config).

The isConfigSupported() static method of the VideoEncoder interface checks if VideoEncoder can be successfully configured with the given config.

Link copied to clipboard

The ImageDecoder.isTypeSupported() static method checks if a given MIME type can be decoded by the user agent.