Sitecore OEmbed

At its core this is a .Net OEmbed library which can be extended with additional OEmbed Providers and provides WebControls to make displaying these components easier.

Usage

Usage is pretty simple, you’ll get a couple of controls you can use in your Sitecore projects.

Setup

Add the following binaries to your bin folder from the package – Jump down to the releases to get the correct package.

  • PJones.OEmbed.dll
  • PJones.OEmbed.UI.dll
  • PJones.OEmbed.UI.SC.dll
  • Newtonsoft.Json.dll

Using in your Layouts/Controls

<%@ Register TagPrefix="oembed" Namespace="PJones.OEmbed.SC" Assembly="PJones.OEmbed.SC" %>

Now that the controls are setup you can use them easily… look at the following modification to the Launch Sitecore “Content with Image.ascx” file.

20
21
22
23
 <div class="right">
	<oembed:Link runat="server" Field="VideoLink" MaxWidth="364" MaxHeight="219" />
	<%--<sc:Image id="mainimage" runat="server" field="Image" maxwidth="364" maxheight="219" />--%>
</div>

I’ve replaced the Image field with a LinkField to a Youtube video. Check out the screenshot below.

Outcome

Launch Sitecore with Video

Services Supported

Out of the box it comes with support for the following

  • Video
    • Youtube
    • Vimeo
    • Hulu
    • FunnyOrDie
  • Photos
    • Instagram
    • SmugMug
  • Presentations
    • Slideshare
    • Speakerdeck
  • Music
    • Soundcloud
    • Spotify
  • Polls
    • PollEverywhere
    • PollDaddy

Why not Sitecore Marketplace?

Of the packages I’ve found on the Marketplace the license was not clear. Am I allowed to make commercial use of the work? Do I need to give attribution to the original author? etc.

Dependencies

This library uses the excellent Newtonsoft.JSON library. Check it out here

Repository

Releases

What’s the main difference between releases? The main thing is the version of Sitecore and Newtonsoft the code is compiled to. You could easily download the source code, update the references and compile for whatever version of Sitecore/Newtonsoft you are using.

License

MIT License

Copyright (c) 2013 Patrick Jones (patrickmjones.com)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

Leave a Reply

Your email address will not be published. Required fields are marked *