Paid affiliate advertisement

Bounty-$100.00: Enable Changing Audio_playlist Player under 5.2 w/ Latest Audio Module

butler - November 15, 2007 - 01:35

Bounty-$100.00: Enable Changing Audio_playlist Player under 5.2 w/ Latest Audio Module

Drupal 5.2

Audio 5.x-2.x-dev
pathauto-5.x-2.0-beta2
token-5.x-1.x-dev

... and if it matters:
Views 5.x-1.6
Swftools 5.x-1.1
xspf_playlist-5.x-0.5

Hi. We need to override the player for playlists generated by Audio_playlist.module (one of the sub-modules of the new Audio module) in the above described scenario. We have been wrestling with getting a playlist content type up and running w/ the new Audio module for some time now, finally succeeded in finding the right module versions, sorting out dependencies-though as a side issue, not sure if Swftools or even xspf_playlist are actually even needed-and adding necessary overrides in template.php:

//OVERRIDE TO DISPLAY AND PLAY PLAYLISTS IN PLAYER-

function foundation_audio_attach_list($nids, $teaser = FALSE) {
  drupal_add_css(drupal_get_path('module', 'audio_attach') .'/audio_attach.css');
  // generate an XSPF player for this playlist
  $player = audio_get_players('name', variable_get('audio_feeds_default_player', 'xspf_extended'));
  $playlist_url = url('node/' . arg(1) .'/xspf', NULL, NULL, TRUE);
  $output = theme($player['theme_xspf'], $playlist_url);

  foreach ($nids as $aid) {
    $audio = node_load($aid);
    $audio = node_prepare($audio, $teaser);
    $title = $audio->status ? l($audio->title, 'node/' . $audio->nid, NULL, NULL, NULL, TRUE) : check_plain($audio->title);
    $items[] = '<div class="title">'. $title .'</div>';
  }
  // removed individual players
  $output .= theme('item_list', $items, null, 'ol', array('class' => 'audio-attach-list'));
  return $output;
}

... but, we need to use a different player than the extended player-one capable of gap-less playback and which is skin-able or theme-able. We have been considering one of the Wijering players but so far cannot confirm gapless playback capability for that player. Any input on players and gap-less playback would also be greatly appreciated.

A link to an example below (dev site):

http://dev.majorglitch.hypermediative.net/?q=content/test-playlist

Ideally we would like our bounty to help sponsor development of a patch to add a player fitting the description above to the available choices under Administer | Site configuration | Audio settings | Players. However if that is not possible a theme override would probably do the trick. An earlier Issue posted on this by us w/ some minimal replies from people who know more than me:

http://drupal.org/node/175329

Project Background:

The genesis of this project, released in 1996, is Chris Butler's The Devil Glitch, a song which holds The Guinness Book of World Records Record as the "worlds longest pop song", was written w/ that object in mind, and is a collaboration w/ a large number of musicians-the author wrote a song, then wrote hundreds of 3 minute choruses and turned them over to everyone he knew (and he knows everyone in NYC and Hoboken NJ for starters) to do with as they would, reassembling them into a cd-length song.

Cut to 2007-the author and some collaborators are trying to create a a web-based interactive version of The Devil Glitch, The Major Glitch, where contributors can continue to extend it ad infinitum.

If you think you would like to be involved in this crazy scheme, making a hundred bucks and assuring your place in early 21st century pop history, please reply-thanks for taking the time to read this!

-the other Butler

you might want to ask zirafa

drewish - November 15, 2007 - 19:20

you might want to ask zirafa about this.

Asking Zirafa

butler - November 17, 2007 - 14:29

Thanks, I did, but he never calls, never writes, and I don't want to be a pest. Any input of your own Drewish? If someone could tell me how/where I could figure out which function(s) to override (can't find any documentation on functions for new audio module) I could probably figure out how to do it myself...

Hey Butler. There are many

zirafa - April 8, 2008 - 06:21

Hey Butler. There are many issues in the Audio module queue about how to override the theme function. If you want to see progress on this I would suggest posting it in the audio module issue queue where I am more likely to see it (I hardly ever check the forums).

Sorry I never call or write, I've been, um...washing my hair?

Seriously though, I have had plans to improve the playlist functionality but the fact that no solid release has been rolled with my playlist code, I am unwilling to add anymore functionality until it can get widespread testing as is. Unfortunately, the audio module has pretty much stalled in development and thus playlist development has as well.

You're kidding?!?

butler - April 10, 2008 - 21:34

That's crazy-there should be huge interest in this. For what it's worth IMHO your approach to putting this functionality together is right on and you're on the right track man. When you say widespread testing, is there anything a middling coder (I have yet to write anything for Drupal really, though I did write a PHP/MySQL CMS on own-it ain't pretty-in like 2003) can do to help move this forward?

Anyway thanks for the reply and I hope your hair is beautiful-tonight... tonight...

Hey, I am using

mike.hobo - January 29, 2008 - 04:05

Hey, I am using audio_playlist and I am using the Jeroen player.

But I used contemplate and some code..

My simple work around using

mike.hobo - April 8, 2008 - 18:31

My simple work around using the content templates module.

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8"
width="400" height="260"
id="playlistX">
<param name=movie value="../modules/audio/players/jeroenwijering.swf">
<param name=quality value="high">
<param name=bgcolor value="#000000">
<param name=allowFullScreen value="false">
<param name=swLiveConnect value="true">
<embed type="application/x-shockwave-flash"
pluginspage="http://www.macromedia.com/go/getflashplayer"
width="400" height="260" bgcolor="#000000"
name="playlistX"
src="../modules/audio/players/jeroenwijering.swf"
flashvars="file=../<?php print $node->links['audio_feeds_xspf_link']['href'] ?>&width=400&height=260&displaywidth=400&displayheight=45&autostart=true&showeq=true&volume=70&backcolor=0x000000&frontcolor=0xFFFFFF&lightcolor=0x0099cc">
</embed>
</object>

Notice things like

<?php
print $node->links['audio_feeds_xspf_link']['href']
?>
, after that you can add all the other things like body, author and all of that. If you don't know how to use contemplates then I could explain further. http://drupal.org/project/contemplate

Thanks Mike!

butler - April 10, 2008 - 21:26

This is probably exactly what we were looking for but we kind of gave up and have released an initial version of the site:

http://www.majorglitch.net/

... but I am going to run this by the rest of the dudes. I may try to take you up on your kind offer to explain further...

 
 

Drupal is a registered trademark of Dries Buytaert.