I have been using video_embed_brightcove, and needed to supply the 'link' parameter.

The 'link' parameter allows us to go to the video on the partner site, via a link at the bottom of the video player.

See the screenshot - in this case, the link would bring the user to the page on the partner website (servustv.com) where the video can be viewed.

So what I am trying to achieve, is to add an extra parameter (in my case "link") to the object tag's markup:

    <object id="myExperience" class="BrightcoveExperience">
      <param name="bgcolor" value="#FFFFFF">
      <param name="width" value="640">
      <param name="height" value="360">
      <param name="playerID" value="xxx">
      <param name="playerKey" value="xxx">
      <param name="isVid" value="true">
      <param name="isUI" value="true">
      <param name="dynamicStreaming" value="true">
      <param name="@videoPlayer" value="xxx">
      <param name="link" value="http://www.example.org/partnervideo-url">
    </object>

I would like to propose a patch which allows other modules to extend the object parameters via drupal_alter(), so that any parameter can be added by another module.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

michaellenahan created an issue. See original summary.

michaellenahan’s picture

Category: Feature request » Task
Status: Active » Needs review
FileSize
2.36 KB
55.22 KB

Here is the patch.

With the help of this patch, I was able to extend the parameters for brightcove in my own module, like this:

/**
 * Implements hook_video_embed_brightcove_settings_alter().
 */
function MY_MODULE_video_video_embed_brightcove_settings_alter(&$settings) {
  if ($node = menu_get_object()) {
    if (isset($node->field_video_partner_url[LANGUAGE_NONE][0]['url'])) {
      $settings['link'] = $node->field_video_partner_url[LANGUAGE_NONE][0]['url'];
    }
  }
}

That way - the admin using the website can put a URL in field_video_partner_url, and the value from this field is added as the 'link' parameter in the object tag in the html.

michaellenahan’s picture

Issue summary: View changes
michaellenahan’s picture

Issue summary: View changes