Oembed module


About

oEmbed lets other websites, such as blogs, content management systems, and forums, show your media in a player when someone pastes a link to it.

The other site recognizes your site's links, asks your site for the player code, and embeds the player automatically. In Content Hubs, you turn on oEmbed with the Oembed module.

oEmbed isn't available in LMS Extensions.

Before you start

For oEmbed to work, make sure that:

  • Your site allows anonymous users. In the Auth module, set allowAnonymous to Yes.
  • Anonymous users can view embedded media and playlists. In the Embed module, allow anonymousRole.
  • secureEmbed is turned off in the Embed module. You can't use secure embed and oEmbed at the same time.
  • The media you want to share is published or unlisted.

Configure

  1. Go to your Configuration Management console, locate the Oembed module in the left panel, then select it. You can also navigate directly using a link: https://{your_site_url}/admin/config/tab/oembed
  2. The Oembed page displays.

  3. Configure the following:
    • enabled - Set to Yes to enable the module.
    • type - Select the type of oEmbed link users get:
      • Short (the most common) - A short link, such as https://{your_site_url}/id/1_abc123. If someone opens the link in a browser, your site opens with the media in the player.
      • Full - A full oEmbed request. Use this if the other site can't turn a short link into an oEmbed request.
    • enableCustomization - Select Yes to let users choose a player, a size, and a start time when they get an oEmbed link. The other site must accept the link format this creates.
    • playerId - Enter the ID of the player to use for embedded media. Enter default, or leave the field empty, to use the first player set in the Embed module.
    • height - Enter the height of the player in pixels. The default is 285.
    • width - Enter the width of the player in pixels. The default is 400.
  4. Click Save.

Get an oEmbed link

After you enable oEmbed, an oEmbed icon (the link icon) appears in the Share window on the media page. If enableCustomization is set to Yes, users can also choose a player, a size, and a start time. For instructions, see Embed media in Content Hubs.

Connect another site to your oEmbed endpoint

Some sites need to be set up before they can recognize your site's links. If the site asks for oEmbed details, use the following:

  • URL scheme - https://{your_site_url}/*. For example, if your site is https://media.example.com, the scheme is https://media.example.com/*.
  • API endpoint - https://{your_site_url}/oembed

Your site's endpoint accepts two kinds of links:

  • The oEmbed link from the Share window, such as https://{your_site_url}/id/1_abc123?width=400&height=285&playerId=12345678
  • The media page URL, such as https://{your_site_url}/media/My+video/1_abc123
Was this article helpful?
Thank you for your feedback!
User Icon

Thank you! Your comment has been submitted.

In this article
Related articles