You are here

function osmplayer_add_js in MediaFront 6.2

Same name and namespace in other branches
  1. 6 players/osmplayer/osmplayer.module \osmplayer_add_js()
  2. 7 players/osmplayer/osmplayer.module \osmplayer_add_js()

Helper function to add all the osmplayer javascript files.

1 call to osmplayer_add_js()
template_preprocess_osmplayer in players/osmplayer/osmplayer.module
The template preprocess function for the osm media player.

File

players/osmplayer/osmplayer.module, line 751

Code

function osmplayer_add_js($player) {

  // Cache the player path.
  $paths = osmplayer_get_player_paths();

  // Add the javascript files.
  $js_files = $player
    ->getJSFiles();
  foreach ($js_files as $js_file) {
    drupal_add_js($paths['playerPath'] . '/' . $js_file);
  }

  // Add the JavaScript for this player.
  drupal_add_js($player
    ->getPlayerJS(), 'inline');
}