cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From romedius <>
Subject [GitHub] cordova-plugin-media pull request #120: CB-11513: (ios) Fixed: iOS memory wa...
Date Fri, 04 Nov 2016 13:24:14 GMT
GitHub user romedius opened a pull request:

    CB-11513: (ios) Fixed: iOS memory warning stops sound, but does not send status to JS-client

    ### Platforms affected
    ### What does this PR do?
    If iOS issues a memory warning while playing a sound, all sounds are terminated. However
the ios/CDVSound.m plugin does not update the state of its JS-clients, so the last state the
Client knows is Media.MEDIA_RUNNING, which is untrue after a memory warning. This results
in incorrect clientside status.
    Problem: A user's software component may send pause() instead of play() (toggle button)
effectively rendering the sound unplayable without recovery. This happened in our case.
    Fix: Do not discard currently playing sounds. The first memory warning arrives exactly
when the App enters the yellow area and consumes 500MB however it may consume 750MB and more
according to Xcode so terminating sounds on "memory warning" is incorrect behavior.
    ### What testing has been done on this change?
    Tested on iOs simulator.
    How to reproduce  the Issue: Add 1 or 2 large animated GIFs with 200+ frames to the UIWebView,
this will consume 500MB quickly while playing the GIFs, or simulate the memory warning using
the iOS Simulator while playing a sound.
    ### Checklist
    - [x] [Reported an issue]( in the JIRA
    - [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.

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

    $ git pull patch-1

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 #120
commit ad25d1059c44ce2229c40dabf6b7136f89356952
Author: Romedius Weiss <>
Date:   2016-11-04T13:17:04Z

    Fix for CB-11513


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