Søg i Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

WebRTC's CreateOffer appears to have broken the error handling

  • 1 svar
  • 6 har dette problem
  • 4 visninger
  • Seneste svar af 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);

Ændret af ShaneHudson den

Alle svar (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: