You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by jc...@apache.org on 2017/02/15 22:04:58 UTC
cordova-plugin-media git commit: CB-12422: (iOS) Fix readme issue on
background needed plist modification
Repository: cordova-plugin-media
Updated Branches:
refs/heads/master fcf8bc591 -> 55d457bf6
CB-12422: (iOS) Fix readme issue on background needed plist modification
This closes #128
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/55d457bf
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media/tree/55d457bf
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media/diff/55d457bf
Branch: refs/heads/master
Commit: 55d457bf61bd10de07075b5c21701e0029705064
Parents: fcf8bc5
Author: corinne krych <co...@gmail.com>
Authored: Tue Feb 14 18:06:21 2017 +0100
Committer: Julio C�sar <jc...@gmail.com>
Committed: Wed Feb 15 23:04:27 2017 +0100
----------------------------------------------------------------------
README.md | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-media/blob/55d457bf/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index 8d949c0..e2b74cc 100644
--- a/README.md
+++ b/README.md
@@ -360,8 +360,11 @@ function playAudio(url) {
is locked. If set to `true` (the default value), the state of the
hardware mute button is ignored, e.g.:
- var myMedia = new Media("http://audio.ibeat.org/content/p1rj1s/p1rj1s_-_rockGuitar.mp3")
- myMedia.play({ playAudioWhenScreenIsLocked : false })
+ var myMedia = new Media("http://audio.ibeat.org/content/p1rj1s/p1rj1s_-_rockGuitar.mp3");
+ myMedia.play({ playAudioWhenScreenIsLocked : true });
+ myMedia.setVolume('1.0');
+
+> Note: To allow playback with the screen locked or background audio you have to add `audio` to `UIBackgroundModes` in the `info.plist` file. See [Apple documentation](https://developer.apple.com/library/content/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/BackgroundExecution/BackgroundExecution.html#//apple_ref/doc/uid/TP40007072-CH4-SW23). Also note that the audio has to be started before going to background.
- __order of file search__: When only a file name or simple path is
provided, iOS searches in the `www` directory for the file, then in
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org