Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Embera

Security covered Under active development 22 sites

This module integrates the Embera PHP library to provide oEmbed functionality. It allows you to fetch information about URLs, such as YouTube or Vimeo links, and generate HTML embed codes. The module also offers features like responsive embeds, caching, and methods to retrieve thumbnails, titles, and embed codes.

What this module does

This module is actually just a wrapper of the great Embera PHP library developed by Michael Pratt.

Copying from the library's GitHub description:

A Oembed consumer library, that gives you information about urls. It helps you replace urls to youtube or vimeo for example, with their html embed code. It has advanced features like offline support, responsive embeds and caching support.

By installing this module you get the Embera PHP library installed in you /vendor/ folder.
As a bonus, you also get a Drupal service embera.manager which uses Embera's file cache for storing responses (configurable via embera.file_cache.duration setting).

The service also provides the following methods:
- getThumbnailUrl(): Returns the URL of the thumbnail of the item
- getTitle(): Returns the title of the item.
- getEmbedCode(): Returns the embed code of the item.
- getEmbedInformation(): Returns the full response retrieved from the oEmbed provider via Embera.

The methods above also use static caching of the response (regardless of the file caching) for optimized performance in the same request.

Embera class' configuration

The configuration of the Embera class is easily modified by the embera.class.configuration setting. Check the Passing configuration options section of the documentation to check which options are supported.

Regarding the file cache, the responses get cached for 3600 seconds by default. You may modify the number of seconds by setting the embera.file_cache.duration to your desired value.

If for any reason, you want to disable the file cache completely, please set the embera.file.cache.disabled setting to TRUE.

PS: This module is destined to be used by module developers. You shouldn't install it unless you intend to use its service or another module requires it as a dependency.

Drupal 9–11

Ask your assistant about Embera

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
4
Tracked since
Mar 2023
Latest release
2 years ago
Releases (12 mo)
0
Maintenance
Dormant

Release Timeline

Releases

Version Type Core PHP Release date
1.0.7 Stable 9–11 Sep 10, 2024
1.0.6 Stable 8–11 Sep 10, 2024
1.0.5 Stable 8–11 Sep 10, 2024
1.0.4 Stable 8–10 Mar 10, 2023