1. Web
  2. Web APIs
  3. Navigator
  4. mediaCapabilities

Navigator: mediaCapabilities property

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since ⁨January 2020⁩.

The mediaCapabilities read-only property of the Navigator interface references a MediaCapabilities object that can expose information about the decoding and encoding capabilities for a given media format and output capabilities.

Value

A MediaCapabilities object.

Examples

js
navigator.mediaCapabilities
 .decodingInfo({
 type: "file",
 audio: {
 contentType: "audio/mp3",
 channels: 2,
 bitrate: 132700,
 samplerate: 5200,
 },
 })
 .then((result) => {
 console.log(
 `This configuration is ${result.supported ? "" : "not "}supported,`,
 );
 console.log(`${result.smooth ? "" : "not "}smooth, and`);
 console.log(`${result.powerEfficient ? "" : "not "}power efficient.`);
 });

Specifications

Specification
Media Capabilities
# dom-navigator-mediacapabilities

Browser compatibility

See also

Help improve MDN

Learn how to contribute

This page was last modified on by MDN contributors.

AltStyle によって変換されたページ (->オリジナル) /