瀏覽代碼

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
                     }
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
                 return Promise.reject(error);
188
                 return Promise.reject(error);
180
             }.bind(this));
189
             }.bind(this));

Loading…
取消
儲存