Explorar el Código

Simplify source code

dev1
Lyubomir Marinov hace 9 años
padre
commit
6555cd2337
Se han modificado 1 ficheros con 5 adiciones y 8 borrados
  1. 5
    8
      modules/RTC/RTCUtils.js

+ 5
- 8
modules/RTC/RTCUtils.js Ver fichero

@@ -629,11 +629,10 @@ var RTCUtils = {
629 629
                     //
630 630
                     // https://groups.google.com/forum/#!topic/mozilla.dev.media/pKOiioXonJg
631 631
                     // https://github.com/webrtc/samples/issues/302
632
-                    if (!element)
633
-                        return;
634
-                    element.mozSrcObject = stream;
635
-                    element.play();
636
-
632
+                    if (element) {
633
+                        element.mozSrcObject = stream;
634
+                        element.play();
635
+                    }
637 636
                     return element;
638 637
                 });
639 638
                 this.getStreamID = function (stream) {
@@ -648,9 +647,7 @@ var RTCUtils = {
648 647
                     return SDPUtil.filter_special_chars(id);
649 648
                 };
650 649
                 this.getVideoSrc = function (element) {
651
-                    if (!element)
652
-                        return null;
653
-                    return element.mozSrcObject;
650
+                    return element ? element.mozSrcObject : null;
654 651
                 };
655 652
                 this.setVideoSrc = function (element, src) {
656 653
                     if (element)

Loading…
Cancelar
Guardar