且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

WebRTC视频约束不起作用

更新时间:2023-09-21 22:48:58

Firefox中有许多错误正在处理中,因为它不支持可编程的视频帧速率和分辨率更改.

There are numerous bugs that are being handled in Firefox for it not supporting programable video framerate and resolution changes.

  • Allowing the framerate to be changed in the media constraints
  • Support runtime change of video resolution
  • Support plain numbers for the video resolution in the media constraints

您应该可以通过以下方式设置约束:

You are supposedly able to set the constraints this way:

mediaConstraints = {
      "audio": true,
      "video": {
         width: {
             min: 320,
              max: 320
          },
          height: {
             min: 240,
              max: 240
          } }
    };

但是我一直无法获得视频分辨率限制,因此无法通过媒体限制使其在Firefox中正常工作.在firefox中更改about:config中的默认分辨率时,我获得的成功有限.

But I have never been able to get video resolution constraints to work it to work in Firefox through media constraints. I have had limited success with changing the default resolution in about:config in firefox.

这些问题是众所周知的,我相信许多人正在努力解决这些问题.

These issues are known and I believe that numerous people are working on them to get them resolved.