cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From uareurapid <>
Subject [GitHub] cordova-plugin-media pull request: fix record and play NullPointer...
Date Wed, 27 May 2015 22:52:14 GMT
GitHub user uareurapid opened a pull request:

    fix record and play NullPointerException

    I´ve came across a use case where i always get a NullPointerException:
    1 - Start recording audio file
    2 - Stop recording
    3 - Play the recorded file
    When the recording ends, the status is set to "MEDIA_STOPPED", if i try to play the recorded
file right afterwards, a NullPointerException is thrown at line 494 of readyPlayer(...). This
happens because the file name is the same as the audioFile, and the corresponding switch/case
assumes that in this case it means that this particular file has already been played before,
which is not true. At this point there is no "player" object but only a "recorder", therefore
the exception. With a simple check on the recorder and player it is possible to play the newly
recorded file without any issues.

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

    $ git pull master

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

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

    This closes #56
commit f977aa7c56a7cb50190dfbb393f09e3314b9f509
Author: uareurapid <>
Date:   2015-05-27T22:21:24Z

    fix record and play NullPointerException


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 or file a JIRA ticket
with INFRA.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message