AMP

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

amp-minute-media-player

Description

Displays a Minute Media player.

Required Scripts

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

Example

Example with RESPONSIVE layout - width and height attributes determine the aspect ratio of the player embedded.

<amp-minute-media-player
  data-content-type="curated"
  data-content-id="fSkmeWKF"
  width="500"
  height="334"
  layout="responsive"
  autoplay
>
</amp-minute-media-player>

Example with FIXED layout - fixed width and height.

  <amp-minute-media-player
    data-content-type="semantic"
    data-scanned-element-type="tag"
    data-scanned-element="post-body"
    layout="fixed" width="500" height="334"
  </amp-minute-media-player>

Attributes

data-content-type

The Minute Media player type.

The options are 'specific' or 'semantic' .

Choose 'specific' in order to play specific content (insert the content id in the data-content-id attribute).

By choosing 'semantic' the playlist will be automatically created and match the content of the article to the most relevant video in real time.

data-content-id

The Minute Media player id.

This data is required only if you choose playing specific content (in the data-content-type).

data-scanned-element-type

Choose the defining characteristic (class-name, tag-name or id) when pairing content with the video.

This data is reflected only if you choose playing semantic content (in the data-content-type).

data-scanned-element

Choose the specific element accoring to the choosen scanned element type to be considered when pairing content with the video.

This data is reflected only if you choose playing semantic content (in the data-content-type).

data-tags

Tags that taken into consideration when the decision which video content to play is made (in 'semantic' content type).

This data is reflected only if you choose playing 'semantic' content (in the data-content-type).

data-minimum-date-factor

This data reflects the last number of days the engine should take into consideration when searching for a matching video. Older videos will receive a lower score

This data is reflected only if you choose playing 'semantic' content (in the data-content-type).

data-scoped-keywords

This data is responsible to return only videos with the specified tags in the matching results.

This data is reflected only if you choose playing 'semantic' content (in the data-content-type).

autoplay

If this attribute is present, and the browser supports autoplay:

  • the video is automatically muted before autoplay starts
  • when the video is scrolled out of view, the video is paused
  • when the video is scrolled into view, the video resumes playback
  • when the user taps the video, the video is unmuted
  • if the user has interacted with the video (e.g., mutes/unmutes, pauses/resumes, etc.), and the video is scrolled in or out of view, the state of the video remains as how the user left it. For example, if the user pauses the video, then scrolls the video out of view and returns to the video, the video is still paused..

dock

If this attribute is present and the video is playing manually, the video will be "minimized" and fixed to a corner when the user scrolls out of the video component's visual area.

  • The video can be dragged and repositioned by the user on a different corner.
  • Multiple videos on the same page can be docked.
In order to use this attribute, the amp-video-docking extension script must be present:

Validation

See amp-minute-media-player rules in the AMP validator specification.

需要更多帮助?

您多次阅读的资料未能涵盖您的所有问题?也许其他人也这么觉得 在 Stack Overflow 上与他们取得联系。

前往 Stack Overflow
找到一个 bug 或者缺失某项功能?

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

前往 GitHub