function osmplayer_add_js in MediaFront 7
Same name and namespace in other branches
- 6.2 players/osmplayer/osmplayer.module \osmplayer_add_js()
- 6 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 669
Code
function osmplayer_add_js($player) {
// Add the javascript files.
$js_files = $player
->getJSFiles();
$playerPath = osmplayer_get_path() . '/';
foreach ($js_files as $js_file) {
drupal_add_js($playerPath . $js_file);
}
// Add the JavaScript for this player.
drupal_add_js($player
->getPlayerJS(), 'inline');
}