[TIMOB-1671] iOS: Add streaming audio support for background audio, iOS 4
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | Medium |
Status | Closed |
Resolution | Duplicate |
Resolution Date | 2011-04-15T02:58:59.000+0000 |
Affected Version/s | Release 2.1.0 |
Fix Version/s | n/a |
Components | iOS |
Labels | api |
Reporter | Ralf Pfeiffer |
Assignee | Ingo Muschenetz |
Created | 2011-04-15T02:58:58.000+0000 |
Updated | 2017-05-31T23:19:38.000+0000 |
Description
Several premium customers are asking that we support streaming audio for use in background audio.
I was able to semi hack it use instructions I found here: http://developer.appcelerator.com/question/47291/background-audio-in-14#113331"> http://developer.appcelerator.com/question/47291/background-audio-i...
But using the method above means that the audio controls to stop your stream dont work, you have to go back to the app to stop the music which is not very elegant.
Dupe of #2632.
This ticket is NOT a duplicate of #2632.
Titanium 1.6.1 does NOT support background audio properly (with remote controls) for STREAMING audio files (it does work properly for local sound files).
Again, when you start() an AudioPlayer, it does play in the background, but does NOT support remote controls (like when swiping left on the multitasking bar OR double tapping home when the device is locked). On the other hand, when you play() a Sound, both background audio AND the remote controls work correctly.
The FIX should be simple: just add a listener for kTiRemoteControlNotification in TiMediaAudioPlayerProxy.m and have it call a method similar to remoteControlEvent: in TiMediaSoundProxy.m.
Please add Instant Automatic to the list of premium customers who NEED this feature ASAP. Thanks.
Also, remember that you must test background audio on a device as it is not supported in the iOS Simulator.
I also opened up a help desk ticket about this:
http://support.appcelerator.com/tickets/HEX-26948-985/">http://support.appcelerator.com/tickets/HEX-26948-985/
Another customer is wanting the ability to control audio when in the background (using the multitasking ipod controls) Ticket# APP-818431
See here on how to add support for Background Streaming controls: http://developer.appcelerator.com/question/47291/background-audio-in-14#answer-248128