Mozilla VPN is currently experiencing an outage. Our team is actively working to resolve the issue. Please check the status page for real-time updates. Thank you for your patience.

搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

详细了解

WebRTC's CreateOffer appears to have broken the error handling

  • 1 个回答
  • 6 人有此问题
  • 5 次查看
  • 最后回复者为 cor-el

more options

I had a working implementation of WebRTC, using the Adapter.js pollyfill. It was previously working between Firefox and Chrome but now it appears to have a type error on the error handler. I had it set to use null, which still works in Chrome but Firefox now requires {} for an empty error handler (therefore breaking either Chrome or Firefox depending which I use). And it doesn't seem to work with an actual error handler either!

Example Code:

// Works in Firefox

 pc.createOffer(function(description) {
   console.log(description);
   pc.setLocalDescription(description);
   socket.emit('received_offer', JSON.stringify(description));
 }, {}, mediaConstraints);

// Works in Chrome

 pc.createOffer(function(description) {
   console.log(description);
   pc.setLocalDescription(description);
   socket.emit('received_offer', JSON.stringify(description));
 }, null, mediaConstraints);
I had a working implementation of WebRTC, using the Adapter.js pollyfill. It was previously working between Firefox and Chrome but now it appears to have a type error on the error handler. I had it set to use null, which still works in Chrome but Firefox now requires {} for an empty error handler (therefore breaking either Chrome or Firefox depending which I use). And it doesn't seem to work with an actual error handler either! Example Code: // Works in Firefox pc.createOffer(function(description) { console.log(description); pc.setLocalDescription(description); socket.emit('received_offer', JSON.stringify(description)); }, {}, mediaConstraints); // Works in Chrome pc.createOffer(function(description) { console.log(description); pc.setLocalDescription(description); socket.emit('received_offer', JSON.stringify(description)); }, null, mediaConstraints);

由ShaneHudson于修改

所有回复 (1)

more options

A good place to ask advice about web development is at the mozillaZine "Web Development/Standards Evangelism" forum.

The helpers at that forum are more knowledgeable about web development issues.
You need to register at the mozillaZine forum site in order to post at that forum.

See also: