amp-springboard-player
Pelajari cara memasukkan video yang dihosting di platform video Springboard di file AMP Html.
1 Struktur
<!doctype html>
<html ⚡>
<head>
<meta charset="utf-8">
<script async src="https://cdn.ampproject.org/v0.js"></script>
2 Disposisi
Masukkan yang berikut ini script tepat di bawah <head>
<script async custom-element="amp-springboard-player" src="https://cdn.ampproject.org/v0/amp-springboard-player-0.1.js"></script>
Penggunaan dasar
Masukkan video yang dihosting di platform video melalui atribut data-situs-id, data-domain, data-pemain-id, data-konten-id. Atribut mode data digunakan untuk menentukan apakah itu adalah video tunggal atau daftar putar. Jika itu adalah daftar putar, atribut data-item menentukan jumlah item dalam daftar putar. Disarankan untuk menggunakan desain responsif untuk video.
Code
<amp-springboard-player data-site-id="261"
data-mode="video"
data-content-id="1578473"
data-player-id="test401"
data-domain="test.com"
data-items="10"
layout="responsive"
width="480"
height="270">
</amp-springboard-player>
Demo
FULL 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-springboard-player" src="https://cdn.ampproject.org/v0/amp-springboard-player-0.1.js"></script>
link rel="canonical" href="https://blogsgoblogger.blogspot.com/2016/11/cara-menyisipkan-video-yang-dihosting.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-springboard-player data-site-id="261"
data-mode="video"
data-content-id="1578473"
data-player-id="test401"
data-domain="test.com"
data-items="10"
layout="responsive"
width="480"
height="270">
</amp-springboard-player>
</body>
</html>