Google AMP amp-brightcove
Опубликовано: 12 Апреля, 2022

Brightcove Video Cloud - это онлайн-платформа, используемая для размещения видео. Amp-brightcove - это компонент усилителя, который используется для встраивания проигрывателя видео-выступления brightcove или облака видео brightcove.
Required Scripts: Importing brightcove component in the header
HTML
<script async custom-element="amp-brightcove" src=</script> |
Атрибуты:
- data-account: идентификатор учетной записи Brightcove Video Cloud.
- data-video-id: идентификатор Brightcove Video Cloud.
- data-player-id: ID игрока Brightcove. Это глобальный уникальный идентификатор (GUID).
- data-playlist-id: идентификатор плейлиста Brightcove Video Cloud. Если указаны и плейлист, и видео, плейлист имеет приоритет над видео.
- autoplay: если этот атрибут указан, видео запустится автоматически.
- dock: если этот атрибут указан и видео воспроизводится вручную, видео будет свернуто. Для использования этого атрибута требуется расширение amp-video-docking.
A brightcove video is embedded as given below, a data-account, data-video-id, data-player-id is required.
HTML
<amp-brightcove data-account="906043040001" data-video-id="1401169490001" data-player-id= "180a5658-8be8-4f33-8eba-d562ab41b40c" layout="responsive" width="480" height="270"></amp-brightcove> |
Инструкцию по настройке плеера Brightcove вы можете найти в следующей документации по поддержке Brightcove. https://amp.dev/documentation/components/amp-brightcove/?format=websites
Example:
HTML
<!doctype html><html amp> <head> <meta charset="utf-8"> <title>Google AMP amp-brightcove</title> <script async src= </script> <!-- Import the Brightcove component in the header. --> <script async custom-element= "amp-brightcove" src= </script> <meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1"> <link rel="canonical" href= <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-brightcove data-account="906043040001" data-video-id="1401169490001" data-player-id= "180a5658-8be8-4f33-8eba-d562ab41b40c" layout="responsive" width="480" height="270"> </amp-brightcove></body> </html> |
Выход: