¿Cómo insertar o2 player en Amp HTML?


amp-o2-player


Una forma fácil de Embed o2 player en HTML Amp. Puede encontrar reproducción de videos desde aquí, como también la documentación de ayuda se puede encontrar en GitHub

1 Código de apertura

<!doctype html>
<html ⚡>
<head>
  <meta charset="utf-8">
  <script async src="https://cdn.ampproject.org/v0.js"></script>

2 Disposición

Inserte el siguiente script justo abajo del <head>


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

3 Uso básico

Para insertar el reproductor o2 player en su página HTML AMP es necesario agregar la etiqueta amp-02-player con dos parámetros obligatorios:

1    data-pid
2    data-vid or data-bcid

- Otros parámetros soportados son:

data-bid
data-macro
layout ( se recomienda el uso de respuesta )
width ( define la relación de aspecto del jugador )
height( define la relación de aspecto del reproductor )

Código

<amp-o2-player data-pid="579a115aa01b4d2db062aa85"
      data-bcid="545db032e4b0af1a81424b48"
      data-macros="m.playback=click"
      layout="responsive"
      width="480"
      height="270">
  </amp-o2-player>

Demostración


A continuación la estructura completa del código


<!doctype html>
<html ⚡>
<head>
  <meta charset="utf-8">
  <script async src="https://cdn.ampproject.org/v0.js"></script>
<script async custom-element="amp-o2-player" src="https://cdn.ampproject.org/v0/amp-o2-player-0.1.js"></script>
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
  <link rel="canonical" href="https://ampbyexample.com/components/amp-o2-player/" >
  <style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}</style><noscript><style amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style></noscript>
</head>
<body>
<amp-o2-player data-pid="579a115aa01b4d2db062aa85"
      data-bcid="545db032e4b0af1a81424b48"
      data-macros="m.playback=click"
      layout="responsive"
      width="480"
      height="270">
  </amp-o2-player>
</body>
</html>



Share:

Related post

Comentarios

Disqus

Disqus comments:


Facebook

Facebook comments: