function theme_mediaelement_video in MediaElement 7
Same name and namespace in other branches
- 7.2 mediaelement.module \theme_mediaelement_video()
Implements theme_mediaelement_video().
File
- ./
mediaelement.module, line 82 - Provides HTML5 video and audio elements using Mediaelement.js.
Code
function theme_mediaelement_video($variables) {
$output = '<div class="mediaelement-video">';
if (!empty($variables['settings']['description']) && !empty($variables['settings']['show_description']) && $variables['settings']['show_description'] != 'none') {
$description_markup = '<p class="mediaelement-description">' . $variables['settings']['description'] . '</p>';
}
$output .= '<video ' . drupal_attributes($variables['attributes']) . ' ></video>';
if (!empty($variables['settings']['show_description']) && $variables['settings']['show_description'] == 'above') {
$output .= $description_markup;
}
if ($variables['settings']['download_link']) {
$output .= '<div class="mediaelement-download-link"><a href="' . $variables['attributes']['src'] . '" download>' . filter_xss_admin($variables['settings']['download_text']) . '</a></div>';
}
if (!empty($variables['settings']['show_description']) && $variables['settings']['show_description'] == 'below') {
$output .= $description_markup;
}
$output .= '</div>';
return $output;
}