ampproject / ampproject/amphtml

amp-carousel autoplay during prerender

Open
#28,248 6 comments 0 reactions 0 assignees View on GitHub
Component: amp-carousel P2: Soon Stale Type: Bug WG: components
Dominant language
JavaScript
Stars
14.9k
Forks
4.1k
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

Open the contributing guide

Research direction

Begin with the amp-carousel implementation and review the prerenderAllowed change in PR #28203. Trace the existing autoplay lifecycle and look for tests covering prerender visibility; done means the carousel does not advance while prerendered and resumes only when the document is visible.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.