Copy this bookmark:



bookmark detail

embedo: Embeds third party content to DOM with perks.
Github repo
Name: embedo
Tagline: Embeds third party content to DOM with perks.
JavaScript = 61261 bytes
HTML = 3994 bytes

# embedo [![npm](](

<img src="" height="200" align="right">

> **Embedo** adds a layer on top of third party embed APIs while ensuring best practices and native guidelines for each component. It takes cares of resizing the container, emitting necessary events and with support for native and external options to be pass along.

### Docs: [Options]( / [API]( / [Events]( / [Usage]( / [Changelog](

### What's currently supported?

* Facebook URLs containing page, post, photos, videos or comments
* Twitter URLs containing user timeline and tweets
* YouTube videos URLs, playlists will play in loop
* Instagram URLs containing posts and videos
* Pinterest URLs containing board, profile and pins
* Vimeo URLs containing videos
* Github URLs containing gists
* Google Maps URLs containing cordinates to a location
* Embeds other urls or .pdf, .mp4, .webm and many formats as alternative
* Embeds any URL that fulfils HTTP access control (CORS) policy
* Supports IE10+ and all modern browsers.


## Installation

$ npm install embedo --save
$ yarn add embedo
$ bower install embedo

Alternatively, import using CDN while updating `version` as per requirements from any script below:

<script type="text/javascript" src=""></script>
<script type="text/javascript" src="[@VERSION]/embedo.min.js"></script>

## Setup

Embedo supports AMD and CommonJS modules.

import Embedo from '/path/to/vendor';

// Initialize once (prefer globally)
const embedo = new Embedo({
facebook: {
appId: 'my_app_id', // Enable facebook SDK
version: 'v2.10'
twitter: true, // Enable twitter SDK
instagram: true, // Enable instagram SDK
pinterest: true // Enable pinterest SDK,
googlemaps: {
key: 'my_api_key' // Enables google maps API

// Then call .load() method from anywhere
embedo.load(<HTMLElement[object]>, <URL[string]>, <options[object]*optional>);

// OR Chaining methods and callback
.load(HTMLElement, URL, options)

// OR storing in a variable
let my_embedo = embedo.load(HTMLElement, URL)

Also, an example can be [found here](
github  programming  github-starred-to-pinboard  crypto 
february 2018 by brianyang
view in context