WebCapability class abstract final

Static helpers that probe the current browser environment.

All getters are synchronous and safe to call at any time (they do not throw even in a non-browser or restricted context).

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Properties

hasAudioDecoder → bool
True when the WebCodecs AudioDecoder API is present.
no setter
hasAudioEncoder → bool
True when the WebCodecs AudioEncoder API is present.
no setter
hasMediaRecorder → bool
True when the MediaRecorder API is present (universal baseline fallback).
no setter
hasOffscreenCanvas → bool
True when OffscreenCanvas is available (needed for CPU→VideoFrame conversion).
no setter
hasVideoDecoder → bool
True when the WebCodecs VideoDecoder API is present.
no setter
hasVideoEncoder → bool
True when the WebCodecs VideoEncoder API is present.
no setter
hasWebGPU → bool
True when WebGPU (navigator.gpu) is available.
no setter

Static Methods

isAudioDecoderSupported(String codecString, {int sampleRate = 48000, int channels = 2}) → Future<bool>
Returns true if an AudioDecoder can actually be configured for codecString at sampleRate/channels.
isVideoDecoderSupported(String codecString, {int width = 1280, int height = 720}) → Future<bool>
Returns true if a VideoDecoder can actually be configured for codecString.
isVideoEncoderSupported(String codecString, {int width = 1280, int height = 720}) → Future<bool>
Returns true if a VideoEncoder can be configured with codecString at the given width × height.