Browse Source

Not report "user cancelled prompt" error as GUM failure

master
paweldomas 9 years ago
parent
commit
d4c952f4b9
1 changed files with 10 additions and 1 deletions
  1. 10
    1
      JitsiMeetJS.js

+ 10
- 1
JitsiMeetJS.js View File

@@ -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));

Loading…
Cancel
Save