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:

https://developer.appcelerator.com/apidoc/mobile/1.1/Titanium.Media.Sound

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

Thanks!

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

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
    permalink
    0 Comments
  • 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
    permalink
    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: http://11.22.33.44:7777/) 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
    permalink
    0 Comments
  • 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
    permalink
    0 Comments
  • 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
    permalink
    0 Comments
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.