devgeeks / ExampleHTML5AudioStreaming

Example project showing audio streaming using HTML5 Audio with PhoneGap on iOS - https://build.phonegap.com/apps/242993
164 stars 61 forks source link

No Background Playback #3

Open imagecrafting opened 10 years ago

imagecrafting commented 10 years ago

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.

devgeeks commented 10 years ago

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.

codeho commented 9 years ago

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!

vjanssens commented 9 years ago

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

devgeeks commented 9 years ago

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

ghenry22 commented 9 years ago

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.