Repository: cordova-plugin-media Updated Branches: refs/heads/master 27d24bbda -> 54adcf1e3
CB-6153 android: Add docs for volume control behaviour, and fix controls not being reset on page navigation Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media/commit/54adcf1e Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media/tree/54adcf1e Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media/diff/54adcf1e Branch: refs/heads/master Commit: 54adcf1e3e349cb867eda5b9bcd039d2ce739c5a Parents: 27d24bb Author: Andrew Grieve <[email protected]> Authored: Thu Nov 27 11:03:16 2014 -0500 Committer: Andrew Grieve <[email protected]> Committed: Thu Nov 27 11:03:16 2014 -0500 ---------------------------------------------------------------------- doc/index.md | 1 + src/android/AudioHandler.java | 3 +++ 2 files changed, 4 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-plugin-media/blob/54adcf1e/doc/index.md ---------------------------------------------------------------------- diff --git a/doc/index.md b/doc/index.md index d130e6e..297d1e7 100644 --- a/doc/index.md +++ b/doc/index.md @@ -388,6 +388,7 @@ Starts recording an audio file. ### Android Quirks - Android devices record audio in Adaptive Multi-Rate format. The specified file should end with a _.amr_ extension. +- The hardware volume controls are wired up to the media volume while any Media objects are alive. Once the last created Media object has `release()` called on it, the volume controls revert to their default behaviour. The controls are also reset on page navigation, as this releases all Media objects. ### iOS Quirks http://git-wip-us.apache.org/repos/asf/cordova-plugin-media/blob/54adcf1e/src/android/AudioHandler.java ---------------------------------------------------------------------- diff --git a/src/android/AudioHandler.java b/src/android/AudioHandler.java index e6c766b..ac3bb7a 100644 --- a/src/android/AudioHandler.java +++ b/src/android/AudioHandler.java @@ -143,6 +143,9 @@ public class AudioHandler extends CordovaPlugin { * Stop all audio players and recorders. */ public void onDestroy() { + if (!players.isEmpty()) { + onLastPlayerReleased(); + } for (AudioPlayer audio : this.players.values()) { audio.destroy(); } --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
