Source code

Revision control

Copy as Markdown

Other Tools

/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at
* The origin of this IDL file is
* Copyright © 2018 the Contributors to the Media Capabilities Specification
dictionary MediaConfiguration {
VideoConfiguration video;
AudioConfiguration audio;
dictionary MediaDecodingConfiguration : MediaConfiguration {
required MediaDecodingType type;
dictionary MediaEncodingConfiguration : MediaConfiguration {
required MediaEncodingType type;
enum MediaDecodingType {
enum MediaEncodingType {
dictionary VideoConfiguration {
required DOMString contentType;
required unsigned long width;
required unsigned long height;
required unsigned long long bitrate;
required double framerate;
boolean hasAlphaChannel;
HdrMetadataType hdrMetadataType;
ColorGamut colorGamut;
TransferFunction transferFunction;
DOMString scalabilityMode;
enum HdrMetadataType {
enum ColorGamut {
enum TransferFunction {
dictionary AudioConfiguration {
required DOMString contentType;
DOMString channels;
unsigned long long bitrate;
unsigned long samplerate;
[Exposed=(Window, Worker), Func="mozilla::dom::MediaCapabilities::Enabled",
interface MediaCapabilitiesInfo {
readonly attribute boolean supported;
readonly attribute boolean smooth;
readonly attribute boolean powerEfficient;
[Exposed=(Window, Worker), Func="mozilla::dom::MediaCapabilities::Enabled"]
interface MediaCapabilities {
Promise<MediaCapabilitiesInfo> decodingInfo(MediaDecodingConfiguration configuration);
Promise<MediaCapabilitiesInfo> encodingInfo(MediaEncodingConfiguration configuration);