When the screen resolution is changed, the console displays the message startLayout called but not LAYOUT_SCHEDULED currently: 2
and amp-img element is returned. If you stop and reload the page, the error disappears until you change the screen resolution again.
This only happens in amp-carousel version 0.2, in version 0.1 everything works without errors, but the sliders transition is too fast.
The error appears for dynamic attribute value ( if width = "auto"
or if layout = "responsive"
and so on ) with autoplay and type="slides".
For example:
<amp-carousel
type="slides"
layout="fixed-height"
height="300"
width="auto"
delay="2000"
autoplay>
...
or
<amp-carousel
type="slides"
layout="responsive"
height="300"
width="600"
delay="2000"
autoplay>
...
What can I do to fix this problem or is it a bug with the amp version?