1
paularmand
Maintaining a streaming connection
  • 2011/2/16 21:11

  • paularmand

  • Just popping in

  • Posts: 1

  • Since: 2011/2/16


Hi,

I've been looking around and comparing social CMS'es, but I'm unable to find a truly ajax-based framework. With other words, only some of the available gadgets are (or can be) ajax'ed, but I would like all the CMS's core modules/plugins to be ajax-based, so the user will never have to do a page reload. I believe this to be the only option to keep a radio player streaming constantly while browsing through the site, which is what I want.

My questions:
+ which of the core modules of Xoops are ajax?
+ could they be changed easily into an ajax version?
+ do you have other ideas to maintain the stream (apart from the no-options below)?

Note on "no-options": I consider iframes and popus to be no-options, since this would make the interface towards the player a clumsy design. If you feel different: please comment. I also do not know how iframe and popups will behave on a mobile site, which is another reason not to choose these options, but again, feel free to correct me.

Thank you,
Paul

2
crushdepth
Re: Maintaining a streaming connection
  • 2011/2/17 13:17

  • crushdepth

  • Just popping in

  • Posts: 2

  • Since: 2010/7/12


This falls in the 'other ideas' category. A good way to handle streaming is to offer a playlist file (.m3u) as a link. This is just a plain text file (with .m3u extension) that contains a list of URLs of soundtracks that you want to stream.

Basically the browser will hand off the playlist to the user's media player (or other relevant application), which will understand that it should start streaming the track. If the playlist contains multiple URLs, the user can skip back and forth between them in the player.

You can also stream video in this way. It's not ajax, but it is crazy simple and flexible, and it leaves the user's browser free.

On the programming side, you can dynamically generate a playlist file by sending a header, like:

header('Content-Type: audio/x-mpegurl audio/mpeg-url application/x-winamp-playlist audio/scpls audio/x-scpls; charset=iso-8859-1');
header("Content-Disposition:inline;filename=stream_soundtrack.m3u");
echo 
$url;
exit();




Login

Who's Online

190 user(s) are online (129 user(s) are browsing Support Forums)


Members: 0


Guests: 190


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits