Tuesday, July 27, 2010

Adapting AudioStreamer for TapLynx

Matt Gallagher has made a cool library that does audio streaming. We have adapted his library for use with the TapLynx framework and released it on github. You can get your own copy of the library at github.
The TapLynx framework lets someone with limited programming experience produce professional applications for use in the Apple App store. A TapLynx based application can be controlled by changing settings in a single .plist file. This file can be local to the application or hosted on a remote web server.

The AudioStreamer adaptation is mostly controlled from settings in the NGConfig.plist that controls the rest of a TapLynx application. Modifications to the UI can be made by editing a single .xib file (TAStreamingPlayer.xib).
If the plugin is fed a single mp3 feed it will open a basic player and let the user listen to the stream. Per the design of the underlying AudioStreamer library, the soundfile can be either a continuous stream or of a finite duration.

If the plugin is
fed an array of streams, it will present the user with a picker view so that they can choose among the streams.

Instructions for loading the plugin and installing it within your TapLynx application can be found in the readme that is in the github.com repository. There is also a sample plist file to show how the array of streams needs to be formatted.

This has been a fun project for us and we will post a few of the interesting things we learned while working on it over the next few days. Please enjoy the library and use it in your projects. Tyree Apps would love attribution either on your website or your blog. We are also happy to engage in projects to customize the plugin or to create other custom plugins for hire.


hamo said...

Hi I've been trying to use this on Taplynx but most of the streams that I have are .pls and m3u or other extenstions (asx by default does not run of course) but is there a way to stream those urls? Hope you could reply thanks in advance

Walter said...

The extensions supported by the underlying library are mp3, aiff, wav, aifc, m4a, mp4, caf, and aac. So, if you are trying to stream one of those I can update the library if you give me the url to test.

The only way I've read about to use asx is FFMPEG or WunderRadio. I've not gotten around to exploring that. The pls and m3u streams are not single file but multiple, tiny files. That is why they can be friendly to bandwidth.

JV said...

Walter: Here is a URL. http://streaming.fueralle.org:8000/Radio-F.R.E.I.m3u
How can audiostreamer in play this?

Walter said...

@JV. It cannot play m3u8 and the underlying library doesn't (and probably never will) support it.

There are two issues with m3u8 streams:
- on iOS 3x devices they always play in full screen mode
- the implementation has changed over some of the iOS 4x versions

So, for any modern app, you may need three sets of code.

All that being said, can we make an audio streamer that works with m3u8 and TapLynx? Yes we can. Can we make one screen that supports m3u8 AND the regular streaming services? Probably, but it's much more complex.

I have implemented solutions where the m3u8 stream is just in a regular TapLynx rss feed and it plays fine. Are you wanting to have background playback or some other custom feature that TapLynx doesn't support?

JV said...

Just background playback on m3u8 stream would be great.

Colin said...

Walter, there's a minor typo in the readme: the customViewControllerClass needs to be "TAStreamingPlayerViewController", not "TAStreamingPlayer" as is listed. Easy to figure out but confused me for a few minutes. Thanks.

Post a Comment