function mediaelement_field_formatter_info in MediaElement 7
Same name and namespace in other branches
- 7.2 mediaelement.module \mediaelement_field_formatter_info()
Implements hook_field_formatter_info().
File
- ./
mediaelement.field.inc, line 11 - Field integration for the MediaElement module.
Code
function mediaelement_field_formatter_info() {
$formatters = array();
$formatters['mediaelement_video'] = array(
'label' => t('MediaElement Video'),
'field types' => array(
'file',
'link_field',
),
'settings' => array(
'features' => array(
'playpause' => variable_get('mediaelement_video_default_features_playpause', 1),
'current' => variable_get('mediaelement_video_default_features_current', 1),
'progress' => variable_get('mediaelement_video_default_features_progress', 1),
'duration' => variable_get('mediaelement_video_default_features_duration', 1),
'tracks' => variable_get('mediaelement_video_default_features_tracks', 1),
'volume' => variable_get('mediaelement_video_default_features_volume', 1),
'fullscreen' => variable_get('mediaelement_video_default_features_fullscreen', 1),
),
'volume' => variable_get('mediaelement_video_default_volume', 0.8),
'controls' => variable_get('mediaelement_video_default_controls', TRUE),
'show_description' => variable_get('mediaelement_video_default_description', 'none'),
'width' => variable_get('mediaelement_video_default_width', '640'),
'height' => variable_get('mediaelement_video_default_height', '385'),
'autoplay' => variable_get('mediaelement_video_default_autoplay', FALSE),
'loop' => variable_get('mediaelement_video_default_loop', FALSE),
'download_link' => variable_get('mediaelement_video_default_download_link', FALSE),
'download_text' => variable_get('mediaelement_video_default_download_text', t('Download')),
'preload' => variable_get('mediaelement_video_default_preload', 'none'),
),
);
$formatters['mediaelement_audio'] = array(
'label' => t('MediaElement Audio'),
'field types' => array(
'file',
'link_field',
),
'settings' => array(
'features' => array(
'playpause' => variable_get('mediaelement_audio_default_features_playpause', 1),
'current' => variable_get('mediaelement_audio_default_features_current', 1),
'progress' => variable_get('mediaelement_audio_default_features_progress', 1),
'duration' => variable_get('mediaelement_audio_default_features_duration', 1),
'tracks' => variable_get('mediaelement_audio_default_features_tracks', 1),
'volume' => variable_get('mediaelement_audio_default_features_volume', 1),
'fullscreen' => variable_get('mediaelement_audio_default_features_fullscreen', 1),
),
'volume' => variable_get('mediaelement_audio_default_volume', 0.8),
'controls' => variable_get('mediaelement_audio_default_controls', TRUE),
'show_description' => variable_get('mediaelement_audio_default_description', 'none'),
'width' => variable_get('mediaelement_audio_default_width', '300'),
'height' => variable_get('mediaelement_audio_default_height', '30'),
'autoplay' => variable_get('mediaelement_audio_default_autoplay', FALSE),
'loop' => variable_get('mediaelement_audio_default_loop', FALSE),
'download_link' => variable_get('mediaelement_audio_default_download_link', FALSE),
'download_text' => variable_get('mediaelement_audio_default_download_text', t('Download')),
'preload' => variable_get('mediaelement_audio_default_preload', 'none'),
),
);
return $formatters;
}