getUserMedia约束仅影响从浏览器请求到硬件并作为流返回的媒体. getUserMedia约束对之后的流已经做了什么影响(即,当通过连接流式传输时).你看到的恶化是在PeerConnection层,而不是在getUserMedia层.硬件和带宽统计数据表示低性能,并由双方进行协商,由webrtc实现引发降级.
[Hardware] [javascript client] [another client]
您必须挖掘源代码以获得文档的证据以及在每个实现中如何完成的证据,但是引用了行为:
The good news is that the WebRTC audio and video engines work together with the underlying network transport to probe the available bandwidth and optimize delivery of the media streams. However, DataChannel transfers require additional application logic: the application must monitor the amount of buffered data and be ready to adjust as needed.
…
WebRTC audio and video engines will dynamically adjust the bitrate of the media streams to match the conditions of the network link between the peers. The application can set and update the media constraints (e.g., video resolution, framerate, and so on), and the engines do the rest—this part is easy.