You are here

function brightcove_embed_iframe_url in Brightcove Video Connect 7.6

Same name and namespace in other branches
  1. 7.7 brightcove.module \brightcove_embed_iframe_url()

Constructs an embed url for the iframe.

Parameters

string $account_id:

string $player_id:

string $embed:

string $brightcove_id:

string $type:

Return value

string

2 calls to brightcove_embed_iframe_url()
MediaBrightcoveVideoStreamWrapper::interpolateUrl in brightcove_media/includes/MediaBrightcoveVideoStreamWrapper.inc
theme_brightcove_field_formatter_iframe in ./brightcove_field.formatters.inc

File

./brightcove.module, line 3483
Brightcove module is an integration layer between any modules using Brightcove API. It makes all necessary checks for the API and makes settings available to the user.

Code

function brightcove_embed_iframe_url($account_id, $player_id, $embed, $brightcove_id, $type = BRIGHTCOVE_EMBED_TYPE_VIDEO) {
  $target = $type === BRIGHTCOVE_EMBED_TYPE_PLAYLIST ? 'playlistId' : 'videoId';
  $data_usage = "cms:drupal:" . VERSION . ":" . system_get_info('module', 'brightcove')['version'] . ":iframe";
  return "//players.brightcove.net/{$account_id}/{$player_id}_{$embed}/index.html?{$target}={$brightcove_id}&data-usage={$data_usage}";
}