JSPM

  • Created
  • Published
  • Downloads 47
  • Score
    100M100P100Q60085F
  • License MIT

Oembed and OpenGraph embeds for content

Package Exports

  • embedable

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (embedable) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

embedable

Embed media via oEmbed or openGraph

Example of using the embedable code to fetch and render a uri

// Require the embedable library
var Embedable = require('embedable');

// Instantiate the embedable object
var embed = Embedable();

// Asynchronously fetch metadata for a URI
var data = embed.fetch('https://www.youtube.com/watch?v=igUMDICqTpQ');

// Asynchronously render html with the metadata
var html = data.then(function(data) {
  return embed.render(data);
});