Web-based DAAP client

Viewing 10 posts - 1 through 10 (of 76 total)
  • Author
  • #67

    I want to listen to my music on different computers (e.g. at the university) and I can’t install programs on them (most of them run Linux or Solaris so iTunes isn’t even available). The solution I came up with was AppleRecords by Chris Davies. It’s written in Java and is a great companion to mt-daapd. Anyway, I wanted to be able to stream music without having to download and install anything so I modified the program into an applet instead. It’s a one-night hack, it’s ugly, but it works (if there is interest I can polish the code and publish it). Then I got the idea, what if a DAAP client was hosted by the mt-daapd itself (like the VNC server)?

    Anyway, is there interest for a web-based DAAP client?

    Feel free to contact me if you have some comments.


    That’s a really cool idea.

    how much did you have to hack it to make it an applet? And are the changes non-intrusive enough that they would be accepted upstream?

    I’d be really interested in that.

    — Ron


    I had to remove large parts of the code (rendezvous stuff, downloading, …) to make the code “applet-safe” (an applet can only connect to the same host as the web server that hosts the applet, and obviously no file writing etc). Basically, the GUI stuff is more or less rewritten while I kept the basic protocol code untouched (they were nicely separated in different packages). I also started looking into adding Ogg Vorbis to it (I like that format ๐Ÿ™‚ ).

    Right now the GUI is in HTML using Javascripts and to control playback etc. The applet is essentially one big listbox control.
    Here is an example: http://www.petzall.se/daap-applet.png


    I managed to find some spare time I don’t have ๐Ÿ˜‰ and put together some kind of GUI for the applet. I have even made a home page for it

    Please, anyone try it out if you want, feedback is valued.

    Ogg vorbis works too (it was really easy to do thanks to javazoom)!

    Post edited by: rickard, at: 2005/06/08 01:34


    Okay.. I’m not very java-ie.

    What’s this mean?

    java.lang.UnsupportedClassVersionError: org/petzall/daapapplet/DAAPApplet (Unsupported major.minor version 49.0)
    at java.lang.ClassLoader.defineClass0(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
    at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:143)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
    at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:123)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
    at sun.applet.AppletClassLoader.loadCode(AppletClassLoader.java:561)
    at sun.applet.AppletPanel.createApplet(AppletPanel.java:631)
    at sun.plugin.AppletViewer.createApplet(AppletViewer.java:1953)
    at sun.applet.AppletPanel.runLoader(AppletPanel.java:560)
    at sun.applet.AppletPanel.run(AppletPanel.java:298)
    at java.lang.Thread.run(Thread.java:552)

    Okay.. nm… looks like Safari insists on using 1.4, not 1.3, despite the hint in the tag. Stupid.

    Firefox looks like this, though (at least it comes up in 1.3, anyway…)

    java.util.MissingResourceException: Can't find resource for bundle sun.applet.resources.MsgAppletViewer, key appletpanel.badattribute.exception
    at java.util.ResourceBundle.getObject(ResourceBundle.java:377)
    at java.util.ResourceBundle.getString(ResourceBundle.java:349)
    at sun.applet.AppletMessageHandler.getMessage(AppletMessageHandler.java:37)
    at sun.applet.AppletPanel.showAppletStatus(AppletPanel.java:715)
    at sun.applet.AppletPanel.init(AppletPanel.java:181)
    at sun.plugin.AppletViewer.init(AppletViewer.java:481)
    at com.apple.mrj.JavaEmbedding.JE_AppletViewerPanel.init(JE_AppletViewerPanel.java:48)
    at com.apple.mrj.JavaEmbedding.JE_AppletViewer.(JE_AppletViewer.java:152)
    at com.apple.mrj.JavaEmbedding.JE_AppletViewerFactory.createAppletViewer(JE_AppletViewerFactory.java:81)
    at com.apple.mrj.JavaEmbedding.JE_AppletViewer.createWithAttributes(JE_AppletViewer.java:424)
    at com.apple.mrj.JavaEmbedding.JavaEmbedding.createApplet(JavaEmbedding.java:429)


    Cool idea B) I want this to work ๐Ÿ˜€

    With version Firefox 1.0.4 (JRE 1.4.2_04) I always get “Unsupported major.minor version 49.0” as well.

    (both with your non-valid-html sample code and strict ‘applet’-only html)


    Stupid me. I compiled it with JRE 1.5. The tag should read 1.5, not 1.3. I guess my Firefox ignores that tag too.

    I will compile it with 1.3 later on if possible.


    This sounds like an ace idea … what a string to the bow it would be to have option to connect to a Java applet run by mt-daapd itself.

    All your music, anytime, anywhere.

    Top stuff.


    Now I have recompiled the applet with -version 1.3 so it should run on most browsers (I tested with JRE 1.4.2_01/1.5.0_02-b09, Linux/Solaris/Win32 and the applet loaded on those and played music on atleast the Win32 systems(the others had no speakers)).

    I also had the opportunity to write an ant script so its easier to recompile and included a sample with the applet tag in the source.

Viewing 10 posts - 1 through 10 (of 76 total)
  • The forum ‘Feature Requests’ is closed to new topics and replies.