Firefox中的WebRTC OfferToReceiveAudio错误 [英] WebRTC OfferToReceiveAudio error in Firefox
问题描述
使用Chrome时,媒体约束被指定为:
mediaConstraints = {'mandatory':{'OfferToReceiveAudio':true,'OfferToReceiveVideo':true}};
其中,
当使用Firefox(Mac上的 35.0.1 )时,根据规范应该是:
mediaConstraints = {'offerToReceiveAudio':true,'offerToReceiveVideo':true};
但是不起作用(冰失败!)
使用 O fferToReceiveAudio
mediaConstraints = {'OfferToReceiveAudio':true, offerToReceiveVideo:真正};
可以正常工作。
行为?
正确的格式(现在)是:
offerOptions = {'offerToReceiveAudio':true,'offerToReceiveVideo':true};
因为这是新的规范格式,并且都支持 Chrome浏览器和 Firefox 。
特别注意小写字母o,因为这确实发生了变化,投掷了不止一些人。希望你现在可以开始工作了。
另外请注意,这些不再是约束,只是选项。更简单。
I'm developing a simple example to test WebRTC, and I've found the following strange behaviour.
When using Chrome, the media constraints are specified as:
mediaConstraints = {'mandatory': {'OfferToReceiveAudio':true, 'OfferToReceiveVideo':true}};
which works fine.
However, when using Firefox (35.0.1 on the mac), according to the spec it should be:
mediaConstraints = {'offerToReceiveAudio':true,'offerToReceiveVideo':true};
But doesn't work (Ice failed!)
Using "OfferToReceiveAudio"
mediaConstraints = {'OfferToReceiveAudio':true,'offerToReceiveVideo':true};
works fine.
Is this documented behaviour?
The right format (by now) is:
offerOptions = {'offerToReceiveAudio':true,'offerToReceiveVideo':true};
as this is the new spec format and is supported by both Chrome and Firefox.
Take special care to note the lower-case 'o's, as this did change and threw more than a few people. Hopefully you got it working by now.
Also note that these are no longer "constraints", just "options". Simpler.
这篇关于Firefox中的WebRTC OfferToReceiveAudio错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!