Important: this documentation is not applicable to your currently selected format ads!
amp-brightcove
Description
Displays a Brightcove Video Cloud or Perform player.
Required Scripts
<script async custom-element="amp-brightcove" src="https://cdn.ampproject.org/v0/amp-brightcove-0.1.js"></script>
Supported Layouts
Usage
An amp-brightcove
component displays the Brightcove Player as used in Brightcove's Video Cloud or Brightcove Player.
The width
and height
attributes determine the aspect ratio of the player embedded in responsive layouts.
<amp-brightcove data-account="12345" data-player="default" data-embed="default" data-video-id="1234" layout="responsive" width="480" height="270" > </amp-brightcove>
Player Configuration
Make sure you configure players used with the AMP Support plugin to support AMP's video interface. See Brightcove's support documentation for player configuration instructions.
Component Attributes
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-referrer
Sets the referrer to be used for the Video Cloud analytics within the player.
Requires Brightcove Player version v6.25.0+. This supports AMP variables such as
EXTERNAL_REFERRER
.
data-param-*
All data-param-*
attributes will be added as query parameters 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
autoplay
If this attribute is present, and the browser supports autoplay, the video will be automatically played as soon as it becomes visible. There are some conditions that the component needs to meet to be played, which are outlined in the Video in AMP spec.
dock
Requires amp-video-docking
extension. If this attribute is present and the
video is playing manually, the video will be "minimized" and fixed to a corner
or an element when the user scrolls out of the video component's visual area.
For more details, see documentation on the docking extension itself.
data-block-on-consent
If amp-consent is used, adding data-block-on-consent="_till_responded"
will delay player load until the consent state is resolved. The consent state is passed to the player's iframe as query parameters for customisation of advertising implementations in the player. See Brightcove's support documentation for player configuration instructions.
Common attributes
This element includes common attributes extended to AMP components.
Validation
See amp-brightcove rules in the AMP validator specification.
Znasz już ten dokument na wylot i nadal nie znajdujesz w nim odpowiedzi na wszystkie pytania? Być może inni przeszli to samo: skontaktuj się z nimi na Stack Overflow.
Przejdź do Stack Overflow Udało Ci się trafić na błąd albo brakuje jakiejś funkcji?Zdecydowanie zachęcamy do wzięcia udziału! Choć mamy nadzieję, że staniesz się stałym uczestnikiem naszej społeczności open source, to z wdzięcznością przyjmiemy również każdy jednorazowy wkład w kwestie, które są Twoją pasją.
Przejdź do GitHub