You are here

function swftools_wijering4_swftools_playlist_jwplayer4 in SWF Tools 6.3

Implementation of hook_swftools_playlist_[player]().

File

wijering4/swftools_wijering4.module, line 263
Enables SWF Tools support for LongTail Player 4. This module also works with LongTail Player 5.

Code

function swftools_wijering4_swftools_playlist_jwplayer4($data) {

  // Get current defaults for the player
  $saved_settings = _swftools_wijering4_flashvars($data['othervars']['profile']);

  // Initialise a string to contain the elements
  $xml = '';

  // Iterate over the playlist to build elements xml
  foreach ($data['othervars']['playlist_data']['playlist'] as $track => $details) {
    if (!$details['image'] && $saved_settings['fillemptyimages']) {
      $details['image'] = theme('swftools_empty_image', $data);
    }

    // Create an individual xml element
    $xml .= theme('swftools_wijering4_playlist_element', $details, $saved_settings['imagecache_playlist'] == SWFTOOLS_UNDEFINED ? '' : $saved_settings['imagecache_playlist']);
  }

  // Add xml wrapper around the elements
  $xml = theme('swftools_wijering4_playlist_wrapper', $data['othervars']['playlist_data']['header'], $xml);

  // Return the resulting xml
  return $xml;
}