You are here

function jplayer_volume_check in jPlayer 7.2

Element validation to check volume is between 0 and 100.

1 string reference to 'jplayer_volume_check'
jplayer_field_formatter_settings_form in ./jplayer.module
Implements hook_field_formatter_settings_form().

File

./jplayer.module, line 265
Provides an HTML5-compatible with Flash-fallback audio player.

Code

function jplayer_volume_check($element, &$form_state) {
  $value = $element['#value'];
  if ($value < 0 || $value > 100) {
    form_set_error($element, t('Volume must be a percentage between 0% and 100%.'));
  }
}