Zoeken in Support

Vermijd ondersteuningsscams. We zullen u nooit vragen een telefoonnummer te bellen, er een sms naar te sturen of persoonlijke gegevens te delen. Meld verdachte activiteit met de optie ‘Misbruik melden’.

Meer info

Deze conversatie is gearchiveerd. Stel een nieuwe vraag als u hulp nodig hebt.

WebRTC's CreateOffer appears to have broken the error handling

  • 1 antwoord
  • 6 hebben dit probleem
  • 5 weergaven
  • Laatste antwoord van 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);

Bewerkt door ShaneHudson op

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