/
githubmirror
/
amphtml
Обзор
Документация
Войти
/
githubmirror
/
amphtml
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
examples/jwplayer.amp.html
217 строк
6 KB
Maria Maddox
✨ ✅ 🐛 Add new data attributes to `amp-jwplayer` (#35163)
09 сен 2021, 20:26
Не верифицирован
09 сен 2021, 20:26
e73aba1
Код
Авторство
О чём код?
<!DOCTYPE html> <html ⚡ lang="en"> <head> <meta charset="utf-8"> <title>JWPlayer AMP Example</title> <link rel="canonical" href="amps.html" > <meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1"> <meta property="og:title" content="title_tag" /> <link href='https://fonts.googleapis.com/css?family=Georgia%7COpen+Sans%7CRoboto' rel='stylesheet' type='text/css'> <script async custom-element="amp-video-docking" src="https://cdn.ampproject.org/v0/amp-video-docking-0.1.js"></script> <script async custom-element="amp-jwplayer" src="https://cdn.ampproject.org/v0/amp-jwplayer-0.1.js"></script> <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> <script async src="https://cdn.ampproject.org/v0.js"></script> </head> <body> <h2>JWPlayer AMP Examples</h2> <h3>Responsive</h3> <amp-jwplayer data-media-id="BZ6tc0gy" data-player-id="uoIbMPm3" layout="responsive" width="16" height="9" > </amp-jwplayer> <h3>Non-responsive, with a playlist</h3> <amp-jwplayer data-playlist-id="482jsTAr" data-player-id="uoIbMPm3" width="480" height="270" > </amp-jwplayer> <h3>Docking</h3> <amp-jwplayer data-media-id="CtaIzmFs" data-player-id="BjcwyK37" dock width="480" height="270" > </amp-jwplayer> <h3>Responsive contextual</h3> <amp-jwplayer data-player-id="BjcwyK37" data-media-id="CtaIzmFs" data-content-search="__CONTEXTUAL__" data-content-backfill="true" data-content-recency="9D" layout="responsive" width="16" height="9" > </amp-jwplayer> <h3>Non-Responsive, with a VAST Ad</h3> <amp-jwplayer data-media-id="NsdRZqng" data-player-id="WmASC9FK" width="480" height="270" > </amp-jwplayer> <h3>Non-Responsive, with an IMA Ad</h3> <amp-jwplayer data-media-id="3h8NHAIV" data-player-id="n6vw37Z7" width="480" height="270" > </amp-jwplayer> <h3>Custom Skin</h3> <amp-jwplayer data-media-id="CtaIzmFs" data-player-id="BjcwyK37" width="640" height="360" data-config-skin-url="https://playertest.longtailvideo.com/skins/ethan.css" > </amp-jwplayer> <h3>Custom Plugin</h3> <amp-jwplayer data-media-id="CtaIzmFs" data-player-id="BjcwyK37" width="640" height="360" data-config-plugin-url="https://playertest.longtailvideo.com/plugins/newsticker.js" > </amp-jwplayer> <h3>Custom JSON Ad Config</h3> <amp-jwplayer data-media-id="NsdRZqng" data-player-id="WmASC9FK" layout="responsive" width="16" height="9" data-config-json='{ "advertising": { "client": "vast", "schedule": [ { "tag": "http://playertest.longtailvideo.com/pre.xml", "offset": "pre" }, { "tag": "http://playertest.longtailvideo.com/mid.xml", "offset": "5" }, { "tag": "http://playertest.longtailvideo.com/post.xml", "offset": "post" } ] } }' > </amp-jwplayer> <h3>Custom JSON Config</h3> <amp-jwplayer data-media-id="CtaIzmFs" data-player-id="BjcwyK37" layout="responsive" width="16" height="9" data-config-json='{ "playbackRateControls": true, "displaytitle": false, "horizontalVolumeSlider": true }' > </amp-jwplayer> <h3>Custom IMA Ad Params</h3> <amp-jwplayer data-media-id="BZ6tc0gy" data-player-id="4MCKXmfU" width="640" height="360" data-ad-cust-params='{ "key1": "value1", "keyTest": "value2" }' > </amp-jwplayer> <h3>Custom VAST Ad Params</h3> <amp-jwplayer data-media-id="NsdRZqng" data-player-id="WmASC9FK" width="480" height="270" data-ad-cust-params='{"key1": "value1","keyTest": "value2"}' > </amp-jwplayer> <h3>Custom VAST Ad Macros</h3> <amp-jwplayer data-media-id="CtaIzmFs" data-player-id="BjcwyK37" layout="responsive" width="16" height="9" data-ad-macro-item-test='val' data-ad-macro-item-param-list='one,two,three' data-config-json='{ "advertising": { "client": "vast", "schedule": [ { "tag": "http://playertest.longtailvideo.com/pre.xml?domain=__domain__&test=__item-test__¶m=__item-param-list__", "offset": "pre" } ] } }' > </amp-jwplayer> <h3>External Controls</h3> <amp-jwplayer id="myVideo" data-media-id="CtaIzmFs" data-player-id="BjcwyK37" width="480" height="270" > </amp-jwplayer> <br /> <button on="tap:myVideo.play">Play</button> <button on="tap:myVideo.pause">Pause</button> <button on="tap:myVideo.mute">Mute</button> <button on="tap:myVideo.unmute">Unmute</button> <button on="tap:myVideo.fullscreen">FS</button> <br /> <h3>Query String and Data Params</h3> <amp-jwplayer data-media-id="BZ6tc0gy" data-player-id="uoIbMPm3" data-player-querystring='name1=abc&name2=xyz&name3=123' data-player-param-language="de" data-player-param-custom-ad-data="key:value;key2:value2" width="480" height="270" > </amp-jwplayer> </body> </html>