function brightcove_cck_player in Brightcove Video Connect 6
Same name and namespace in other branches
- 6.2 brightcove_cck/brightcove_cck.module \brightcove_cck_player()
Callback for brightcove_cck_player - checks access to the field and prints a player for Lightbox2.
Parameters
$node: Node object.
$field_name: Field that is being displayed.
$delta: Field delta.
Return value
none
1 string reference to 'brightcove_cck_player'
- brightcove_cck_menu in brightcove_cck/
brightcove_cck.module - Implementation of hook_menu().
File
- brightcove_cck/
brightcove_cck.module, line 106 - Brightcove CCK module provides a Content Construction Kit module to developers, allowing them to browse videos in their Brightcove Studio and upload them.
Code
function brightcove_cck_player($node, $field_name, $delta) {
if (node_access('view', $node) && content_access('view', $field_name)) {
$field = $node->{$field_name}[$delta]['video_id'];
$output = '<script src="http://admin.brightcove.com/js/BrightcoveExperiences.js" type="text/javascript"></script>';
$bc = _brightcove_initialize();
$output .= theme('brightcove_cck_embed', 'video', variable_get('brightcove_player', ''), variable_get('brightcove_player_key', ''), $field, array());
print $output;
}
}