浏览代码

Not report "user cancelled prompt" error as GUM failure

master
paweldomas 9 年前
父节点
当前提交
d4c952f4b9
共有 1 个文件被更改,包括 10 次插入1 次删除
  1. 10
    1
      JitsiMeetJS.js

+ 10
- 1
JitsiMeetJS.js 查看文件

@@ -174,7 +174,16 @@ var LibJitsiMeet = {
174 174
                     }
175 175
                 }
176 176
 
177
-                Statistics.sendGetUserMediaFailed(error);
177
+                if (JitsiTrackErrors.CHROME_EXTENSION_USER_CANCELED ===
178
+                        error.name) {
179
+                    // User cancelled action is not really an error, so only
180
+                    // log it as an event to avoid having conference classified
181
+                    // as partially failed
182
+                    Statistics.sendLog(error.message);
183
+                } else {
184
+                    // Report gUM failed to the stats
185
+                    Statistics.sendGetUserMediaFailed(error);
186
+                }
178 187
 
179 188
                 return Promise.reject(error);
180 189
             }.bind(this));

正在加载...
取消
保存