Amp-vimeo
Sematkan video Vimeo di file AMP HTML
1 Code
<!doctype html>
<html ⚡>
<head>
<meta charset="utf-8">
<script async src="https://cdn.ampproject.org/v0.js"></script>
2 Disposisi
Masukkan skrip amp-vimeo berikut tepat di bawah <head>
<script async custom-element="amp-vimeo" src="https://cdn.ampproject.org/v0/amp-vimeo-0.1.js"></script>
3 Penggunaan dasar
Salin kode ID unik dari video Vimeo melalui URL video. Disarankan untuk menggunakan desain responsif untuk video.
Misalnya, tautan berikut adalah video dari Vimeo:
https://player.vimeo.com/video/27246366
Anda harus menyalin ID video Anda misalnya 27246366, di dalam kode berikut
<amp-vimeo data-videoid="27246366"
layout="responsive"
width="16"
height="9"></amp-vimeo>
Demo:
Kemudian struktur kode lengkap
<!doctype html>
<html ⚡>
<head>
<meta charset="utf-8">
<script async src="https://cdn.ampproject.org/v0.js"></script>
<script async custom-element="amp-vimeo" src="https://cdn.ampproject.org/v0/amp-vimeo-0.1.js"></script>
<link rel="canonical" href="http://amphtmlejemplos.blogspot.com/2016/12/como-insertar-videos-de-vimeo-en-amp.html">
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
<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-vimeo data-videoid="27246366"
layout="responsive"
width="16"
height="9"></amp-vimeo>
</body>
</html>