ampproject / amphtml

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

[amp-story-player] Improve performance on players above the fold #32594

Open Enriqe opened 3 years ago

Enriqe commented 3 years ago

Follow up for https://github.com/ampproject/amphtml/issues/30990

Now that we have improved the scenario of the player below the fold https://github.com/ampproject/amphtml/issues/30990, we should improve the scenario of the player above the fold.

The problem is that currently we load the player right away when loading a page that embeds the player above the fold.

We can improve this by not loading the story initially, but rather show a poster image or similar UX treatment (see below screenshot, UX not final). When the user clicks on the player, then the story will start loading. This will also go nicely with https://github.com/ampproject/amphtml/issues/32524 is implemented.

We should probably enable this as a configurable option, since it can mean a breaking change for existing implementations.

/cc @ampproject/wg-stories

image

newmuis commented 3 years ago

I think we should not expose this API as "above the fold" vs "below the fold", but more just about the experience of the player itself. show vs. hide placeholder, autoplay vs. not autoplay, preload vs. not preloading, etc.

Enriqe commented 3 years ago

Agreed, we would not include this vocabulary in the API. But in the context of this issue I think it's important to note the difference in performance and the motivation behind this change.

stale[bot] commented 1 year 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.