If amp-ima-video is loaded on a page, but not actually used, this breaks the AMP validation.
This is different behavior from amp-video, which can be loaded without having actual video on the page.
Implementing amp-ima-video load only on pages with video could be quite complicated on certain CMS-es.
If you repeat, but with actual video, validation passes.
In contrast:
All browsers
Current version
What's the issue?
If amp-ima-video is loaded on a page
How do we reproduce the issue?
Create sample AMP page and include amp-ima-video
What browsers are affected?
A
Which AMP version is affected?
Current
This is by design, most amp components need both the script tag and at least one usage tag to be valid. amp-video does not enforce this for historical backward compatibility reasons.
Well, except that there is ad before the video, there is no much difference between AMP VIDEO and AMP IMA VIDEO. It is logical that both work in the same way...
@cycleos I agree with you that they are the same, however, as mentioned, the discrepancy is due to historical backward compatibility issues (amp-video used to be a built-in component and did not require a script until 2 years ago when we changed that but had to keep it backward compatible).
The reason we prevent including the script without using the tag is purely for performance. There is no point in browser downloading and parsing a JS file that will be thrown away.
Most helpful comment
What's the issue?
If amp-ima-video is loaded on a page
How do we reproduce the issue?
Create sample AMP page and include amp-ima-video
What browsers are affected?
A
Which AMP version is affected?
Current