You are here

function jplayer_field_formatter_settings_summary in jPlayer 7.2

Implements hook_field_formatter_settings_summary().

File

./jplayer.module, line 276
Provides an HTML5-compatible with Flash-fallback audio player.

Code

function jplayer_field_formatter_settings_summary($field, $instance, $view_mode) {
  $display = $instance['display'][$view_mode];
  $settings = $display['settings'];
  $summary = '';
  if ($display['type'] == 'jplayer_player') {
    $summary = t('Single jPlayer instance');
    if ($settings['mode'] == 'playlist') {
      $summary = t('jPlayer Playlist');
      if (isset($settings['continuous']) && $settings['continuous'] == 1) {
        $summary .= t('(continuous)');
      }
    }
    if (isset($settings['autoplay']) && $settings['autoplay'] == 1) {
      $summary .= t('(autoplays)');
    }
    $summary .= '.';
  }
  return $summary;
}