Explorar el Código

bug turned out not to be a bug

j8
Philipp Hancke hace 11 años
padre
commit
cb5df3be84
Se han modificado 1 ficheros con 1 adiciones y 30 borrados
  1. 1
    30
      app.js

+ 1
- 30
app.js Ver fichero

@@ -415,35 +415,6 @@ function sendKeyframe(pc) {
415 415
     );
416 416
 }
417 417
 
418
-function demonstrateabug(pc) {
419
-    // funny way of doing mute. the subsequent offer contains things like rtcp-mux
420
-    // and triggers all new ice candidates (ice restart)
421
-    // this code is here to demonstrate a bug
422
-    pc.createOffer(
423
-        function (offer) {
424
-            console.log(offer);
425
-            var sdp = new SDP(offer.sdp);
426
-            if (sdp.media.length > 1) {
427
-                sdp.media[1] = sdp.media[1].replace('a=sendrecv', 'a=recvonly');
428
-                sdp.raw = sdp.session + sdp.media.join('');
429
-                offer.sdp = sdp.raw;
430
-                pc.setLocalDescription(offer,
431
-                    function () {
432
-                        console.log('mute SLD ok');
433
-                    },
434
-                    function(error) {
435
-                        console.log('mute SLD error');
436
-                    }
437
-                );
438
-            }
439
-        },
440
-        function (error) {
441
-            console.warn(error);
442
-        },
443
-        {mandatory: {OfferToReceiveAudio: true, OfferToReceiveVideo: false}}
444
-    );
445
-}
446
-
447 418
 // really mute video, i.e. dont even send black frames
448 419
 function muteVideo(pc, unmute) {
449 420
     // FIXME: this probably needs another of those lovely state safeguards...
@@ -1621,4 +1592,4 @@ function setView(viewName) {
1621 1592
 //        document.getElementById('videolayout_default').disabled  = false;
1622 1593
 //        document.getElementById('videolayout_fullscreen').disabled  = true;
1623 1594
 //    }
1624
-}
1595
+}

Loading…
Cancelar
Guardar