Ver código fonte

fix(ie11): do not call JSON.stringify with temasys ice candidate

Calling JSON.stringify on a temasys object causes a stack overflow.
The result is that the JingleSessionPC's work queue never gets
cleared so future work, like video muting, will not get called.
Instead of passing in the candidate directly, manually do
what chrome's implementation of candidate.toJSON does.
dev1
Leonard Kim 7 anos atrás
pai
commit
d73c81eb4b
1 arquivos alterados com 9 adições e 1 exclusões
  1. 9
    1
      modules/RTC/TraceablePeerConnection.js

+ 9
- 1
modules/RTC/TraceablePeerConnection.js Ver arquivo

2257
         successCallback,
2257
         successCallback,
2258
         failureCallback) {
2258
         failureCallback) {
2259
     // var self = this;
2259
     // var self = this;
2260
-    this.trace('addIceCandidate', JSON.stringify(candidate, null, ' '));
2260
+
2261
+    // Calling JSON.stringify with temasys objects causes a stack overflow, so
2262
+    // instead pick out values to log.
2263
+    this.trace('addIceCandidate', JSON.stringify({
2264
+        candidate: candidate.candidate,
2265
+        sdpMid: candidate.sdpMid,
2266
+        sdpMLineIndex: candidate.sdpMLineIndex,
2267
+        usernameFragment: candidate.usernameFragment
2268
+    }, null, ' '));
2261
     this.peerconnection.addIceCandidate(
2269
     this.peerconnection.addIceCandidate(
2262
         candidate, successCallback, failureCallback);
2270
         candidate, successCallback, failureCallback);
2263
 
2271
 

Carregando…
Cancelar
Salvar