ampproject / amphtml

The AMP web component framework.
https://amp.dev
Apache License 2.0
14.89k stars 3.89k forks source link

amp-carousel autoplay during prerender #28248

Open jridgewell opened 4 years ago

jridgewell commented 4 years ago

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 add pauseCallback and resumeCallback to them, so that we can pause/resume (and initially start) only when the doc is actually visible.

/cc @ampproject/wg-ui-and-a11y

caroqliu commented 4 years ago

Looked at the relevant carousels:

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

jridgewell commented 4 years ago

I had tested with amp-carousel v2, which will autoplay during prerender.

stale[bot] commented 3 years ago

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.

samouri commented 3 years ago

@jridgewell, which carousel? do we have a v2? do you mean 0.2?

stale[bot] commented 2 years ago

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.