RTCRtpEncodingParameters.scaleResolutionDownBy - Web APIs 编辑

The RTCRtpEncodingParameters dictionary's scaleResolutionDownBy property can be used to specify a factor by which to reduce the size of a video track during encoding.

This property is only available for tracks whose kind is video.

Syntax

rtpEncodingParameters.scaleResolutionDownBy = scalingFactor;

rtpEncodingParameters = {
  scaleResolutionDownBy: scalingFactor
};

Value

A double-precison floating-point number specifying the amount by which to reduce the size of the video during encoding. The default value, 1.0, means that the video will be encoded at its original size. A value of 2.0 would reduce the size of the video by a factor of 2 both horizontally and vertically, resulting in a video 25% the original size.

A value less than 1.0 would cause the video to get larger rather than smaller, which is not the intent of this property. Therefore, specifying a value less than 1.0 is not permitted and will cause a RangeError exception to be thrown by RTCPeerConnection.addTransceiver() or RTCRtpSender.setParameters().

Specifications

SpecificationStatusComment
WebRTC 1.0: Real-time Communication Between Browsers
The definition of 'RTCRtpEncodingParameters.scaleResolutionDownBy' in that specification.
Candidate RecommendationInitial definition.

Browser compatibility

BCD tables only load in the browser

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:76 次

字数:2474

最后编辑:7年前

编辑次数:0 次

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文