Displays a cloud-hosted JW Player.
<script async custom-element="amp-jwplayer" src="https://cdn.ampproject.org/v0/amp-jwplayer-0.1.js"></script>
height attributes determine the aspect ratio of the player embedded in responsive layouts.
<amp-jwplayer data-player-id="aBcD1234" data-media-id="5678WxYz" layout="responsive" width="16" height="9" > </amp-jwplayer>
Non-responsive layout is also supported.
<amp-jwplayer data-player-id="aBcD1234" data-playlist-id="5678WxYz" width="160" height="90" > </amp-jwplayer>
|data-player-id||JW Platform player id. This is an 8-digit alphanumeric sequence that can be found in the Players section in your JW Player Dashboard. (Required)|
|data-media-id||The JW Platform media id. This is an 8-digit alphanumeric sequence that can be found in the Content section in your JW Player Dashboard. (Required if |
|data-playlist-id||The JW Platform playlist id. This is an 8-digit alphanumeric sequence that can be found in the Playlists section in your JW Player Dashboard. If both |
|data-content-search||Denotes the type of the playlist. If contextual article matching is desired, use the value |
|data-content-backfill||Ensures that a search or contextual playlist always returns a result. If there are no relevant results for the given query, this parameter ensures that a list of trending videos are served instead. (Boolean with default: |
|data-player-querystring||A querystring of parameters that will be added to the player iframe src. This can be used for things like token signing.|
|data-player-param-*||An attribute that will be added as a query parameter to the player iframe src. |
Keys and values will be URI encoded. Keys will be camel cased.
|data-ad-cust-params||A JSON string of custom parameters to add to ad tags. |
|data-ad-macro-*||An attribute used to override the default value of macros in ad tags. Supported macros include: |
See JW Player's Ad Tag Targeting Macros for more information.
|data-config-plugin-url||A url string used to pass external JS plugins to the player.|
|data-config-skin-url||A url string used to pass external CSS skins to the player. See JW Player's CSS Skin Reference for more information.|
|data-config-json||A JSON string of a player config. This can be used to set specific configuration properties on the player. |
Advertising configurations can also be specified using this.
Media and Float on Scroll properties cannot be configured with this attribute. Update media properties in your JW Player Dashboard. See JW Player's Player Configuration Reference for more information.
For more details, see amp-consent documentation.
|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.|
For more details, see documentation on the docking extension itself.
|common attributes||This element includes common attributes extended to AMP components.|
See amp-jwplayer rules in the AMP validator specification.
您已多次阅读本文档，但它仍未能涵盖您的所有问题？也许其他人也这么觉得：在 Stack Overflow 上与他们联系。前往 Stack Overflow 发现错误或缺少功能？
AMP 项目强烈鼓励您参与并做出贡献！我们希望您能成为我们开放源代码社区的持续参与者，但我们也欢迎您对所热衷问题做出一次性贡献。前往 GitHub