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

ASF GitHub Bot commented on CB-10849:
-------------------------------------

GitHub user alsorokin opened a pull request:

    https://github.com/apache/cordova-plugin-media/pull/108

    CB-10849 (ios) Fixed a crash when playing soundfiles consecutively

    <!--
    Please make sure the checklist boxes are all checked before submitting the 
PR. The checklist
    is intended as a quick reference, for complete details please see our 
Contributor Guidelines:
    
    http://cordova.apache.org/contribute/contribute_guidelines.html
    
    Thanks!
    -->
    
    ### Platforms affected
    iOS
    
    ### What does this PR do?
    Fixes a crash by ensuring that the avPlayer is in correct state before 
invoking seekTo.
    
    ### What testing has been done on this change?
    Bug reproduced and fix tested by running automatic tests on iPad 2 with iOS 
8.1
    
    ### Checklist
    - [x] [ICLA](http://www.apache.org/licenses/icla.txt) has been signed and 
submitted to [email protected].
    - [x] [Reported an issue](http://cordova.apache.org/contribute/issues.html) 
in the JIRA database
    - [x] Commit message follows the format: "CB-3232: (android) Fix bug with 
resolving file paths", where CB-xxxx is the JIRA ID & "android" is the platform 
affected.
    - [x] Added automated test coverage as appropriate for this change (already 
covered)
    


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/alsorokin/cordova-plugin-media CB-10849

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cordova-plugin-media/pull/108.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #108
    
----
commit f1528f4e0ab477086165479e9d7086608fbf760f
Author: Alexander Sorokin <[email protected]>
Date:   2016-08-22T13:43:20Z

    CB-10849 (ios) Fixed a crash when playing soundfiles consecutively

----


> cordova-plugin-media Version 2.2.0 cannot play soundfiles on iOS 
> -----------------------------------------------------------------
>
>                 Key: CB-10849
>                 URL: https://issues.apache.org/jira/browse/CB-10849
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin Media
>    Affects Versions: 3.9.0
>         Environment: iPhone 4S with iOS 9.2.1
> latest X-Code and SDK Version
> Cordova 3.9.2
> cordova-plugin-media 2.2.0
>            Reporter: Ronny Schleicher
>              Labels: iOS, regression, triaged, wfc
>
> After updating to the cordova-plugin-media 2.2.0 it is no longer possible to 
> play any wav or mp3 files. It comes to a crash in the Objectiv-C code.
> To recreate the error:
> Play sound file 1
> Stop soundfile 1
> Play sound file 2
> Stop soundfile 2
> etc.
> crash ...
> With version 2.1.0, it works fine.
> {panel:title=callstack after crash in x-Code}
> 2016-03-11 11:49:25.961 FAMANICE[376:54395] Playing audio sample 
> 'resources/sounds/sendingChatMessage.mp3'
> 2016-03-11 11:49:25.964 FAMANICE[376:54395] Playing stream with AVPlayer & 
> custom rate
> 2016-03-11 11:49:25.988 FAMANICE[376:54256] *** Terminating app due to 
> uncaught exception 'NSInvalidArgumentException', reason: 'AVPlayerItem cannot 
> service a seek request with a completion handler until its status is 
> AVPlayerItemStatusReadyToPlay.'
> First throw call stack:
> (0x20db010b 0x20556e17 0x2627116f 0x2625eac1 0x1791d3 0x19b263 0x19ab5f 
> 0x215bd7bd 0x20d73e1f 0x20d73a51 0x20d7189d 0x20cc4bf9 0x20cc49e5 0x21f10ac9 
> 0x24f54ba1 0x104683 0x20973873)
> libc++abi.dylib: terminating with uncaught exception of type NSException
> (lldb) 
> {panel}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to