You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ag...@apache.org on 2014/02/10 21:32:45 UTC

git commit: CB-5748 Make sure that Media.onStatus is called when recording is started.

Updated Branches:
  refs/heads/dev 563b4b6dc -> abbfdf3f2


CB-5748 Make sure that Media.onStatus is called when recording is started.


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media/commit/abbfdf3f
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media/tree/abbfdf3f
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media/diff/abbfdf3f

Branch: refs/heads/dev
Commit: abbfdf3f2fa7017d2a51954be33817403a1652ae
Parents: 563b4b6
Author: Mark Bradshaw <mb...@americanbible.org>
Authored: Tue Jan 28 11:34:49 2014 -0600
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Mon Feb 10 15:31:44 2014 -0500

----------------------------------------------------------------------
 src/ios/CDVSound.m | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-media/blob/abbfdf3f/src/ios/CDVSound.m
----------------------------------------------------------------------
diff --git a/src/ios/CDVSound.m b/src/ios/CDVSound.m
index 187f370..c8a3120 100644
--- a/src/ios/CDVSound.m
+++ b/src/ios/CDVSound.m
@@ -561,6 +561,7 @@
                 if (recordingSuccess) {
                     NSLog(@"Started recording audio sample '%@'", audioFile.resourcePath);
                     jsString = [NSString stringWithFormat:@"%@(\"%@\",%d,%d);", @"cordova.require('org.apache.cordova.media.Media').onStatus", mediaId, MEDIA_STATE, MEDIA_RUNNING];
+                    [self.commandDelegate evalJs:jsString];
                 }
             }
             
@@ -575,6 +576,7 @@
                     [self.avSession setActive:NO error:nil];
                 }
                 jsString = [NSString stringWithFormat:@"%@(\"%@\",%d,%@);", @"cordova.require('org.apache.cordova.media.Media').onStatus", mediaId, MEDIA_ERROR, [self createMediaErrorWithCode:MEDIA_ERR_ABORTED message:errorMsg]];
+                [self.commandDelegate evalJs:jsString];
             }
         };