You are here

function audiofield_check_audiowaveform_installed in AudioField 8

Check to see if AudioWaveForm is installed.

2 calls to audiofield_check_audiowaveform_installed()
audiofield_requirements in ./audiofield.install
Implements hook_requirements().
WavesurferAudioPlayer::renderPlayer in src/Plugin/AudioPlayer/WavesurferAudioPlayer.php
Renders the player.

File

./audiofield.module, line 160
Drupal Module: Audiofield.

Code

function audiofield_check_audiowaveform_installed() {

  // Check if shell_exec is callable (required for audiowaveform);
  if (is_callable('shell_exec') && stripos(ini_get('disable_functions'), 'shell_exec') === FALSE) {
    return substr(shell_exec('audiowaveform -v'), 0, 13) == 'AudioWaveform';
  }
  return FALSE;
}