Java Applet question (want to know if this project is feasible)

Mucman

Diamond Member
Oct 10, 1999
7,246
1
0
In my sig is a link to my online radio station. If you look at the downloaded .m3u file, you will
see that it connects to my server on some port (that I have reserved for the stream). This works
great for most people, except for me :). When I am at work, the firewall blocks anything connecting
to that port. I have our firewall setup so that only port 22, 21, 80, and 443 can go out. Yes, I can
configure the firewall so I can connect, but that does not solve the problem for other potential listeners,
and I could use a fun programming project :)

What I would like to try is do basic HTTP streaming. Can a Java Applet make an HTTP connection
and connect to an audio device? What I would do is put the mp3s in a protected folder where it will
only accept the user agent given by the applet. If that isn't feasible I might look at writing a small
java based mp3 player.

Another way I could do it is with Flash, which I wouldn't mind trying. I really like how CBC Radio 3
does the streaming audio. You can undock the player and leave it in a small window. My friend is the
sysadmin there, and says that they use a lot of advanced Flash stuff to do it. Unfortunately it's Flash 6
so it doesn't work for me in FreeBSD (Flash wrapper only handles Flash 5 right now). I actually think
that this is a good application for Flash on the web.

Anyways, this is just what I was pondering while I was lying awake in bed last night at 2:30am. It's not
completly thought out yet, but I wouldn't mind hearing some feedback from some of you Java programmers
out there.
 

manly

Lifer
Jan 25, 2000
13,312
4,086
136
Apache HTTP Server can essentially "stream" mp3s to Winamp (et al) without any extra effort. There are other Web-based music streaming solutions available.

I can't imagine writing a Java applet to do what you described being worth the trouble.
 

jonmullen

Platinum Member
Jun 17, 2002
2,517
0
0
Its not that hard to do in flash...I have done some simpler flash stuff myself for music...like on this band's site I wrote this mp3 player....it loads the mp3's as flash movieclips dynamically encoded in mono so they are small and work great on dial up. http://www.thenancys.org/?p=music be it their music sucks IMO, but its a nice little app. I could give you some basic help if you decide to go that way.
 

Mucman

Diamond Member
Oct 10, 1999
7,246
1
0
I should have clarified a few things.

I want to implement my own streaming system. I don't want users to be able to change tracks. The songs must be
streamed in the order that I specify. My idea was to make my own proprietary playlist format in XML that that applet
would read. Of course I still have the issue on protecting my files from direct linking.

Oh, and writing an applet to do this is not trouble... just something I want to try out to learn some more Java. I already
have a streaming system that is working quite well. I just want to provide an alternative to that streaming method. I think
it would be cool to have 3 links (one for the .m3u file, another for the Java applet, and another for Flash)

 

Mucman

Diamond Member
Oct 10, 1999
7,246
1
0
jonmullen, the Flash stuff on that site isn't working for me in FreeBSD. I have no problems viewing sites like homestarrunner.com though. My first implementation will be done in Java if it is possible.