I came across a post on drupal.org which included a flash MP3 player that can use playlists. And it took me only a few minutes to realize this would be a great use of Views — to do something with Views that is very much an alternative output format.

So I did it, and added it to the Views Bonus Pack.

An example is here. As you can see it can work as a page or a block (though that player is a bit large as a block. Or if you prefer the Drupal 5 version.

I checked this into the Views Bonus Pack tho of course it’ll take up to 8 hours for the tarball to regenerate. You can check out from CVS. It requires the audio module and this flash player. (which can be unpacked into the audio module directory).

Just as a note, I took the mp3 files from the demos offline; the playlist still shows up but no sound comes out. That's because my dev servers are hosted on my DSL and they were killing my bandwidth.

Comments

Is this related to the drupal playlist module? http://drupal.org/project/playlist ?

No, though it does a similar thing. This, though, lets you use a view, which gives you a lot more flexibility about exactly how your playlist is constructed.

NICE WORK!!!

I am really going to enjoy this!
Hooray for integrating dynamic flash with drupal... very cool.

Amazingly, I was able to get this thing working on my test site (here's an example) - Would be really sweet, if only I knew what I was doing!?! A few random questions...

I've been playing around with the playlist module, which uses the XSPF player. For consistency sake, it may be better to just use one player. Is it possible to use one or the other? If so, do you have any opinion regarding which one is best?

Also wondering if this type of functionality within Views will provide a way to dynamically generate playlists based on something like a certian content type or subject matter (ie sample tracks for an album review or spotlight on a particular artist, etc.) - a little more rambling/elaboration can be found here...

Thanks again for another great contribution!

Gus

I preferred this player to the XSPF player, but it doesn't take a great deal of effort to make the XSPF player work too; it's a fairly minor change to the function that sets up the player. Really what I should do is make it themeable and then provide the theme overrides for players that I know work.

As for customizing the playlist, that's what Views is best at. If you have some way to tie it all together. You can give the view an argument, so you can do some kind of related thing based on a CCK nodereference, or taxonomy, or by artist (err, assuming all of audio's fields are exported to Views; I think they are but I'm not 100% sure at the moment).

Based on what you've said, and what little I understand, it may not be too far fetched to replicate a lot of whats going on here!?! So many variations can be baked into a music-centric distribution or really any site that uses audio (and video?).

I posted over at the drupal arts and music group and hope we can expand on this very cool thing (I'll do what I can).

Thanks!
Gus

i'd love to put some themeability into the audio module. actually, how would you feel about forking off the audio specific for inclusion in the audio module?

Nice one, Earl. Hopefully this means I won't have to maintain playlist.module anymore ;)
My views experience is pretty limited; how easy would it be to create different feeds for each playlist? Here is the feeds.inc in playlist module for an example of what I mean.

farsheed

Actually that one should be *quite* easy, as we can set up the feed types through the basic feed selector. Actually for specialized feeds like that, one could create an 'audio feed selector' that provides all types of audio feeds. That code would probably only take someone a few hours -- check out views_rss.module which is quite short to get an idea of how pure feeds work.

(And actually, once feeds are created, the playlist plugin could probably be recoded to simply require the feed selector argument instead of using the strange hack that it uses now). Actually, to do this right the part that displays the flash player needs to be decoupled from views a bit anyway.

I spoke briefly with Colin about this last night, and he's in favor of this becoming part of audio.module too. I don't, personally, have a great deal of time to work on it but I can provide guidance and more code snippets!

I was wondering if you managed to get the alternative player from the Wordpress plugin (the one you mentioned in the Change audio player type post at Drupal.org) working in the audio module.

I think its a very good alternative too, but so far although I've got it appearing in the page and functioning -- no sound comes out.

I uploaded the Wordpress plugin player into the players folder (just the source, not the wordpress plugin), edited the template file in the way that works for the other player, and everything seems okay.

Except...nothing plays. The widget expands, says that its buffering, and shows 00.00.00 in the upper right corner above it. No sound comes out.

It is pointing to the correct swf file in the template code, but it still doesn't seem to work. Have any ideas on what might need to be fixed?

this needs an update to work with version 3 of the flash_mp3_player
some things changed,
I had to hard code the configuration flashvars and an xml playlist to get it to play...
any chance of getting a look at why the file= portion of $flashvars wouldnt work on version 3?

thanks

Hi,
I am very much a newbie and really could use any help you can throw my way.
I followed the directions on the Views Bonus module page on Drupal and still can not get the player to load the mp3 files.
I placed the flash mp3 player folder in my audio module folder.
Created a new View and selected audio:playlist and filtered by node:type->Audio, but still nothing. I enabled Block mode so I could view the player.
I really do not know what else to do.
Thanks for any help.
Heather

has anyone figured out how to get the flash mp3 player to work with the view bonus pack? Or know where to get the version of the player that still works?

NICE WORK!!!

I am really going to enjoy this!
Hooray for integrating dynamic flash with drupal... very cool.

Add new comment