Package: collective.oembed
IntroductionThis addon integrateoembedinto Plone. You can find a demo athttp://youtu.be/kHikGIWrvCsoEmbed official documentation:http://oembed.com/You have to know this addon try to go beyond already supported website
and with as many providers as possible without third party services.How to installThis addon can be installed has any other addons.
Please follow officialdocumentation.oembed providerYour site will become an oembed provider using @@oembed view as an endpoint:URL Scheme: http://mysite.com/*
API endpoint: http://mysite.com/@@oembed
Supports discovery via <link> tagsThis addon use archetypes getPrimaryField to get the most representative field
of your content type and then build information on how to embed this contentTo change this behavior you can override the view for specific context:<browser:page
    name="oembed"
    for="my.specific.context.IMYContent"
    class="my.specific.provider.OEmbedProvider"
    permission="zope2.View"
    layer="my.specific.layer.Layer"
    />


from collective.oembed.provider.
class OEmbedProvider(OEmbedProvider):
    def add_context_info(self, ob, site):
        self.embed['type'] = 'rich'
        ...oembed clientThis addon provide an integration ofjquery.oembedplugin. Because there are
many fork you have to choose the one you will use. The official plugin has been
integrated to plone throw the addoncollective.js.oembedThe oembed client is integrated using a viewlet that is not activated by
default. You have to activate it throw the controlpanel. It is configured that
way:<script type="text/javascript">
  jqueryOmebedSettings = {...} //extracted from the controlpanel
</script>
<script type="text/javascript">
        $(document).ready(function() {
            $(".oembed").oembed(null,jqueryOmebedSettings);
        });
</script>consumerA consumer is availabe throw a utility:>>> url = "http://www.youtube.com/watch?v=it1hMtZKle8"
>>> consumer = component.getUtility(collective.oembed.interfaces.IConsumer)
>>> consumer.get_data(url, maxwidth=300, maxheight=None, format='json')
{...}There is also a @@collective.oembed.consumer view, which can take params throw
attributes:>>> consumer_view = component.queryMultiAdapter((self.context,self.request),
...                                 name=u'collective.oembed.consumer')
>>> consumer_view._url = url
>>> consumer_view.embed_auto()
<div class="oembed-wrapper oembed-video">...</div>OEmbed link viewThis addon register an oembed view to the Link content type. It displays
content provided from the remote url and do not set maxwidth & maxheight. It
should be achieved by integrators.The link view stores 3 different lists of components:oembedapi2embedurl2embedoembedContains registered views of type oembed_view , able to get the html
embed template from the targetted provider’s oembed api (see below for a
list of currently supported providers).api2embedIf you have an API key for the targeted website, you should be able to
use it through those views.
Once this feature is implemented, you should be able to choose whether
you want to activate it or not.url2embedContains registered views of type url2embed_view, which get the embed
template directly from the target’s url.
Used as a fallback for websites who do not support the oEmbed format.NOTE:While the returned data will be sufficient to embed the target
widget in your view, you won't be able to access the metadata which
could have been associated with it in a straight oEmbed format.All three lists are checked in the same order as they’re presented here,
and the first valid component found is used to get the embed code.
If no match at all is found, then nothing will be displayed.Check endpoint.csv to see which of those views are currently supported for
each service.Embed.lyThis addon can useembed.lyservice. You can set the embed.ly api key in the
control panel or install and configure collective.embedly, this addon will
use the configuration provided by this one.Providersembed.ly is activated only if you have added an api_key or configured
collective.embedly. The addon provide native support for the following services:External providers:Embedly (http://embed.ly)Video providers:5min (http://www.5min.com/)Youtube (http://www.youtube.com/)Qik (http://qik.com/)Revision3 (http://revision3.com/)Hulu (http://www.hulu.com/)Vimeo (http://vimeo.com/)CollegeHumor (http://www.collegehumor.com/)Kinomap (http://wwww.kinomap.com/)Dailymotion (http://www.dailymotion.com/)Clikthrough (http://clikthrough.com)Dotsub (http://dotsub.com/)Vhx.tv (http://vhx.tv) NOTE: only works with the dedicated URL for sharingNfb.ca (http://http://www.nfb.ca/)Wordpress TV (http://wordpress.tv/)Screenr (http://screenr.com/)Photo providers:23hq (http://www.23hq.com/)Flickr (http://www.flickr.com/)SmugMug (http://www.smugmug.com/)Photobucket (http://photobucket.com)Instagr (http://instagr.am/)Picasa (https://picasa.google.com/)Rich providers:Occipital (http://360.io)iFixit (http://www.iFixit.com)Apple (http://itunes.apple.com)Poll Everywhere (http://www.polleverywhere.com/)SlideShare (http://www.slideshare.net/)WordPress (http://wordpress.com/)Official.FM (http://official.fm)Gist Github (https://gist.github.com)Google Calendar (https://www.google.com/calendar)Google Docs (https://docs.google.com/)Google Maps (http://maps.google.com)Issuu (http://issuu.com)Scribd (http://www.scribd.com)SoundCloud (http://soundcloud.com/)Spotify (http://open.spotify.com/)Proxy OEmbed EndpointThis addon provide consumer and provider. Both can be used at the same time
in the proxy oembed endpoint. It means you can ask your site how to display
an URL what ever it comes from the site itself or from outside.Other Plone addonscollective.portlet.oembedcollective.js.oembedcollective.embedlyAddon design (targeted to 2.0)The internal code has been completly redone on 2.0Goals:code easier to understandless componentsperformance optimizationThe provided integration use only json throw ajax request.We have one main view which achieve the job:
@@proxy-oembed-providerThis one use a ram cache with a cache-key based on:
* url + max-width + max-height
* 1 hour (in case distant html has changed)There is a structure key/value with hostname as keys
and low level consumer name as values which are instanciated when needed (lazy
loading) so it use less memory.TODOMake the global structure configurable to:blacklist some hostname throw portal_registryadd new key/value hostname/consumername throw portal_registryoverride existing value throw portal_registryCreditsCompaniesPlanet Makina CorpusContact usAuthorsJeanMichel FRANCOIS aka toutpt <toutpt@gmail.com>ContributorsRaphael Gaziano aka raphigaziano <r.gaziano@gmail.com>Alejandro Pereira aka aleGpereira <alepereira86@gmail.com>Sylvain Bouchard aka bouchardsyl <sylvain.bouchard@savoirfairelinux.com>Changelog2.0.1 (2013-12-09)Fix JS: Uncaught TypeError: Cannot call method ‘match’ of undefinedFix vimeo https endpointFix twitter user endpoint2.0 (2013-11-21)fix(js): Replace ie unsupported use of dataset by getAttribute [toutpt]Don’t replace a link if the result is a link [toutpt]Fix kinomap endpoint (no more oembed support -> url2embed) [toutpt]Fix internal provider to work with dexterity content types [toutpt]2.0a4 (2013-05-17)Tested compatibility with Plone 4.3. [hvelarde]Fixed Javascript typo regarding max height [bouchardsyl]2.0a3 (2013-04-02)Fix tiles zcml conditional check.Use a template for the tile renderingAdd responsive option to oembed tile2.0a2 (2013-01-31)Fix Plone4.0 compatibility2.0a1 (2013-01-29)Can use links inside div.oembed too since tinymce don’t apply styles to “a” well [djay]Code refactored to use a structure with hostname/[lazy_endpoints]Test coverage up to 94 %Add spotify endpoint (open.spotify.com)1.2.5 (2013-01-07)Fix soundcloud provider which can use httpsAdd oembed tile if plone.app.tiles is installedAdd screenr providerAdd test view endpoints_test_view only available with provided buildoutRefactor tests to use assertX instead of failUnlessAdd responsive behavior to img, embed and object tag.Add itunes.apple.com support (iphone app)Add 360.io support (occipital)Add issuu.com support1.2.4 (2013-01-02)Add “proxy-oembed-provider” to make your Plone an oembed proxy consumer and providerAdd twitteruser (api2embed) and activate api2embed everywhereImprove local oembed support for archetypes using primary fieldUpdate returned html code to make it responsive (taken from fitVids.js)1.2.3 (2012-08-24)Add support for Soundcloud. [aleGpereira]1.2.2 (2012-07-10)Make GoogleMaps working with both: maps and mymapsPEP81.2.1 (2012-04-25)Fix offline mode (when working without internet)1.2 (2012-03-15)add Plone 4.0.x support1.1 (2012-02-22)Add collective.oembed.url2embed browser view componentAdd collective.oembed.superconsumer browser view componentAdd GoogleMaps, gist.github.com, google calendar, google docs, scribd supportSupport shorted url with tinyurl.com, goo.gl, bit.ly, t.co, youtu.be, vbly.us1.0 (2012-01-13)Fix regex for 5min endpoint.Handle more error: HTTPError, OEmbedErrorAdd url2embed supportAdd oembed support for instagr.am, Vhx.tv, Official.FM, Nfb.ca
[raphigaziano]Add url2embed support for picasaweb
[raphigaziano]1.0a (2012-01-02)Initial release