ExampleHTML5AudioStreaming icon indicating copy to clipboard operation
ExampleHTML5AudioStreaming copied to clipboard

No Background Playback

Open imagecrafting opened this issue 12 years ago • 5 comments

I'm using IOS 6.1 on an iPhone 4s. Downloaded the IPA from https://build.phonegap.com/apps/242993 as linked in Readme.md, and installed it through iTunes. The streaming works great, but hitting the home button on the device causes it to fade out.

I was under the impression that PhoneGap Build generated device-specific projects and then built them, which would not include any of the Objective-C code you're demonstrating here. If so, that might explain why it's behaving this way.

Any thoughts? Thanks.

imagecrafting avatar Nov 12 '13 19:11 imagecrafting

You are correct. The PhoneGap Build version does not have the tweaks needed to support background audio.

For that you would have to compile it locally and make the changes.

devgeeks avatar Nov 12 '13 20:11 devgeeks

By compile locally, you mean through XCode? i've done that but the audio still fades when pushing the home button. would you be so kind to drop me a quick explanation on what needs to be done? (i have done all the steps you mentioned in the Readme)

thank you!

codeho avatar Dec 12 '14 10:12 codeho

Hi everybody,

I'm also having the same problem with iOS 8 and Xcode 6.1. @devgeeks do you have any idea if the problem could be with iOS8? Maybe something else? I'm a little bit at loss what to do..

vjanssens avatar Dec 24 '14 16:12 vjanssens

Not sure. When I get a chance, I'll test it out and see.

devgeeks avatar Jan 04 '15 20:01 devgeeks

The procedure listed still works fine with latest Xcode and ios8.3.

You will need to build the binary using Xcode so that the modified Cordova files are used. Online build services like phonegapbuild will only look at your web files and plugins.

This should really be included into the base Cordova distribution as a fix so that when you enable the background audio capability in Xcode it actually works as expected.

ghenry22 avatar May 17 '15 09:05 ghenry22