Related Articles

Related Articles

Google AMP amp-brightcove
  • Last Updated : 16 Oct, 2020

The Brightcove Video Cloud is an online platform used to host videos. The amp-brightcove is an amp component which is used to embed a brightcove video perform player or a brightcove video cloud.

Required Scripts: Importing brightcove component in the header 

HTML

filter_none

edit
close

play_arrow

link
brightness_4
code

<script async custom-element="amp-brightcove" src=
</script>

chevron_right


 

Attributes:



  1. data-account: The Brightcove Video Cloud account ID.
  2. data-video-id: The Brightcove Video Cloud ID.
  3. data-player-id: The Brightcove player ID. This is a Globally Unique Identifier(GUID).
  4. data-playlist-id: The Brightcove Video Cloud playlist id. If both a playlist and a video are specified, the playlist takes preference over video.
  5. autoplay: If this attribute is specified then the video will start automatically.
  6. dock: If this attribute is specified and if the video is playing manually the video will be minimized. The amp-video-docking extension is required to use this attribute.

A brightcove video is embedded as given below, a data-account, data-video-id, data-player-id is required.

HTML

filter_none

edit
close

play_arrow

link
brightness_4
code

<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>

chevron_right


For brightcove player configuration instruction you can check the following Brightcove’s support documentation. https://amp.dev/documentation/components/amp-brightcove/?format=websites

Example:

HTML

filter_none

edit
close

play_arrow

link
brightness_4
code

<!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>

chevron_right


Output:




My Personal Notes arrow_drop_up
Recommended Articles
Page :