Embedding Content on Amedia Publications

SmartEmbed Integration Guidelines for Third-Party Providers

Amedia allows journalists to embed interactive objects from third-party providers into articles and front pages using a feature called SmartEmbed. This document describes how SmartEmbed works and what is required from third-party providers to ensure proper integration

Overview

A SmartEmbed is a hosted embed code managed by Amedia.
When a journalist wants to include an external object (such as a video, map, or widget), they paste the URL representing that object into our editorial tool. The system matches this URL against predefined patterns (using regular expressions) to determine which embed code to use and also to extract necessary data from the URL.
We strongly encourage providers to use real object URLs - the same URLs that represent the content publicly on the web.
For example, to embed a YouTube video, the journalist should copy the canonical YouTube video URL (e.g. https://www.youtube.com/watch?v=abc123), not an internal or custom link.
This approach ensures that:
  • The SmartEmbed URL uniquely identifies the embedded object.
The URL itself can serve as a natural preview and reference for both users and systems.

How SmartEmbeds Are Rendered

All SmartEmbeds are rendered inside an iframe on Amedia’s websites.This applies even if the provided embed code itself would normally create its own iframe.

Important implications:

  • The embedded code does not have access to the parent page’s DOM or window context.Any code that requires root-page access will not work.
The iframe’s URL does not contain information identifying Amedia or the specific publication.This URL may change at any time without prior notice.

Automatic Resizing

Each SmartEmbed iframe includes a script that monitors DOM changes inside the embed.Whenever the content height changes, the script sends a message to a parent script in the host page, which automatically adjusts the iframe height to fit the content.
As a result, your embed should not rely on fixed heights. Instead, ensure your layout adapts to the container height as provided dynamically.

Requirements for Third-Party Providers

To integrate your service with Amedia SmartEmbeds, please provide the following:
    An example URL
  • A valid, public URL representing a single object (e.g. a specific video, map, chart, etc.).
  • This URL will be used as the SmartEmbed input (SmartEmbed URL).
    The embed code
  • The HTML/JavaScript snippet that renders the content.
  • If your service supports oEmbed, please provide your oEmbed endpoint instead.
  • a direct URL to an embeddable page that can be loaded inside an iframe (for example: https://example.com/embed/12345) or a URL template that we can use to generate the embed URL dynamically (for example: https://example.com/embed/{id}).
    A short description of the embed
  • Explain what the embed displays and its intended use.
  • The description helps our editorial teams understand and use the embed correctly.
    Optional: Dimensions and width settings
  • You may optionally specify how the SmartEmbed should behave in different container sizes. This helps ensure proper rendering on our front page where we calculate the layout grid automatically based on content dimensions. For instance:
  • The embed height is 80% of its width at all widths (ratio = height ÷ width × 100).
  • From 0–699 px width, the height is 412 px; from 700 px and above, the height is 388 px. These breakpoints allow different aspect ratios or fixed heights per range.
  • The embed should not be rendered below 180 px container width, and never exceed 500 px.
  • If no dimensions are specified, the embed will be rendered at 100% width relative to the page and its natural content height.

Maintenance and Change Notifications

To ensure long-term stability of SmartEmbeds, it is essential that Amedia is informed of any changes that may affect existing integrations.
If your service or infrastructure changes in a way that impacts how embeds are rendered, you must notify Amedia in advance.
This includes, but is not limited to:
  • Changes to the embed code or embed URL structure
  • Modifications to your oEmbed endpoint or response format
  • Domain transfers, rebranding, or service discontinuation
  • Any other changes that could cause existing SmartEmbeds to fail or display incorrect content
Amedia reserves the right to disable or remove affected SmartEmbeds if the source service becomes unavailable, insecure, or serves unexpected content.