浏览代码

Merge pull request #340 from bgrozev/fix-simulcast-support-check

fix: Use the same logic as sdp-simulcast in
dev1
bbaldino 8 年前
父节点
当前提交
968fdaca6f
共有 2 个文件被更改,包括 5 次插入3 次删除
  1. 4
    1
      modules/RTC/RTCBrowserType.js
  2. 1
    2
      modules/connectivity/ConnectionQuality.js

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

@@ -164,7 +164,10 @@ var RTCBrowserType = {
164 164
      * @returns {boolean}
165 165
      */
166 166
     supportsSimulcast: function() {
167
-        return RTCBrowserType.isChrome();
167
+        // This mirrors what sdp-simulcast uses (which is used when deciding
168
+        // whether to actually enable simulcast or not).
169
+        // TODO: the logic should be in one single place.
170
+        return !!window.chrome;
168 171
     }
169 172
 
170 173
     // Add version getters for other browsers when needed

+ 1
- 2
modules/connectivity/ConnectionQuality.js 查看文件

@@ -121,8 +121,7 @@ export default class ConnectionQuality {
121 121
 
122 122
         /**
123 123
          * Whether simulcast is supported. Note that even if supported, it is
124
-         * currently not used for screensharing, which is why we have an
125
-         * additional check.
124
+         * currently not used for screensharing.
126 125
          */
127 126
         this._simulcast
128 127
             = !options.disableSimulcast && RTCBrowserType.supportsSimulcast();

正在加载...
取消
保存