SWF Playlist module

This module let's you take a Podcast view you have created (or probably ANY audio podcast) and allow the JW Media Player 4 module (from the SWF tools module ) to play the audio feed as a playlist, automatically embedding the player as a block. Note that this is built for Drupal 6.

It does not have a lot of configuration options yet, you pretty much need to open up swf_playlist.tpl.php and modify it to suit the location of your feed.

swf_playlist.tpl.php

<?php
 
// get the location of the JW Media Player

  // this doesn't work, I'm not sure why
  // $player = url(drupal_get_path('module', 'swftools'). '/shared/flash_media_player/player.swf', array('absolute', TRUE));

  // you have to set this manually for now.  yech.
 
$player = "http://localhost/skywyatt/sites/all/modules/swftools/shared/flash_media_player/player.swf";

 
// get the default settings
 
$flashvars = _wijering4_flashvars($settings['name']);

 
// set the flashvars
 
$flashvars['file'] = url($settings['path'], array('absolute', TRUE));
 
$flashvars['autostart'] = $settings['autostart'] ? 'true' : 'false';
 
$flashvars['repeat'] = $settings['repeats'] ? 'true' : 'false';
 
$flashvars['playlist'] = 'over';
 
$flashvars['playlistsize'] = '40';

 
// add the fancy random image stuff while the audio file is playing
 
$flashvars['plugins'] = 'revolt-1';

 
// unset the name of the playlist
  // we don't want to confuse the JW Media player
 
$name = $settings['name'];
  unset(
$settings['name']);
  unset(
$settings['path']);

 
// change some default options
 
$settings['base'] = base_path();

 
$options = array(
   
'params' => $settings,
   
'flashvars' => $flashvars,
  );

 
// requires SWF tools module and JW Media Player 4 modules
 
print swf($player, $options);
?>

AttachmentSize
swf_playlist.tar.gz3.59 KB

Reply

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
4 + 8 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.