Releases: shobhitsharma/embedo
Releases · shobhitsharma/embedo
v1.14.0
- Fixed support for new oEmbed endpoints recently released by Facebook's Graph API
- To embed facebook or instagram posts, it is required to set
access_token
property globally or in single instance. This will automatically injected to all embed URLs called with the embedo's instance. No breaking changes.
// facebook initialize options
new Embedo({
facebook: {
appId: {your-app-id},
access_token: {your-app-id|your-client-token}
}
});
// instagram initialize options
new Embedo({
instagram: {
access_token: {your-app-id|your-client-token}
}
});
PR: #26 / bundle-size: 6.9kb
/ demo: codepen
v1.13.0
Overriding SDK
// Custom SDK Format
new Embedo({
[source: string (facebook/twitter/...)]: {
sdk: string
}
})
// Example for override facebook SDK
new Embedo({
facebook: {
sdk: "https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v3.2"
}
})
Ref: PR #19 and #20. Also, see options for more details.
v1.12.0
update
AddedEmbedo.plugins([ ... plugins ])
to initialize multiple plugins during init for es6 or AMD modules.
import Embedo from 'embedo'
import withEmbedoReddit from 'embedo/plugins/reddit'
import withEmbedoGmaps from 'embedo/plugins/gmaps'
import withEmbedoFlickr from 'embedo/plugins/flickr'
// Then, load plugins
Embedo.plugins([ withEmbedoGmaps, withEmbedoReddit, withEmbedoFlickr ])
// OR works as HOC
withEmbedoReddit(Embedo)
// Then init Embedo instance
Embedo.init({ ..., reddit: true, googlemaps: { ... } })
Try it on codesandbox demo here.
-
patch
Fixed instagram embed by adding embedding asiframe
as fallback. Due to recent changes with instagram API, they broke their own embed system, but if you add suffix/embed
after post/photo URL, it can embed as iframe, see example here. -
Added Flickr plugin
v1.10.2
- To embed instagram as iframe alternative, don't use jsonp as
boolean
, but useundefined
ornull
instead. Apart, resizing iframe itself is not feasible to detect autoheight. I suggest to use iframe-resizer if you need to have auto-detected heights of embed element. Once issue with instagram is resolved, passjsonp: true|false
with load options based on your case.
v1.10.0
feature
Added Domify:.domify()
New method that embeds the content to dom with options set using html elements, see usecase here.feature
Added Plugins: Integrated extensions that re-uses embedo base class to build plugins based on external sources, see an example here with react.new
Added plugins for Google Maps and Reddit, see here.update
Disintegration google maps source from core to plugins. You only need to import the plugin in order to make it backward compatible by either loading gmaps script in dom or importing through module and passingEmbedo
instance to it, as shown here.update
Code refactoring and cleanup.
v1.9.0
update
Removedgooglemaps
from core and move to plugins as an add-on on top of embedo class instance in next release.fix
Fixed error handling duringjsonp
fetch
v1.8.0
v1.7.5
- Fixed issue with instagram embeding. Due to recent security changes in instagram's origin policy, there was an issue with CORB request. It's now handled by using direct
XMLHttpRequest
method instead ofjsonp
call. - However, a boolean option as
jsonp
can be set along with instagram options to fallback to old behaviour, in case if instagram changes policy in future again.
v1.7.4
fix
Fixed Pinterest error handler withsetInterval
adding unnecessary microtasks which threw error even during success.other
Refactoring of codebase. Bumped default FB sdk version to v3.1.
v1.7.3
fix
Deprecated window.postMessage handler to resolve circular JSON issue caused by async calls in chain.