cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tbrebant <...@git.apache.org>
Subject [GitHub] cordova-plugin-media pull request #101: CB-11409: (iOS) New method allowing ...
Date Fri, 17 Jun 2016 09:18:12 GMT
GitHub user tbrebant opened a pull request:

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

    CB-11409: (iOS) New method allowing to disable automated memory release on memoryWarning

    ### Platforms affected
    
    iOS
    
    ### What does this PR do?
    
    It is adding a method allowing the user to disable (and re-enable) the automated resource
releasing when a memory warning is received on iOS. Why? Because user may want to handle memory
warnings by himself (such as releasing other less important resource first).
    
    This method is static, on the class:
    
    ```js
    Media.shouldReleaseOnMemoryWarning(false);
    // Here comes custom code to handle memoryWarnings
    ```
    
    ### What testing has been done on this change?
    
    - Played multiple (non streaming) audio files after having disabled the auto-release and
while having some heavy memory process running, until a memoryWarning is received: audio continue
to play.
    - Played multiple (non streaming) audio files with the auto-release enabled and while
having some heavy memory process running, until a memoryWarning is received: audio stops.
    
    Ran the integrated tests. Before doing any change (version 2.3.1-dev) the result was:
    
    ![cordova-media-plugin 2 3 1-dev](https://cloud.githubusercontent.com/assets/637734/16145899/3ca50f5a-34b6-11e6-924c-f04b87e7a1d1.jpg)
    
    After the change the result is exactly the same:
    
    ![img_0194](https://cloud.githubusercontent.com/assets/637734/16145928/57cf7b9e-34b6-11e6-94a5-e44a38068688.jpg)
    
    All tests was made with an iPad2 on iOS8.4.
    
    ### Checklist
    - [x] [ICLA](http://www.apache.org/licenses/icla.txt) has been signed and submitted to
secretary@apache.org.
    - [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.
    - [ ] Added automated test coverage as appropriate for this change.
    
    About the last point: tests will come as soon as possible, meanwhile please have a look
at the code and review it! Thank you.

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

    $ git pull https://github.com/tbrebant/cordova-plugin-media CB11409

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

    https://github.com/apache/cordova-plugin-media/pull/101.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 #101
    
----
commit eca1d6342cdda64d73235b1ae5658bc87619ba54
Author: tbrebant <tbrebant@wizcorp.jp>
Date:   2016-06-14T09:09:54Z

    CB-11409: (iOS) Added a method to disable automated memory releasing when a memoryWarning
is received

----


---
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


Mime
View raw message