浏览代码

Merge pull request #474 from jitsi/is_simulcast_supported

Upgrade sdp-simulcast
tags/v0.0.2
George Politis 8 年前
父节点
当前提交
5daf8831bf
共有 3 个文件被更改,包括 13 次插入2 次删除
  1. 11
    0
      modules/RTC/RTCBrowserType.js
  2. 1
    1
      modules/RTC/TraceablePeerConnection.js
  3. 1
    1
      package.json

+ 11
- 0
modules/RTC/RTCBrowserType.js 查看文件

@@ -107,6 +107,17 @@ const RTCBrowserType = {
107 107
         return currentBrowser === RTCBrowserType.RTC_BROWSER_SAFARI;
108 108
     },
109 109
 
110
+    /**
111
+     * Checks if the current client supports Simulcast.
112
+     * @return {boolean} <tt>true</tt> if Simulcast is supported or
113
+     * <tt>false</tt> otherwise.
114
+     */
115
+    isSimulcastSupported() {
116
+        // Possibly it could work with anything that uses "official" WebRTC
117
+        // stack, but only Chrome was tested.
118
+        return RTCBrowserType.isChrome();
119
+    },
120
+
110 121
     /**
111 122
      * Checks if current environment is NWJS.
112 123
      * @returns {boolean}

+ 1
- 1
modules/RTC/TraceablePeerConnection.js 查看文件

@@ -356,7 +356,7 @@ TraceablePeerConnection.prototype._getDesiredMediaDirection
356 356
  */
357 357
 TraceablePeerConnection.prototype.isSimulcastOn = function() {
358 358
     return !this.options.disableSimulcast
359
-        && this.simulcast.isSupported()
359
+        && RTCBrowserType.isSimulcastSupported()
360 360
         && !this.isP2P;
361 361
 };
362 362
 

+ 1
- 1
package.json 查看文件

@@ -22,7 +22,7 @@
22 22
     "jssha": "1.5.0",
23 23
     "retry": "0.6.1",
24 24
     "sdp-interop": "0.1.11",
25
-    "sdp-simulcast": "0.1.11",
25
+    "sdp-simulcast": "0.2.0",
26 26
     "sdp-transform": "2.3.0",
27 27
     "socket.io-client": "1.4.5",
28 28
     "strophe": "1.2.4",

正在加载...
取消
保存