WebRTC的火狐约束 [英] WebRTC firefox constraints
问题描述
getUserMedia()
的约束 var constraints = {
audio:false,
video:{
mandatory:{
minWidth:1280,
minHeight:720
}
}
};
当我在Firefox中测试时,它似乎忽略了这些限制。当我在Chrome或Opera上进行测试时,我的限制工作正常,而且质量很好,任何人都知道为什么?问题是Firefox?
感谢您的建议
Edit 维基链接似乎已过时,请参阅 jib的回答下方。
从Chrome 24和Opera 18开始,已经实现了一些限制条件。这些限制可以用来设置视频分辨率为getUserMedia()和RTCPeerConnection的addStream()调用。
和来自: https://wiki.mozilla.org/Media/getUserMedia
当前固定为640x480视频的捕获分辨率[在Firefox中];
$ b
支持的最小约束:(注意:所有这些布尔值默认为false)
video:true / false
音频:真/假
假:真/假
图:真/假
I currently use WebRTC in my personal development, everything works fine. I get the stream from my webcam, but now I want to use constraints for getUserMedia()
.
var constraints = {
audio: false,
video: {
mandatory : {
minWidth: 1280,
minHeight: 720
}
}
};
When I test this in Firefox it seems to ignore the constraints. When I test on Chrome or Opera my constraints work fine and my quality is good, anyone know why? The problem is Firefox?
Thanks for you suggestions
Edit the wiki link seems to be outdated, please refer to jib's answer down below.
It seems like Firefox has not yet implemented constraints.
Constraints have been implemented since Chrome 24 and Opera 18. These can be used to set values for video resolution for getUserMedia() and RTCPeerConnection addStream() calls.
and from: https://wiki.mozilla.org/Media/getUserMedia
Capture resolution [in Firefox] currently fixed to 640x480 for video;
It only supports
Minimal constraints supported: (Note: all of these booleans default to 'false') video: true/false audio: true/false fake: true/false picture: true/false
这篇关于WebRTC的火狐约束的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!