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 2012/11/08 03:13:43 UTC

ios commit: Fix not being able to seek to position 0.

Updated Branches:
  refs/heads/master 8d5925ed2 -> 965679216


Fix not being able to seek to position 0.

Submitted on behalf of cpojer.


Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/commit/96567921
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/tree/96567921
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/diff/96567921

Branch: refs/heads/master
Commit: 9656792163de289e9e850c46981686ed4a175352
Parents: 8d5925e
Author: Andrew Grieve <ag...@chromium.org>
Authored: Wed Nov 7 21:03:21 2012 -0500
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Wed Nov 7 21:03:21 2012 -0500

----------------------------------------------------------------------
 CordovaLib/Classes/CDVSound.m |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/96567921/CordovaLib/Classes/CDVSound.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVSound.m b/CordovaLib/Classes/CDVSound.m
index 6598fa1..85e8b30 100644
--- a/CordovaLib/Classes/CDVSound.m
+++ b/CordovaLib/Classes/CDVSound.m
@@ -355,15 +355,13 @@
     CDVAudioFile* audioFile = [[self soundCache] objectForKey:mediaId];
     double position = [[command.arguments objectAtIndex:1] doubleValue];
 
-    if ((audioFile != nil) && (audioFile.player != nil) && position) {
+    if ((audioFile != nil) && (audioFile.player != nil)) {
         double posInSeconds = position / 1000;
         audioFile.player.currentTime = posInSeconds;
         NSString* jsString = [NSString stringWithFormat:@"%@(\"%@\",%d,%f);", @"cordova.require('cordova/plugin/Media').onStatus", mediaId, MEDIA_POSITION, posInSeconds];
 
         [self.commandDelegate evalJs:jsString];
     }
-
-    return;
 }
 
 - (void)release:(CDVInvokedUrlCommand*)command