amp-video-iframe 海报与占位符

amp-video-iframe poster vs placeholder

根据 amp-video-iframe 文档,poster 属性是必需的: https://amp.dev/documentation/components/amp-video-iframe/?format=websites

但是在官方示例页面中: https://github.com/ampproject/amphtml/blob/master/examples/amp-video-iframe.html Google 开发者改用 placeholder。 检查标签验证源代码,似乎这两个用例都是有效的: https://github.com/ampproject/amphtml/blob/master/extensions/amp-video-iframe/validator-amp-video-iframe.protoascii#L92

有谁知道占位符用例是允许还是应该避免?我找不到有关文档的其他信息

这不是必需的 - 这是文档中的错字。某事是否 required 取决于它是否在 AMP 中被视为有效。 validator不关心有没有,所以不需要。

来源:在 Google

从事 AMP