amphtml icon indicating copy to clipboard operation
amphtml copied to clipboard

Video poster background-size cover not working on Android

Open gmajoulet opened this issue 6 years ago • 1 comments

amp-video renders an extra element on Android to render a poster image. This element's does not center the poster image as it appears on non Androids.

This is especially visible during Story video prerendering, which can be tested here: https://www.gstatic.com/amphtml/stamp/qa/prerender-video.html?amp_js_v=0.1#origin=https://www.google.com&prerenderSize=1&visibilityState=prerender&paddingTop=0&p2r=0&horizontalScrolling=0&csi=1&aoh=15526927198732&viewerUrl=https://www.google.com&history=1&storage=1&cid=1&cap=swipe,navigateTo,cid,fragment,replaceUrl

Code rendering the extra image: https://github.com/ampproject/amphtml/blob/f134a84168e00b5dec63deb5bb70e9799e3cd4dc/extensions/amp-video/0.1/amp-video.js#L642-L667

Wrong: image is not centered on Android image

Expected: image is centered like on iOS image

cc @ampproject/wg-stories @alanorozco

gmajoulet avatar May 26 '20 22:05 gmajoulet

still repro on 2005220120000

Ichigo3d avatar Jun 02 '20 16:06 Ichigo3d