[ 
https://issues.apache.org/jira/browse/CB-537?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13257958#comment-13257958
 ] 

Shazron Abdullah commented on CB-537:
-------------------------------------

js: 
https://github.com/apache/incubator-cordova-js/blob/master/lib/common/plugin/Media.js#L89
obj-c: 
https://github.com/apache/incubator-cordova-ios/blob/master/CordovaLib/Classes/CDVSound.m#L380

When the second parameter was removed (using mediaId), a dev did not update the 
index of the third parameter, which is now the second parameter.

The workaround is, you need to patch your cordova-js javascript (see js ref 
link above) to add a dummy second parameter.

e.g.
{code}
Media.prototype.seekTo = function(milliseconds) {
    var me = this;
    exec(function(p) {
        me._position = p;
    }, this.errorCallback, "Media", "seekToAudio", [this.id, "dummy", 
milliseconds]);
};
{code}
                
> media.seekTo fails on iOS 5.1 - Simulator and Devices (iPhone and iPad)
> -----------------------------------------------------------------------
>
>                 Key: CB-537
>                 URL: https://issues.apache.org/jira/browse/CB-537
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 1.6.0
>            Reporter: Andreas Rami
>            Assignee: Shazron Abdullah
>            Priority: Blocker
>             Fix For: 1.7.0
>
>         Attachments: Archive.zip
>
>
> Calling seekTo fail with an Exception. Even when just using the sample Code 
> from the API Doc here: 
> http://docs.phonegap.com/en/1.6.0/cordova_media_media.md.html#media.seekTo
> When calling seekTo the following Exception is thrown:  
> *** WebKit discarded an uncaught exception in the 
> webView:decidePolicyForNavigationAction:request:frame:decisionListener: 
> delegate: <NSRangeException> *** -[JKArray objectAtIndex:]: index (3) beyond 
> bounds (3)
> This is an extreme show stopper for me because my app relies on seeking media.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to