You are here

function theme_emaudio_audio_preview in Embedded Media Field 6

Same name and namespace in other branches
  1. 6.3 contrib/emaudio/emaudio.theme.inc \theme_emaudio_audio_preview()
  2. 6.2 contrib/emaudio/emaudio.theme.inc \theme_emaudio_audio_preview()

File

contrib/emaudio/emaudio.theme.inc, line 98
This defines the various theme functions for Embedded Audio Field (emaudio).

Code

function theme_emaudio_audio_preview($field, $item, $formatter, $node, $options = array()) {
  if ($item['value'] && $item['provider']) {
    $embed = $item['value'];
    $width = isset($options['width']) ? $options['width'] : (isset($field['widget']['audio_width']) ? $field['widget']['audio_width'] : variable_get('emaudio_default_audio_width', EMAUDIO_DEFAULT_PREVIEW_WIDTH));
    $height = isset($options['height']) ? $options['height'] : (isset($field['widget']['audio_height']) ? $field['widget']['audio_height'] : variable_get('emaudio_default_audio_height', EMAUDIO_DEFAULT_PREVIEW_HEIGHT));
    $autoplay = isset($options['autoplay']) ? $options['autoplay'] : $field['widget']['audio_autoplay'];
    $output = module_invoke('emfield', 'include_invoke', 'emaudio', $item['provider'], 'preview', $embed, $width, $height, $field, $item, $node, $autoplay, $options);
  }
  return $output;
}