ampproject / ampproject/amphtml
Show the poster image when the max-video-preview:0 meta tag is present
- Dominant language
- JavaScript
- Stars
- 14.9k
- Forks
- 4.1k
- PR merge metrics
- No merged PRs in 30d
Description
### Description
#38554 added support for the `max-video-preview` [meta tag](https://developers.google.com/search/docs/crawling-indexing/robots-meta-tag#max-video-preview) by ensuring that previews do not exceed the specified value. However, it did not add support for the case where the story contains `max-video-preview:0`. When the value is `0`, the story preview should either should show the poster image instead. The TODO for this logic exists in `amp-story-page.js` [here](https://github.com/ampproject/amphtml/blob/4ce3cd79520dbeaf5ed5364cbff58d3d71dee40e/extensions/amp-story/1.0/amp-story-page.js#L383).
### Reproduction Steps
Can be tested with a story that contains a `max-video-preview:0` meta tag
### Relevant Logs
_No response_
### Browser(s) Affected
_No response_
### OS(s) Affected
_No response_
### Device(s) Affected
_No response_
### AMP Version Affected
_No response_
Contributor guide
Research direction
Start in extensions/amp-story/1.0/amp-story-page.js at the TODO around line 383, and review the existing max-video-preview handling added for this story flow. Reproduce the issue with a story containing a max-video-preview:0 meta tag; done means the story shows its poster image instead of a video preview.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 52/100