function jplayer_protect_jplayer_add_js in jPlayer 7.2
Same name and namespace in other branches
- 6 jplayer_protect/jplayer_protect.module \jplayer_protect_jplayer_add_js()
Implements hook_jplayer_add_js().
File
- jplayer_protect/
jplayer_protect.module, line 181 - Provides basic content protection for media files accessed with jPlayer.
Code
function jplayer_protect_jplayer_add_js() {
if (!variable_get('jplayer_protect', FALSE)) {
return;
}
$settings = array(
'jPlayer' => array(
'protect' => variable_get('jplayer_protect', FALSE),
),
);
drupal_add_js($settings, array(
'type' => 'setting',
));
return array(
'jplayer_protect' => array(
'#attached' => array(
'js' => array(
drupal_get_path('module', 'jplayer_protect') . '/jplayer-protect.js' => array(
'type' => 'file',
'scope' => 'footer',
'group' => JS_DEFAULT,
),
),
),
),
);
}