Titanium Community Questions & Answer Archive

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

Issue to play real audio streaming (.m3u & .pls)


Currently, it seems that createAudioPlayer function can't read m3u and pls files.

I've test with mp3 files and it work fine, but with pls files like this: http://fg.impek.tv/listen.pls it doesn't work. In my case, this pls file is composed of :


I think the function doesn't support this kinds of reading. So is there any alternative or solution to make this working ?

Thanks for all replies.

— asked June 11th 2010 by Clément Bongibault
  • android
  • audi
  • iphone
  • m3u
  • pls
  • stream

3 Answers

  • You will have to write your own little parser and then use the data from the generated array as you normally would. Here's a resource with a simple example that should help you solve this using regular expressions.

    — answered October 6th 2010 by Mike Zeena
  • Had to any luck resolving this. I'm stuck as well with a m3u file. I don't really get how to implement the parser either.


    — answered April 8th 2011 by Alexnader Mogollon
  • To parse:

    1. Get the contents of the playlist file via an HTTPClient request
    2. Create an array by splitting the string by line breaks
    3. Get the last element in the array and split that string by the equal sign.
      .. that should be enough to get the stream url, among other things you might want.

    It all boils down to very simple string manipulation using JavaScript ;)
    Just think it through, step by step, until you get the data you want.

    — answered April 8th 2011 by Kosso
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.