我正面临着一个使用brightcove media API在我的Drupal网站上制作视频库的问题。有人可以告诉我,我如何拉出作者的细节,日期张贴和有关视频的细节,我需要显示在我的页面上的视频。不知何故,我已经设法在我的页面上显示了视频,但我仍然在努力提取其他细节,并将其与我的视频一起显示在页面上。我在Drupal6工作,有人能帮我一下吗?
发布于 2012-03-21 02:08:34
您可能需要查看以下有用的链接:
http://opensource.brightcove.com/project/PHP-MAPI-Wrapper/ http://developer.brightcove.com/en/documentation
我不太明白你说的“作者”是什么意思,Brightcove目前不跟踪审计跟踪类型信息。例如,您不能查询谁上传了视频。仅属于视频的元数据。
假设"Author“是一个自定义字段,您可以通过执行如下调用来获取该信息:
/**
* 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;
}很抱歉来晚了,但也许这对其他人有帮助。
https://stackoverflow.com/questions/8326418
复制相似问题