Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

background streaming audio?


I've tried adding


.. to the info.plist to allow some streaming audio to still play while the app is closed/minimised. But it doesn't seem to work.

Am I missing something here?


— asked September 5th 2010 by Kosso
  • audio
  • background
  • iphone

2 Answers

  • I've been trying to figure this out for a couple months, and even signed up for Pro support to try to track it down.

    Pro support put it on the list for version 1.5, so I thought I was out of luck, but I spotted a nice app the uses streaming background audio.

    I have a long and old question about this here, which references the other question:

    Peter Janett

    — answered September 9th 2010 by Peter janett
  • Local sound file example on Github from KitchenSink does this help?

    — answered September 9th 2010 by John Schimmel
    • This method does not work for streaming audio when the app is closed/minimized

      — commented September 9th 2010 by Kosso
    • Right, I realize that now after looking closer

      — commented September 9th 2010 by John Schimmel
    • Kosso, I took another look, at this question,

      The author of the app got streaming audio to work and said make sure you have the info.plist info in place, seems like you do above. He also says to use

      Titanium.Media.defaultAudioSessionMode = Ti.Media.AUDIO_SESSION_MODE_PLAYBACK;

      I modified the kitchen sink streaming remote by adding this line so the code looks like,

      Titanium.Media.defaultAudioSessionMode = Ti.Media.AUDIO_SESSION_MODE_PLAYBACK;
      var streamer = Titanium.Media.createAudioPlayer();

      I re-uploaded kitchen sink to my phone (iphone 4) and it streams now when the app is minimized. Note, I wasn't able to get the streaming to work in the background in the simulator.

      Hope this helps.

      — commented September 9th 2010 by John Schimmel
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.