// Copyright 2020 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // https://github.com/WICG/web-codecs enum VideoEncoderBitrateMode { "constant", "variable", "quantizer" }; // NOTE: Keep this structure in sync with CopyConfig() defined in // video_encoder.cc. dictionary VideoEncoderConfig { required DOMString codec; HardwarePreference hardwareAcceleration = "no-preference"; AlphaOption alpha = "discard"; [EnforceRange] unsigned long long bitrate; VideoEncoderBitrateMode bitrateMode = "variable"; double framerate; required [EnforceRange] unsigned long width; required [EnforceRange] unsigned long height; // Hint about the pixel aspect ratio of the content. [EnforceRange] unsigned long displayWidth; [EnforceRange] unsigned long displayHeight; AvcEncoderConfig avc; HevcEncoderConfig hevc; // Same as in WebRTC SVC (https://w3c.github.io/webrtc-svc/) DOMString scalabilityMode; LatencyMode latencyMode = "quality"; // MediaStreamTrack Content Hints (https://www.w3.org/TR/mst-content-hint/) DOMString contentHint = ""; };