Permalink
Browse files

Don't fire the error event when a video recording session gets canceled.

  • Loading branch information...
1 parent 1585dc0 commit c51c6287d86b9fb2b11cb43263cf65aee39eb5bb @cpojer cpojer committed Nov 20, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 JavaScript/Capture/CordovaVideoRecorder.js
@@ -33,7 +33,9 @@ module.exports = new Class({
onCaptureError: function(event) {
this.fireEvent('cancel');
- this.fireEvent('error', event);
+ // Don't fire the error event if capturing was canceled
+ if (event.code != window.CaptureError.CAPTURE_NO_MEDIA_FILES)
+ this.fireEvent('error', event);
},
onFileSystemReady: function(fileSystem) {

0 comments on commit c51c628

Please sign in to comment.