logga


8 Flex ampache player

[update2: I made a new page for the player, here, go there instead ]

I installed ampache awhile ago to be able to listen to my music from different locations. But I didn’t like the html front to browse the music and started to build one in flex 2 and amfphp instead. It fetches all the songs from the database first. 2000 songs becomes about 500kb in an amf collection which is almost nothing compare to one mp3. There are some really nifty things built into flex as dragdrop, column sorting, search with keyboard and so on.

[update: I made some changes during the week. The are no visual changes but a lot behind.
- Rewrote the code to use the Cairngorm framwork.
- enabled login
- catalog cache on clientside. The database is now stored as a local shared object and is not downloaded again unless requested. Later the update procedure could be automatic and only download the differences from the cache.
- some double click features. double click to add to playlist and play.
- a settings view. Its not really enabled that much but its there. ]

The sound spectrum visualization is a separate swf-file and is very easy to change to something nicer. Right now it’s a copy-paste of the adobe example.

You can see the result here, the username is here prewritten. It’s still very beta but it got the basics. browsing and listening to music. The music in the example are fetched from hype machine and lies public on the net. If you send me a mail I can delete them.

player.png

There are some things that need to be fixed to make it better:

- better integration with ampache. I disabled the login procedure and wrote some new files to be able to access the music and covers without login. The plan is to use the flexplayer without changes in the ampache code. [update: The login is enabled now and everything should be safe ]

- there are some security issues. [update: see above ]

- rewrite code to the Cairngorm framework. The code is about to grow. [update: done! the code is a lot bigger now in rows but simpler to follow]

- Include more of the ampache features. There is a lot missing in this version.

- Dragdrop of folders to the playlist doesn’t work perfect. When you drag something from the tree structure a request to the server is made to get the information about the tracks. If the result is not received before the drop, the playlist is not populated.

- better player, the buttons are not updated correct all the times.

- nicer stylesheet. need to sit down with the Flex2StyleExplorer.

- installation could be simpler, and an installation and compilation guide could be written

source:
ampache_player_02.rar
ampache_player_03.rar

[update2: newer verision here ]

if you never used flex before it can be a little tricky to get started. But if you not planing to change the code then you don’t have to compile. You can change the stylesheet without compiling. It can be built with “free” (not opensource) tools, the flex SDK, but flex builder 2 makes it a little bit easier.

There is also a thread in the ampache forum about the player. http://ampache.org/forums/viewtopic.php?pid=9273

8 Comments to “Flex ampache player”
  1. RustyCage, on January 26th, 2008 at 22:02:33, said:

    Wow. I love it. Looks alittle bit like vibestreamer.com wich is great.
    But without a login i don’t want to install it. Sorry.

  2. GarrettD, on January 29th, 2008 at 00:09:53, said:

    This looks awesome, I am looking forward to using it with my ampache installation. Keep up the good work.

  3. admin, on January 31st, 2008 at 12:16:35, said:

    I’m glad you like it. I made some updates and the login is now enabled. See above to read about the other updates.

  4. pic_micro, on February 8th, 2008 at 22:14:17, said:

    Hi - I tried version .03 with Ampache v.3.4-Beta2 and the songs don’t play.
    What version of ampache are you running?

    Thx

  5. admin, on February 11th, 2008 at 10:57:14, said:

    Can you browse the songs? see the covers? I have noticed some problem with guest accounts. Can you access the mp3 from the browser with
    http ://[domain]/ampache/play/userplay.php?song=[songid]&username=[username]&password=[pwd]

    I’m using 3.3.3.5. did you add the extra files in the ampache installation and kept the same folder structure as the zip?

    The easiest way to debug flash applications is to use a http debugging proxy as fiddler, charles or livehttpheaders. Charles can read amf but it’s shareware. The flash debug player can also be helpfull.

  6. pic_micro, on February 12th, 2008 at 21:52:54, said:

    Thanks. I’m using 3.4 so I checked userplay.php and somethings need to converted to that verision. Thanks any way for the pointers.

  7. admin, on February 15th, 2008 at 10:52:34, said:

    I have made a new version with som changes. It uses an own file to grab imags and mp3s now, the files in the ampache installation is not used anymore for playing. Other improvements are support for playlist and filtering.

  8. joeuser, on March 30th, 2008 at 04:25:35, said:

    Great app! Could we get last.fm support to work? Would it be easy with a call to Ampache’s Lastfm module?

Comment on this post below


You can leave a response, or trackback from your own site.