public function MediaBrightcoveStreamWrapper::interpolateUrl in Brightcove Video Connect 7.3
Same name and namespace in other branches
- 7.2 brightcove_media/MediaBrightcoveStreamWrapper.inc \MediaBrightcoveStreamWrapper::interpolateUrl()
File
- brightcove_media/
MediaBrightcoveStreamWrapper.inc, line 16 - Stream wrapper fro Brightcove videos.
Class
- MediaBrightcoveStreamWrapper
- @file Stream wrapper fro Brightcove videos.
Code
public function interpolateUrl() {
if ($video_id = $this
->getVideoID()) {
// @todo find out how to detect this url in a nice way, it might break any time
$pid = variable_get('brightcove_player_pid', NULL);
$player = brightcove_player_load($pid);
if ($player) {
return url('http://c.brightcove.com/services/viewer/federated_f9', array(
'query' => array(
'playerID' => $player->player_id,
'playerKey' => $player->player_key,
'isVid' => 'true',
'isUI' => 'true',
'@videoPlayer' => $video_id,
),
));
}
else {
watchdog('brightcove', 'Video Player is missing.', array(), WATCHDOG_ERROR);
}
}
return NULL;
}