Do you build things with AMP? Fill out the AMP Developer Survey!



Displays an AOL O2Player.

Required Scripts

<script async custom-element="amp-o2-player" src=""></script>



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




data-pid (required) The Player ID for the O2Player.
data-bcid (required) The Buyer Company ID (bcid) for the O2Player.
data-bid The Playlist ID (bid) for the O2Player.
data-vid The Video ID (vid) for the O2Player.
data-macros The macros for the O2Player.
common attributes This element includes common attributes extended to AMP components.


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

The following lists validation errors specific to the amp-o2-player tag:

Validation Error Description
The 'example1' tag is missing or incorrect, but required by 'example2'. Error thrown when required amp-o2-player extension .js script tag is missing or incorrect.
The implied layout 'example1' is not supported by tag 'example2'. Error thrown when implied layout is set to CONTAINER; this layout type isn't supported.
The specified layout 'example1' is not supported by tag 'example2'. Error thrown when specified layout is set to CONTAINER; this layout type isn't supported.
The property 'example1' in attribute 'example2' in tag 'example3' is set to 'example4', which is invalid. Error thrown when invalid value is given for attributes height or width. For example, height=auto triggers this error for all supported layout types, with the exception of NODISPLAY.

Iframe inside amp-o2-player can send a message to receive consent data if a CMP is present on amp-o2-player parents page.

Example request for consent data from iframe:

    sentinel: 'amp',
    type: 'send-consent-data',

Example receive response for consent data:

function isAmpMessage(event, type) {
  return (
    event.source == window.parent &&
    event.origin != window.location.origin && && == 'amp' && == type

window.addEventListener('message', function (event) {
  if (!isAmpMessage(event, 'consent-data')) {
Besoin d'une aide supplémentaire ?

Vous avez lu ce document une douzaine de fois mais il ne répond pas à toutes vos questions ? D'autres personnes ont peut-être eu le même sentiment. Contactez-les sur Stack Overflow.

Se rendre sur Stack Overflow
Vous avez trouvé un bug ou une fonctionnalité manquante ?

Le projet AMP encourage fortement votre participation et vos contributions ! Nous espérons que vous deviendrez un membre régulier de notre communauté open source, mais nous serons également ravis de recevoir des contributions ponctuelles concernant les questions qui vous intéressent particulièrement.

Se rendre sur GitHub