amp-o2-player
Introduction
Use the amp-o2-player
component to embed the o2 player into your AMP HTML files.
Setup
Import the amp-o2-player
component in the header.
<script async custom-element="amp-o2-player" src="https://cdn.ampproject.org/v0/amp-o2-player-0.1.js"></script>
Basic usage
To embed o2 player in your AMP HTML page you need to add amp-02-player
tag with two mandatory parameters:
-
data-pid
-
data-vid or data-bcid
Other supported parameters are:
-
data-bid
-
data-macros
-
layout (we recommend to use responsive)
-
width (defines aspect ratio of the player)
-
height (defines aspect ratio of the player)
<amp-o2-player data-pid="579a115aa01b4d2db062aa85" data-bcid="545db032e4b0af1a81424b48" data-macros="m.playback=click" layout="responsive" width="480" height="270">
</amp-o2-player>
需要进一步说明?
如果此页面上的说明未能涵盖您的所有问题,欢迎与其他 AMP 用户取得联系,讨论您的具体用例。
前往 Stack Overflow 一项无法解释的功能?AMP 项目强烈鼓励您参与并做出贡献!我们希望您能成为我们开放源代码社区的持续参与者,但我们也欢迎您对所热衷问题做出一次性贡献。
编辑 GitHub 上的示例-
Written by @KondratovSvyatoslav