You are here

function wijering4_accessible in SWF Tools 6.2

Determine if accessible links should be added below the Wijering player.

Parameters

$vars: The array of variables being processed.

$id: The id for the object being added.

Return value

An empty string, or markup containing the accessible links.

1 call to wijering4_accessible()
swfobject2_wijering4_accessible in swfobject2/swfobject2.module
Determine if accessible links should be added below the Wijering player.

File

wijering4/wijering4.module, line 363

Code

function wijering4_accessible(&$vars, $id) {

  // If the accessible option is set then add links to the page, respecting visibility setting
  if ($vars->flashvars['accessible']) {

    // Add css to enabled hiding of accessible controls
    drupal_add_css(drupal_get_path('module', 'wijering4') . '/wijering4.css');

    // Build content
    $return[] = $vars->flashvars['accessible_visible'] ? '<ul>' : '<ul class="wijering4-accessible-hidden">';
    $return[] = "<li><a href=\"javascript:document.getElementById('{$id}').sendEvent('PLAY');\">" . t('Play/pause') . '</a></li>';
    $return[] = "<li><a href=\"javascript:document.getElementById('{$id}').sendEvent('MUTE');\">" . t('Mute/unmute') . '</a></li>';
    $return[] = "<li><a href=\"javascript:document.getElementById('{$id}').sendEvent('STOP');\">" . t('Rewind and stop') . '</a></li>';
    $return[] = '</ul>';

    //Implode array to a string
    $return = implode($return, "\n");

    // Unset the accessible parameters from flashvars so they are not output
    unset($vars->flashvars['accessible'], $vars->flashvars['accessible_visible']);
  }
  else {
    $return = '';
  }

  // Return the result
  return $return;
}