AMP

Important: this documentation is not applicable to your currently selected format email!

amp-powr-player

Description

An amp-powr-player component displays the Powr Player as configured in the Powr platform.

 

Required Scripts

<script async custom-element="amp-powr-player" src="https://cdn.ampproject.org/v0/amp-powr-player-0.1.js"></script>

Example

The width and height attributes determine the aspect ratio of the player embedded in responsive layouts.

Example:

<amp-powr-player
  data-account="12345"
  data-player="12345"
  data-video="12345"
  layout="responsive"
  width="480"
  height="270"
>
</amp-powr-player>

Attributes

data-account (required) The Powr account id.
data-player (required) The Powr player id.
data-video (required if data-terms isn't provided) The Powr video id. Normally a string if characters.
data-terms (required if data-video isn't provided) A space separated list of keywords that describe the page displaying the player. Used to fetch a playlist relevant to the site content.
data-referrer Sets the referrer to be used for analytics within the player. This supports AMP variables such as EXTERNAL_REFERRER.
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-geo="us"` becomes `&geo=us`
  • `data-param-custom-data="key:value;key2:value2"` becomes `&customData=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.
common attributes This element includes common attributes extended to AMP components.

Validation

See amp-powr-player rules in the AMP validator specification.

需要更多帮助?

您已多次阅读本文档,但它仍未能涵盖您的所有问题?也许其他人也这么觉得:在 Stack Overflow 上与他们联系。

前往 Stack Overflow
发现错误或缺少功能?

AMP 项目强烈鼓励您参与并做出贡献!我们希望您能成为我们开放源代码社区的持续参与者,但我们也欢迎您对所热衷问题做出一次性贡献。

前往 GitHub