I am facing a problem related to making a video library on my Drupal website using brightcove media API . Can someone please tell me how do I pull out the details of author, date posted and details about the video which I need to display along with the video on my page. I have somehow managed to display the video on my page but I am still struggling with pulling out other details and displaying it along with my video on the page. For your information, I am working in Drupal 6. Can someone please help me out with this??
0
votes
1 Answers
1
votes
You might want to check out the following helpful links:
http://opensource.brightcove.com/project/PHP-MAPI-Wrapper/ http://developer.brightcove.com/en/documentation
I'm not sure I understand what you mean by "author", Brightcove currently does not track audit trail type info. For example you cannot query who uploaded the video. Only metadata that belongs to the video.
Assuming "Author" is a custom field, you can obtain that info by doing a call something like:
/**
* function custom_search() - search specified field for given value
* @param string [$term] - Required. The value to search for.
* @param string [$criteria] - any, all, or none. Default: any.
* @param string [$search_field] - Specify the field to look for the search term in. Default: search_text.
*/
/** Available search fields: display_name, reference_id, tag, custom_fields, search_text.
* Using search_text is the equivalent of searching displayName, shortDescription and longDescription fields
* and is also the same as omitting the field name altogether
*/
function custom_search($term, $criteria = 'any', $search_field = 'search_text') {
$bc = create_bcmapi();
$params = array(
'video_fields' => 'id,name,shortDescription,referenceId,tags,custom_fields'
);
$terms = array($criteria => $search_field.':'.$term);
$data['videos'] = $bc->search('video', $terms, $params);
return $data;
}
Sorry this is late, but maybe it will help someone else.