[ 
https://issues.apache.org/jira/browse/CB-11146?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

David Peacock updated CB-11146:
-------------------------------
    Description: 
In the Media plug-in with iOS the getDuration is only available once play has 
been called.  This is because the callback to set the duration is only ever 
triggered from play.

Previously you could call play/stop immediately to get around this, this no 
longer works as the stop will not invoke unless the sound actually is playing.  
This wasn't ideal anyways as the documentation shows you should only have to 
create a new Media object and then getDuration should be available to be used.  
Should initialize duration on create.

  was:
In the Media plug-in with iOS the getDuration is only available once play has 
been called.  This is because the callback to set the duration is only ever 
triggered from play.

Previously you could call play/stop immediately to get around this, this no 
longer works as the stop will not invoke unless the sound actually is playing.  
This wasn't ideal anyways as the documentation shows you should only have to 
create a new Media object and then getDuration should be available to be used.  
Tested in Android and it works as expected, iOS should initialize duration on 
create.


> iOS getDuration only available after play
> -----------------------------------------
>
>                 Key: CB-11146
>                 URL: https://issues.apache.org/jira/browse/CB-11146
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin Media
>            Reporter: David Peacock
>              Labels: iOS, pendingPR, triaged
>
> In the Media plug-in with iOS the getDuration is only available once play has 
> been called.  This is because the callback to set the duration is only ever 
> triggered from play.
> Previously you could call play/stop immediately to get around this, this no 
> longer works as the stop will not invoke unless the sound actually is 
> playing.  This wasn't ideal anyways as the documentation shows you should 
> only have to create a new Media object and then getDuration should be 
> available to be used.  Should initialize duration on create.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org

Reply via email to