Hilfe durchsuchen

Vorsicht vor Support-Betrug: Wir fordern Sie niemals auf, eine Telefonnummer anzurufen, eine SMS an eine Telefonnummer zu senden oder persönliche Daten preiszugeben. Bitte melden Sie verdächtige Aktivitäten über die Funktion „Missbrauch melden“.

Weitere Informationen

WebRTC's CreateOffer appears to have broken the error handling

  • 1 Antwort
  • 6 haben dieses Problem
  • 5 Aufrufe
  • Letzte Antwort von 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);

Geändert am von ShaneHudson

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