I've a basic playlist working using Audiofield and SWFTools by doing the following:

<?php 
	if ($node->field_track_1[0]['view'] != NULL) {	
		foreach ((array)$node->field_track_1 as $item) { 
			$items[] = "profile/audio/" . $item['filename'];
   	}
		$playlist = swftools_prepare_playlist_data($items);
		
		print swf_list($playlist, '204x90'); 
	}		  	
?>

However I need to be able to control what is put into the different XSPF playlist elements. For example in the following fields:

 <title>filename</title>
 <info></info>
 <location>filepath</location>

Is there a way to parse more information to the swftools_prepare_playlist_data function? If so how?

Any help would be greatly appreciated.

Cheers
Zap

Comments

headkit’s picture

i think with the combination of

  • mediafield.module: for uploading multiple audiofiles to a node
  • mediafield_display.module: for inserting the player
  • xspf_playlist.module: for generating the playlist.

you don't need swftools anymore for playing lists of mediafiles.
the clue is to get the uploaded mp3-files become handled as files for they can be listed via the xspf_playlist.module.
but ask me how...

Stuart Greenfield’s picture

Status: Active » Closed (won't fix)

At the moment you can't pass additional data to the playlist generator. You could alternatively generate your own xml play list and pass this in to a player.

At the moment I don't have any plans to enhance the xml playlist mechanism in SWF Tools. It's designed to be fairly simple, and adding highly customisable xml generation makes the module very complex.