Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: OpenID Connect / OAuth client 3.0.0-alpha9 New alpha version released for module openid_connect (3.0.0-alpha9). Release: Opensolr Search 4.5.0 Minor update available for module opensolr_search (4.5.0). Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Usage Milestone: Simplify Module simplify crossed 10,000 active installs. Usage Milestone: Views Reference Filter Module entityreference_filter crossed 10,000 active installs. Usage Milestone: Dropdown Language Module dropdown_language crossed 10,000 active installs. Usage Milestone: Paragraphs Browser Module paragraphs_browser crossed 10,000 active installs. Usage Milestone: OpenAPI Module openapi crossed 10,000 active installs. Usage Milestone: Decoupled Router Module decoupled_router crossed 10,000 active installs. Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

Media Remote

5,043 sites Security covered Drupal 9–11
View on drupal.org

This module allows you to manage remote content, such as audio players, document previews, or maps, as media items in Drupal. It supports a variety of providers and works for content that doesn't adhere to the standard OEmbed specification.

This module offers a simple mechanism to handle remote URL content (usually from non-OEmbed providers) as Media items in Drupal.

Features

With this module, you will be able to create Media Types where editors can enter a remote URL, and have that content stored and displayed as a Media item in Drupal (available in the Media Library, media reference fields, WYSIWYG text areas, etc.). The format the content will have in Drupal will depend on the provider, such as an audio player, an embedded document preview, a map, etc.

Supported providers

Would you like to ask the inclusion on this list of another provider? Open an issue with your request. If you feel like writing some PHP code, here's an example of a patch/MR that adds a new provider to the module. Any contribution is appreciated!

How is this different than core Remote Video and OEmbed source plugin?

If the content you want to use comes from a provider that implements the OEmbed specification (in other words, if it's listed at https://oembed.com/providers.json ), you probably don't need this module. Drupal core has support for OEmbed providers, and it's a much more powerful API than what this module offers.

For non-OEmbed providers, the process of transforming an URL into an embedded content instance usually involves crafting a provider-specific snippet / embed code. This transformation fits well in a field formatter plugin, which is something that can usually be implemented in custom code. However, in order to have this content integrated with the Media system in Drupal, there is a non-negligible amount of code that is always the same for any provider. That's where this module comes in. You can either use one of the providers (formatters) included here, or use the module as a base to integrate your own formatter with Drupal media entities.

Technical implementation

There are two aspects of how this module is structured:

- A common body of code that is provider-agnostic, and provides integration with the Media system in Drupal. This includes a Media Source plugin, the constraint validator code, the form that integrates with the Media Library modal, etc.

- A collection of formatter plugins. These are provider-specific, and all the logic about how to render the remote content is contained in the formatter class and its corresponding twig template.

Configuration & Use

  1. Install this module as usual.
  2. Create a new Media Type, select "Remote Media URL" as Media source
  3. Important: Configure the display, selecting as formatter in the URL field your desired provider. For example, if you are creating a "Buzzsprout" media type, select "Remote Media - Buzzsprout" as formatter for the URL field in the "Manage display" tab.

I need a slightly different snippet / embed code in my project

The easiest option is to copy the corresponding twig template into your theme, and customize it there.

If you need in the template some information that isn't currently available, and your use-case is not particular to your project, feel free to open an issue and we can discuss it there.

Depends on

Dependencies of the latest stable release

  • media Drupal core
  • media_library Drupal core

Required by

3 tracked projects depend on this one

Activity

Tracked releases
2
Tracked since
Oct 2024
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 2
Maintenance
Slowing

Releases

Version Type Core Release date
1.10.0 Stable 9–11 May 23, 2025
1.9.1 Stable 9–11 Oct 17, 2024