
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.
Options / API / Events / Usage / Changelog
Docs:What's currently supported?
- Facebook URLs containing page, post, photos, videos or comments
- Twitter URLs containing user timeline and tweets
- YouTube and Vimeo videos URLs
- Instagram URLs containing posts and videos
- Pinterest URLs containing board, profile and pins
- Google Maps URLs containing cordinates to a location
- Embeds other urls like Github Gists, Soundcloud, Spotify or PDF, MP4, Webm, ... as
iframe
- Embeds any URL that fulfils HTTP access control (CORS) policy
- Extended plugin support for additonal oembed services
- Supports IE10+ and all modern browsers
Installation
NPM / Yarn
$ npm install embedo --save$ yarn add embedo
Bower
$ bower install embedo
CDN
Alternatively, import using CDN while updating version
as per requirements from any script below:
Setup
CommonJS / AMD
; // Initialize Embedo class objectconst 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 anywhereembedo; // OR Chaining methods and callbackembedo // OR storing in a variablelet my_embedo = embedomy_embedo;my_embedo;
Also, an example can be found here.
HTML
... ...
Also, an example can be found here.