You are here

function minplayer_get_sources in MediaFront 7

Same name and namespace in other branches
  1. 7.2 players/minplayer/minplayer.module \minplayer_get_sources()

Return the media source.

1 call to minplayer_get_sources()
theme_minplayer in players/minplayer/minplayer.module
Theme a minPlayer.

File

players/minplayer/minplayer.module, line 39

Code

function minplayer_get_sources($type, &$params) {

  // If no node object exists, then get the node.
  if (!isset($params['nodeObj']) && isset($params['node']) && $params['node']) {
    $params['nodeObj'] = mediafront_get_node($params['node'], NULL);
  }

  // Return the media sources from this node.
  if (isset($params['nodeObj']) && isset($params['nodeObj']['mediafiles']) && !empty($params['nodeObj']['mediafiles'][$type])) {
    return $params['nodeObj']['mediafiles'][$type];
  }
  return '';
}