AMP Videos – Stuck at 400px height
-
I’m having issues with the video code block & AMP (Using the default TwentyTwenty WP Theme & the AMP Plugin)
If I create a video block, add a link to the mp4, and select to have the block to “Wide Width” or “Full Width”, and no matter what type of AMP layout I select I can’t make the video fill in the width of the element, because it is forced to 400px height. This does not happen for example for a Vimeo Embed.
If I select a “responsive” AMP Layout, the video doesn’t appear at all.
As an example, for a default Video Block with a link set to “Wide Width” and “Default” AMP Layout, I get this code:
<figure class="wp-block-video alignwide"> <amp-video autoplay="" loop="" muted="" preload="auto" src="https://test-videos.co.uk/vids/bigbuckbunny/mp4/h264/1080/Big_Buck_Bunny_1080_10s_1MB.mp4" height="400" layout="fixed-height" width="auto" class="i-amphtml-layout-fixed-height i-amphtml-layout-size-defined i-amphtml-element i-amphtml-media-component i-amphtml-video-interface i-amphtml-layout" style="height:400px;" i-amphtml-layout="fixed-height"> <a href="https://test-videos.co.uk/vids/bigbuckbunny/mp4/h264/1080/Big_Buck_Bunny_1080_10s_1MB.mp4" fallback="">https://test-videos.co.uk/vids/bigbuckbunny/mp4/h264/1080/Big_Buck_Bunny_1080_10s_1MB.mp4</a> <noscript> <video autoplay loop muted preload="auto" src="https://test-videos.co.uk/vids/bigbuckbunny/mp4/h264/1080/Big_Buck_Bunny_1080_10s_1MB.mp4" playsinline></video> </noscript> <video playsinline="" webkit-playsinline="" preload="auto" class="i-amphtml-fill-content i-amphtml-replaced-content" loop="" src="https://test-videos.co.uk/vids/bigbuckbunny/mp4/h264/1080/Big_Buck_Bunny_1080_10s_1MB.mp4"></video> <i-amphtml-video-icon class="amp-video-eq amp-video-eq-play"> <div class="amp-video-eq-col"> <div class="amp-video-eq-filler amp-video-eq-1-1"></div> <div class="amp-video-eq-filler amp-video-eq-1-2"></div> </div> <div class="amp-video-eq-col"> <div class="amp-video-eq-filler amp-video-eq-2-1"></div> <div class="amp-video-eq-filler amp-video-eq-2-2"></div> </div> <div class="amp-video-eq-col"> <div class="amp-video-eq-filler amp-video-eq-3-1"></div> <div class="amp-video-eq-filler amp-video-eq-3-2"></div> </div> <div class="amp-video-eq-col"> <div class="amp-video-eq-filler amp-video-eq-4-1"></div> <div class="amp-video-eq-filler amp-video-eq-4-2"></div> </div> </i-amphtml-video-icon> </amp-video> </figure>
With the container having
max-width: 100%; height: 400px
and the video being positioned to fill in the space usingposition: absolute; top: 0; bottom: 0; left: 0; right: 0
- The topic ‘AMP Videos – Stuck at 400px height’ is closed to new replies.