amphtml: amp-iframe with video player blocked when fixed on top
Hi, we are trying to put an amp-iframe element on page by absolute and fixed position at the bottom of the window. This amp-iframe contain ours video-audio player, without ad contents, but with the audio spoken version of the visited article. We receive error and so the iframe content blocked on a lot of devices:
dom.js:645 amp-iframe is not used for displaying fixed ad. Please use amp-sticky-ad and amp-ad instead.
On amp documentation i found that:
amp-iframe must not be used for the primary purpose of displaying advertising. It is OK to use amp-iframe for the purpose of displaying videos, where part of the videos are advertising. This AMP policy may be enforced by not rendering the respective iframes. Advertising use cases should use amp-ad instead…
It seems that engine amp recognize ours video-audio content like an ad content.
You can reproduce this by:
- Enable dev tools and device toolbar
- Choose IPhone 6/7/8 Plus item
- Visit this page https://www.repstatic.it/cless/main/rep21/2017-v1/poc/video-iframe-blocked.html
- Click on audio icon on the bottom left corner
Wrong situation:
Correct:
Thank you all for your help Bye Ivan
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 18 (11 by maintainers)
@iwoak for now, please go ahead with @jpettitt suggestion here: https://github.com/ampproject/amphtml/issues/18563#issuecomment-427461848
To @ericlindley-g for prioritization of amp-audio enhancement.
There are valid use-cases for amp-iframe in fixed position (e.g. customer support chatbox), but I’m not sure if (or how many) folks are doing that in the wild.
Before enforcing such a restriction we’d have to do an audit to understand the impact (and what use cases we would need to support instead). So far I’m not sure if the work to do that is worth the benefit of restricting amp-iframe to non-fixed, but happy to discuss more.