You are here

function theme_emaudio_emaudio_preview in Embedded Media Field 5

File

contrib/emaudio/emaudio.module, line 381

Code

function theme_emaudio_emaudio_preview($field, $item, $formatter, $node, $options = array()) {
  if ($item['value'] && $item['provider']) {
    $embed = $item['value'];
    $width = $field['widget']['preview_width'] ? $field['widget']['preview_width'] : variable_get('emaudio_default_preview_width', EMAUDIO_DEFAULT_PREVIEW_WIDTH);
    $height = $field['widget']['preview_height'] ? $field['widget']['preview_height'] : variable_get('emaudio_default_preview_height', EMAUDIO_DEFAULT_PREVIEW_HEIGHT);
    $autoplay = $field['widget']['preview_autoplay'];
    $output = module_invoke('emfield', 'include_invoke', 'emaudio', $item['provider'], 'preview', $embed, $width, $height, $field, $item, $autoplay, $node, $options);
  }
  return $output;
}