You are here

function scald_audio_scald_prerender in Scald: Media Management made easy 7

Implements hook_scald_prerender().

File

modules/providers/scald_audio/scald_audio.module, line 184
Scald Audio is a Scald Atom Provider for audio files.

Code

function scald_audio_scald_prerender($atom, $context, $options, $mode) {
  if ($mode == 'atom') {
    $atom->rendered->player = theme('scald_audio_player', array(
      'vars' => array(
        'atom' => $atom,
        'audio_uri' => $atom->file_source,
        'thumbnail' => $atom->thumbnail_source,
      ),
    ));
  }
  elseif ($mode == 'player') {
    $atom->rendered->player = theme('scald_audio_html5', array(
      'vars' => array(
        'atom' => $atom,
        'audio_uri' => $atom->file_source,
        'thumbnail' => $atom->thumbnail_source,
      ),
    ));
  }
}