Embedly Extension

Embedly is a widget for the Embedly provider; a platform that provides rich media embeds for many providers including Facebook, YouTube, Twitter, etc. as well as analytics for them. Many publishers use Embedly for multiple embeds. 

Implementation details

The Embedly widget is not added by default into the core of Marfeel. If a client uses Embedly, it should be added in the default EmbedProviders into main.js. To implement Embedly:

  1. In Gutenberg, Marfeel spots the .embedly-card class and keeps it in the article.
  2. In the front-end, Marfeel searches for the .embedly-card class and runs the script provided by Embedly (cdn.embedly.com/widgets/platform.js).

Activation code snippet

The following has to be added in the customer's main.js for Embedly to work:

EmbedLoader.registerEmbedProviders([Embedly]);

The above activation code snippet adds Embedly in the default embed providers that run on every article and will replace the content with its embed representation.

It doesn't slow down the core and is only included if the client is using it.

Considerations

Embedly is very slow on smartphone. It takes almost 5-10 seconds for a YouTube video to load.

Customers have raised this issue in the past, however Marfeel has clarified that the defect is not on Marfeel's side.

Usage example

http://bc.marfeel.com/positivr.fr/index.html