All Collections
Developer documentation and guidance
Using Omny Studio embeds with Google AMP or Apple News
Using Omny Studio embeds with Google AMP or Apple News
Written by Del
Updated over a week ago

Google AMP

Google AMP allows publishers to include rich media content on pages using iframes, however publishers must use the special <amp-iframes>  element.

Fixed height layout
AMP iframes by default are "responsive" which means they will resize both the width and height proportionally. The default Omny embed player is a fixed height player.

Please add layout="fixed-height"  to the <amp-iframe  component to prevent the iframe from resizing the height.

Viewport restrictions
AMP iframes imposes a restriction that iframes must not be displayed within 600px or 75% of the first viewport from the top. Publishers can override this behaviour by setting a placeholder view.

Sample code
To view an example of an Omny embed player within AMP, go to

Apple News

Unfortunately Apple News restricts the ability to use iframes and only natively supports displaying media content from YouTube and Vimeo.

As alternative, Apple News includes an audio component which displays a native audio player. Developers can configure this audio component to the MP3 URL of the published clip to allow readers to play the equivalent audio content.

Developer note: using the audio component without an image has the side-effect of Apple News automatically buffering/downloading the audio file without the user pressing play. This is undesirable since it would count unintended downloads. Setting an image prevents this behaviour and the user has to press play before the audio is buffered/downloaded.

Did this answer your question?