Description | An amp-brightcove component displays the Brightcove Player as used in Brightcove's Video Cloud or Perform products. |
Availability | Stable |
Required Script | <script async custom-element="amp-brightcove" src="https://cdn.ampproject.org/v0/amp-brightcove-0.1.js"></script> |
Examples | brightcove.amp.html |
The following lists validation errors specific to the amp-brightcove
tag
(see also amp-brightcove
in the AMP validator specification:
Validation Error | Description |
---|---|
TAG_REQUIRED_BY_MISSING | Error thrown when required amp-brightcove extension .js script tag is missing or incorrect. |
MANDATORY_ATTR_MISSING | Error thrown when data-account attribute is missing. |
IMPLIED_LAYOUT_INVALID | Error thrown when implied layout is set to CONTAINER ; this layout type isn't supported. |
SPECIFIED_LAYOUT_INVALID | Error thrown when specified layout is set to CONTAINER ; this layout type isn't supported. |
INVALID_PROPERTY_VALUE_IN_ATTR_VALUE | Error thrown when invalid value is given for attributes height or width . For example, height=auto triggers this error for all supported layout types, with the exception of NODISPLAY . |
The width
and height
attributes determine the aspect ratio of the player embedded in responsive layouts.
Example:
<amp-brightcove
data-account="12345"
data-player="default"
data-embed="default"
data-video-id="1234"
layout="responsive"
width="480" height="270">
</amp-brightcove>
data-account
The Brightcove Video Cloud or Perform account id.
data-player or data-player-id
The Brightcove player id. This is a GUID, shortid or "default". The default value is "default".
data-player
is preferred. data-player-id
is also supported for backwards-compatibility.
data-embed
The Brightcove player id. This is a GUID or "default". The default value and most common value is "default".
data-video-id
The Video Cloud video id. Most Video Cloud players will need this.
This is not used for Perform players by default; use it if you have added a plugin that expects a videoId
param in the query string.
data-playlist-id
The Video Cloud playlist id. For AMP HTML uses a video id will normally be used instead. If both a playlist and a video are specified, the playlist takes precedence.
This is not used for Perform players by default; use it if you have added a plugin that expects a playlistId
param in the query string.
data-param-*
All data-param-*
attributes will be added as query parameter to the player iframe src. This may be used to pass custom values through to player plugins, such as ad parameters or video ids for Perform players.
Keys and values will be URI encoded. Keys will be camel cased.
data-param-language="de"
becomes&language=de
data-param-custom-ad-data="key:value;key2:value2"
becomes&customAdData=key%3Avalue%3Bkey2%3Avalue2
This script should be added to the configuration of Brightcove Players used with this component. This allows the AMP document to pause the player. Only the script need be added, no plugin name or JSON are needed.