This library uses
Promise but it is not bundled with the library. So you need to load the polyfill
es6-promise before loading the plugin. You can install it by using
npm install --save es6-promise
$ npm install --save embed-js
$ bower install --save embed-js
Its preferred that you use the npm package manager as Bower support may be deprecated in future.
var EmbedJS = require('embed-js')
In case you wan't to use the ES2015 build of the plugin, you will find that version named
import EmbedJS from 'embed-js'
This plugin also contains the
jsnext:main field in package.json that points to ES2015 build ( in case you are using Rollup module bundler )