function videojs_field_formatter_settings_summary in Video.js (HTML5 Video Player) 7.3
Same name and namespace in other branches
- 7.2 videojs.module \videojs_field_formatter_settings_summary()
Implements hook_field_formatter_settings_summary().
File
- ./
videojs.module, line 328 - Provides an HTML5-compatible with Flash-fallback video player.
Code
function videojs_field_formatter_settings_summary($field, $instance, $view_mode) {
$display = $instance['display'][$view_mode];
$settings = $display['settings'];
$output = t('Player dimensions: @widthxheight', array(
'@widthxheight' => !empty($settings['width']) && !empty($settings['height']) ? $settings['width'] . 'x' . $settings['height'] : t('default'),
));
if ($settings['centeredplaybutton']) {
$output .= '<br/>' . t('Center the big play button');
}
if ($settings['loop']) {
$output .= '<br/>' . t('Loop playback');
}
if ($settings['autoplay']) {
$output .= '<br/>' . t('Auto-play files on page load');
}
if ($settings['hidecontrols']) {
$output .= '<br/>' . t('Hide controls');
}
if (!empty($settings['preload'])) {
$output .= '<br/>' . t('Preload behavior') . ': ' . check_plain($settings['preload']);
}
if (!empty($settings['posterimage_field'])) {
$imageinstance = field_info_instance($instance['entity_type'], $settings['posterimage_field'], $instance['bundle']);
if ($imageinstance != NULL) {
$output .= '<br/>';
$output .= t('Poster image field') . ': ' . check_plain($imageinstance['label']);
}
}
if (module_exists('image')) {
$output .= '<br/>';
$image_styles = image_style_options(FALSE);
if (isset($image_styles[$settings['posterimage_style']])) {
$output .= t('Poster image style') . ': ' . check_plain($image_styles[$settings['posterimage_style']]);
}
else {
$output .= t('Poster image style') . ': ' . t('None');
}
}
return $output;
}