Open jridgewell opened 4 years ago
Looked at the relevant carousels:
amp-base-carousel
and amp-carousel:0.2
already implement pauseCallback
/resumeCallback
which handle auto-advance.amp-inline-gallery
basic, pagination, and thumbnail versions do not autoadvanceamp-stream-gallery
(experimental) does not autoadvanceOddly enough, amp-carousel:0.1
has had prerenderAllowed
all along and does not appear to have these callbacks for autoplay. 👀 I'll keep an issue open for that component but otherwise lowering the priority here since the recent change should not have affected prior behavior with respect to autoplay.
I had tested with amp-carousel v2, which will autoplay during prerender.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.
@jridgewell, which carousel? do we have a v2? do you mean 0.2?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.
Now that Carousels are
prerenderAllowed
(https://github.com/ampproject/amphtml/pull/28203), there's an unexpected behavior where carousels can auto advance during the prerender phase. I think we should probably addpauseCallback
andresumeCallback
to them, so that we can pause/resume (and initially start) only when the doc is actually visible./cc @ampproject/wg-ui-and-a11y