Creating Playlists using swftools_prepare_playlist_data

zapple - November 17, 2007 - 19:41
Project:SWF Tools
Version:5.x-1.x-dev
Component:SWF Tools
Category:support request
Priority:normal
Assigned:Unassigned
Status:won't fix
Description

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

#1

headkit - December 12, 2007 - 17:03

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...

#2

Stuart Greenfield - August 23, 2008 - 22:21
Status:active» 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.

 
 

Drupal is a registered trademark of Dries Buytaert.