Révision d1c64ea8
Ajouté par Assos Assos il y a plus de 6 ans
drupal7/sites/all/modules/file_entity/file_entity.field.inc | ||
---|---|---|
34 | 34 |
'field types' => array('file'), |
35 | 35 |
'settings' => array( |
36 | 36 |
'controls' => TRUE, |
37 |
'controls_list' => array( |
|
38 |
'download' => 'download', |
|
39 |
'remote_playback' => 'remote_playback', |
|
40 |
), |
|
37 | 41 |
'autoplay' => FALSE, |
38 | 42 |
'loop' => FALSE, |
39 | 43 |
'preload' => '', |
... | ... | |
49 | 53 |
'field types' => array('file'), |
50 | 54 |
'settings' => array( |
51 | 55 |
'controls' => TRUE, |
56 |
'controls_list' => array( |
|
57 |
'fullscreen' => 'fullscreen', |
|
58 |
'download' => 'download', |
|
59 |
'remote_playback' => 'remote_playback', |
|
60 |
), |
|
52 | 61 |
'autoplay' => FALSE, |
53 | 62 |
'loop' => FALSE, |
54 | 63 |
'muted' => FALSE, |
... | ... | |
123 | 132 |
'#type' => 'checkbox', |
124 | 133 |
'#default_value' => $settings['controls'], |
125 | 134 |
); |
135 |
$element['controls_list'] = array( |
|
136 |
'#title' => t('Controls list'), |
|
137 |
'#type' => 'checkboxes', |
|
138 |
'#options' => array( |
|
139 |
'download' => t('Download'), |
|
140 |
'remote_playback' => t('Remote playback'), |
|
141 |
), |
|
142 |
'#default_value' => $settings['controls_list'], |
|
143 |
'#description' => t("Customize native media controls such as the download and remoteplayback buttons. Valid only if above \"Show audio controls\" setting is enabled.<br>Please note that not all browsers support this feature. Only Chrome 58+ and Opera 45+ supports it."), |
|
144 |
); |
|
126 | 145 |
$element['autoplay'] = array( |
127 | 146 |
'#title' => t('Autoplay'), |
128 | 147 |
'#type' => 'checkbox', |
... | ... | |
159 | 178 |
'#type' => 'checkbox', |
160 | 179 |
'#default_value' => $settings['controls'], |
161 | 180 |
); |
181 |
$element['controls_list'] = array( |
|
182 |
'#title' => t('Controls list'), |
|
183 |
'#type' => 'checkboxes', |
|
184 |
'#options' => array( |
|
185 |
'fullscreen' => t('Fullscreen'), |
|
186 |
'download' => t('Download'), |
|
187 |
'remote_playback' => t('Remote playback'), |
|
188 |
), |
|
189 |
'#default_value' => $settings['controls_list'], |
|
190 |
'#description' => t("Customize native media controls such as the download, fullscreen and remoteplayback buttons. Valid only if above \"Show video controls\" setting is enabled.<br>Please note that not all browsers support this feature. Only Chrome 58+ and Opera 45+ supports it."), |
|
191 |
); |
|
162 | 192 |
$element['autoplay'] = array( |
163 | 193 |
'#title' => t('Autoplay'), |
164 | 194 |
'#type' => 'checkbox', |
... | ... | |
231 | 261 |
elseif ($display['type'] === 'file_audio') { |
232 | 262 |
if (isset($settings['controls'])) { |
233 | 263 |
$summary[] = t('Controls: %controls', array('%controls' => $settings['controls'] ? 'visible' : 'hidden')); |
264 |
if (!empty($settings['controls_list'])) { |
|
265 |
$controls_list = array(); |
|
266 |
foreach ($settings['controls_list'] as $key => $value) { |
|
267 |
if ($value) { |
|
268 |
$controls_list[] = ucfirst(str_replace('_', ' ', $key)); |
|
269 |
} |
|
270 |
} |
|
271 |
if (!empty($controls_list)) { |
|
272 |
$summary[] = t('Controls list: %controls_list', array('%controls_list' => implode(', ', $controls_list))); |
|
273 |
} |
|
274 |
} |
|
234 | 275 |
} |
235 | 276 |
if (isset($settings['autoplay'])) { |
236 | 277 |
$summary[] = t('Autoplay: %autoplay', array('%autoplay' => $settings['autoplay'] ? t('yes') : t('no'))); |
... | ... | |
248 | 289 |
elseif ($display['type'] === 'file_video') { |
249 | 290 |
if (isset($settings['controls'])) { |
250 | 291 |
$summary[] = t('Controls: %controls', array('%controls' => $settings['controls'] ? 'visible' : 'hidden')); |
292 |
if (!empty($settings['controls_list'])) { |
|
293 |
$controls_list = array(); |
|
294 |
foreach ($settings['controls_list'] as $key => $value) { |
|
295 |
if ($value) { |
|
296 |
$controls_list[] = ucfirst(str_replace('_', ' ', $key)); |
|
297 |
} |
|
298 |
} |
|
299 |
if (!empty($controls_list)) { |
|
300 |
$summary[] = t('Controls list: %controls_list', array('%controls_list' => implode(', ', $controls_list))); |
|
301 |
} |
|
302 |
} |
|
251 | 303 |
} |
252 | 304 |
if (isset($settings['autoplay'])) { |
253 | 305 |
$summary[] = t('Autoplay: %autoplay', array('%autoplay' => $settings['autoplay'] ? t('yes') : t('no'))); |
... | ... | |
397 | 449 |
'#theme' => 'file_entity_file_audio', |
398 | 450 |
'#files' => $sources, |
399 | 451 |
'#controls' => $settings['controls'], |
452 |
'#controls_list' => $settings['controls_list'], |
|
400 | 453 |
'#autoplay' => $settings['autoplay'], |
401 | 454 |
'#loop' => $settings['loop'], |
402 | 455 |
'#preload' => $settings['preload'], |
... | ... | |
430 | 483 |
'#theme' => 'file_entity_file_video', |
431 | 484 |
'#files' => $sources, |
432 | 485 |
'#controls' => $settings['controls'], |
486 |
'#controls_list' => $settings['controls_list'], |
|
433 | 487 |
'#autoplay' => $settings['autoplay'], |
434 | 488 |
'#loop' => $settings['loop'], |
435 | 489 |
'#muted' => $settings['muted'], |
Formats disponibles : Unified diff
Weekly update of contrib modules