ddm-embeddable

1.3.1 • Public • Published

embeddable

Embed media via oEmbed or openGraph

Install

npm install ddm-embeddable

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

// Require the embedable library
var Embeddable = require('ddm-embeddable');
 
// Instantiate the embedable object
var embed = Embeddable();
 
// 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);
});

Package Sidebar

Install

npm i ddm-embeddable

Weekly Downloads

2

Version

1.3.1

License

MIT

Unpacked Size

79.8 kB

Total Files

29

Last publish

Collaborators

  • moonty