Titanium Community Questions & Answer Archive

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

Is Titanium.Media.createAudioPlayer documented anywhere?

Titanium.Media.createSoundPlayer is eluded to here:


So we have createAudioPlayer used in the code, and createSoundPlayer mentioned in the API docs. Which is correct?


— asked March 23rd 2010 by Andrew Cronk
  • api
  • audio
  • sound

5 Answers

  • createSound is best used for short audio sounds, either locally or via a url.

    createAudioPlayer is best used for streaming audio - live streams or mp3 urls.

    I think you might be right that createSoundPlayer is an error in the docs.

    Some demos are in the KitchenSink app :

    look for Resources/examples/sound_remote.js

    — answered March 23rd 2010 by Kosso
  • Nolan, does createAudioPlayer work on Android too?

    Also, I want to stream an mp3 and show a progress bar, just like the Quicktime player does on the iPhone when an mp3 loads. Is this possible?

    — answered March 24th 2010 by Andrew Cronk
    1 Comment
    • I've found the easiest way of doing this is just to use an HTML5 audio tag - I'm not sure how this works on Android, but at least on iPhone it saves having to code and design all the buttons yourself.

      — commented February 24th 2011 by James Doy
  • Kosso, you mention createSoundPlayer is good for live streams..

    Am I true in saying that a shoutcast stream url (eg: is NOT going to work on Android prior 2.2?

    I have done testing myself and can not get the live streams working

    — answered August 20th 2010 by Jay J
  • Also as a note in case anyone is searching createAudioPlayer doesn't send cookie information that it may have gathered from Titanium.Network.createHTTPClient, e.g. a login call previously.

    — answered January 1st 2012 by Tushar Joshi
  • not yet - still working on it. it basically has one property (url) then you can call start, stop and pause on it.

    — answered March 23rd 2010 by Nolan Wright
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.