You are here

function theme_mediafront_player in MediaFront 7

Same name and namespace in other branches
  1. 6.2 mediafront.module \theme_mediafront_player()
  2. 6 mediafront.module \theme_mediafront_player()
  3. 7.2 mediafront.module \theme_mediafront_player()

Implement the theme for the media player.

1 theme call to theme_mediafront_player()
theme_mediafront_player_formatter in includes/mediafront.field.inc
Theme for the Media Player field.

File

./mediafront.module, line 94

Code

function theme_mediafront_player($variables) {
  $entity = $variables['entity'];
  $preset = $variables['preset'];

  // Get the node for this player in JSON format.
  $params['nodeObj'] = mediafront_invoke_node($entity, array());

  // Also set the nodeId for those who cannot just use the object.
  $params['node'] = $entity->nid;

  // Nodes will never need the playlist.
  $params['disablePlaylist'] = true;

  // Return the player.
  return mediafront_get_player($preset, $params);
}