5
votes

According to amp-video-iframe documentation the poster attribute is required: https://amp.dev/documentation/components/amp-video-iframe/?format=websites

But in the official example page: https://github.com/ampproject/amphtml/blob/master/examples/amp-video-iframe.html Google devs use a placeholder instead. Checking the tag validation source code, it seems that both use cases are valid: https://github.com/ampproject/amphtml/blob/master/extensions/amp-video-iframe/validator-amp-video-iframe.protoascii#L92

Does anyone know if the placeholder use case is allowed or it should be avoided? I cannot find additional information on the documentation

1
If it's valid it's validJay Gray
The above information seems to be inconsistent. I'd like to be sure that it will not become invalid in the future before using placeholders in multiple sites. I found also this for other tags: github.com/ampproject/amphtml/issues/6MarcoBiagi

1 Answers

1
votes

It is not required - that is a typo on the docs. Wether or not something is required is based on wether or not it is considered valid within AMP. The validator does not care if it is there or not, so it is not required.

source: work on AMP at Google