You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by omefire <gi...@git.apache.org> on 2016/02/11 00:00:28 UTC

[GitHub] cordova-plugin-media pull request: CB-10535: Fix Plugin Media cras...

GitHub user omefire opened a pull request:

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

    CB-10535: Fix Plugin Media crash due to seeking before buffering of file is completed

    

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

    $ git pull https://github.com/omefire/cordova-plugin-media CB-10535

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

    https://github.com/apache/cordova-plugin-media/pull/82.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 #82
    
----
commit cd26fec7dfbf284bf4047bf0ab8d62c42562a2db
Author: Omar Mefire <om...@gmail.com>
Date:   2016-02-09T23:30:45Z

    Appease iOS ATS issues by downloading MP3 file from HTTPS instead of HTTP

commit 06b3d09a1e4ffd4868b0632c5d99c1d4ccfb5cfb
Author: Omar Mefire <om...@gmail.com>
Date:   2016-02-10T01:40:48Z

    Fixing confusing indentation

commit 268d052a3f6a0bd4bf5c52d9a265ef89d7f8be7a
Author: Omar Mefire <om...@gmail.com>
Date:   2016-02-10T22:29:19Z

    CB-10535: To avoid potential crashes, only seek if both avPlayer and avPlayerItem are ready, and send back an error message to client code

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-media pull request: CB-10535: Fix Plugin Media cras...

Posted by omefire <gi...@git.apache.org>.
Github user omefire commented on the pull request:

    https://github.com/apache/cordova-plugin-media/pull/82#issuecomment-197461957
  
    @kostkobv, I see.
    The issue is that you start playing before the native components are ready to handle the play operation.
    Ideally, we should handle this and only potentially expose an asynchronous API to the end user. 
    Until we make the appropriate fixes, the only way to get around that will be for you to wait a few seconds, to allow the native components to be ready to handle the play operation.
    
    Can you please file a JIRA issue for your issue and point to this github thread ? that way, we can track it more easily.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-media pull request: CB-10535: Fix Plugin Media cras...

Posted by ghenry22 <gi...@git.apache.org>.
Github user ghenry22 commented on the pull request:

    https://github.com/apache/cordova-plugin-media/pull/82#issuecomment-182668004
  
    That should fix the test for rate change as it will allow the media to buffer before starting to count play time.
    
    In reality actually using the media plugin in an audioplayer app I have not had any issues or crashes related to this ever.  I listen for mediaStatus events from the plugin in my app and only start playing when it is ready.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-media pull request: CB-10535: Fix Plugin Media cras...

Posted by shazron <gi...@git.apache.org>.
Github user shazron commented on the pull request:

    https://github.com/apache/cordova-plugin-media/pull/82#issuecomment-182658276
  
    Reviewing.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-media pull request: CB-10535: Fix Plugin Media cras...

Posted by omefire <gi...@git.apache.org>.
Github user omefire closed the pull request at:

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


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-media pull request: CB-10535: Fix Plugin Media cras...

Posted by ghenry22 <gi...@git.apache.org>.
Github user ghenry22 commented on the pull request:

    https://github.com/apache/cordova-plugin-media/pull/82#issuecomment-182673242
  
    I have an audioplayer service which creates the media object with media.play().then statement.  In the then statement I wait for mediaStatus to hit 2 and then tell the service to respond that playing started.  mediaStatus changes to 2 when the stream starts playing.  Seems to work well.  The same behaviour works well in Android and Windows 10.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-media pull request: CB-10535: Fix Plugin Media cras...

Posted by omefire <gi...@git.apache.org>.
Github user omefire commented on the pull request:

    https://github.com/apache/cordova-plugin-media/pull/82#issuecomment-182671912
  
    @ghenry22 , interesting.
    What mediaStatus event lets you know when it's ready ?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-media pull request: CB-10535: Fix Plugin Media cras...

Posted by omefire <gi...@git.apache.org>.
Github user omefire commented on the pull request:

    https://github.com/apache/cordova-plugin-media/pull/82#issuecomment-183009872
  
    @shazron , I don't think we need to put this in the docs. I didn't see the issue manifest itself when played right away, just when seeked right away.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-media pull request: CB-10535: Fix Plugin Media cras...

Posted by omefire <gi...@git.apache.org>.
Github user omefire commented on the pull request:

    https://github.com/apache/cordova-plugin-media/pull/82#issuecomment-183021655
  
    Closing this PR as it has just been merged.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-media pull request: CB-10535: Fix Plugin Media cras...

Posted by omefire <gi...@git.apache.org>.
Github user omefire commented on the pull request:

    https://github.com/apache/cordova-plugin-media/pull/82#issuecomment-182996869
  
    @ghenry22 ok, thanks for the explanation. 
    In this case, waiting for mediaStatus to hit 2 won't help. As a matter of fact, the tests as they currently stand do just that.
    
    The issue is related to seeking when not everything has been buffered yet. playing in that case won't elicit this behavior.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-media pull request: CB-10535: Fix Plugin Media cras...

Posted by omefire <gi...@git.apache.org>.
Github user omefire commented on the pull request:

    https://github.com/apache/cordova-plugin-media/pull/82#issuecomment-182635288
  
    @shazron , could you please help review these changes ?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-media pull request: CB-10535: Fix Plugin Media cras...

Posted by shazron <gi...@git.apache.org>.
Github user shazron commented on the pull request:

    https://github.com/apache/cordova-plugin-media/pull/82#issuecomment-182667452
  
    LGTM


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-media pull request: CB-10535: Fix Plugin Media cras...

Posted by omefire <gi...@git.apache.org>.
Github user omefire commented on the pull request:

    https://github.com/apache/cordova-plugin-media/pull/82#issuecomment-182649235
  
    When dealing with remote files, we can get into a situation where we start playing before the native iOS components (AVPlayer & AVPlayerItem) have had the time to buffer the file to be played.
    To avoid the app crashing in such a situation, we only seek if both the player and the player item are ready.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-media pull request: CB-10535: Fix Plugin Media cras...

Posted by kostkobv <gi...@git.apache.org>.
Github user kostkobv commented on the pull request:

    https://github.com/apache/cordova-plugin-media/pull/82#issuecomment-197350848
  
    @omefire I've used the last version of plugin with your changes merged within but it's still don't work - I'm still getting the same exception ("AVPlayerItem cannot service a seek request with a completion handler until its status is AVPlayerItemStatusReadyToPlay.") which cause the app crash when I'm trying to play sound.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org