-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add autoplay mode for amp-story #12815
Comments
The feedback from the design review was to take option 2. As a separate design consideration (not from the review), it may make sense to make this requirement go the other way as well: to disable automatic advancement in cases where it was explicitly specified. This will be useful to force determinism for testing in some cases. So, we at least want this construct to have three states (naming is temporary):
|
We have since added the |
Perhaps we can make the message |
This issue hasn't been updated in awhile. Do you have any updates? |
1 similar comment
This issue hasn't been updated in awhile. Do you have any updates? |
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. |
Reviving this -- we'd like to reconsider option 1 and determine the amount of effort needed to support this. The primary change to what is written above is that we'd like to, instead, make this However, given that previews are indeed user-visible, this new state would allow further customization to ensure that each component looks as users would expect while this state is active (e.g. videos can be played (assuming that their source(s) were able to be loaded)) |
/to @coreymasanto can this be closed? |
amp-story Autoplay Mode
Overview
We would like to have stories play inline in embedded contexts (e.g. feeds), automatically advancing through all pages in the story without any user interaction. If the user taps on the story, it can open full-screen, at which point the document is opened "normally", where the user can manually navigate between pages, and the story is most likely shown in a larger container.
Requirements
API Design
Option 1: New
PREVIEW
VisibilityStateWe add a new generic enum value to VisibilityState, like
PREVIEW
, where each component can optionally change its logic depending on its value. By default,PREVIEW
can be equivalent toVISIBLE
, unless the component overrides this behavior.amp-story
's autoplay mode then just becomes an implementation detail of how the amp-story component chooses to implement thePREVIEW
VisibilityState
.The
PREVIEW
state can be defined as the document being visible to the user, but being passively consumed (whereasVISIBLE
would mean the document is visible and actively consumed).Option 2: New fragment parameter and request name
We can add autoplay mode as its own new fragment parameter and message/request name. For example we can append
#autoplay=1
to the URL to initialize the state; to modify this state, the embedding context can send a message likeautoplayMode
with e.g. a boolean payload enabling/disabling the mode./cc @flaviori @christianbersch
The text was updated successfully, but these errors were encountered: