MediaSpace oEmbed Integration

oEmbed is a format for allowing an embedded representation of a URL on third-party sites. The simple API allows a website to display embedded content, such as videos, when a user posts a link to that resource, without having to parse the resource directly. MediaSpace is the only application that currently exposes oEmbed in Kaltura. Note that oEmbed will not work for KAF instances.

oEmbed has 3 components:

  • the link to a video item
  • a pattern URL to identify links to video items
  • an API endpoint to which a 3rd party site would call to get info about the video item (including player embed)

The oEmbed 3 components in MediaSpace are (same order):

  • a user is given the oEmbed link when choosing to share content via oEmbed.
  • the pattern (regex), that the oEmbed consumer should be configured with, is: http://{mediaspace url}/*
    For example, if your MediaSpace URL is http://media.company.com, the pattern is – http://media.company.com/*
    Another example, if your MediaSpace URL is http://www.company.com/videos/, the pattern is – http://www.company.com/videos/*
  • the API endpoint is: http://{mediaspace url}/oembed

The oEmbed Endpoint in kms can accept 2 types of links:

  • the entry page URL - https://[MediaSpace URL]/media/[Entry Name]/[Entry ID].
  • the copied link from the 'share / oEmbed' tab - https://[MediaSpace  URL]/id/[entry ID]?width=400&height=285&playerId=12345678


For oEmbed to work properly, the following should be configured:

1. Mediaspace instance should allow anonymous users.
     To do so, on the KMS admin page, set allowAnonymous to Yes under the Auth module.
2. Anonymous users should be allowed to view embedded entries/playlists.
     To do so, on the KMS admin page, check the anonymousRole under the Embed module.
3. The embedded entry/playlist should be published or unlisted.
4. The oEmbed module should be enabled on the KMS admin page.
5. Ensure that secureEmbed is not enabled in the Embed module, since you cannot have both secureEmbed and oEmbed enabled together.

Was this article helpful?
Thank you for your feedback!
In This Article
Related Articles
Back to top

Never miss a thing!

Subscribe to our customer newsletter and our release notes updates, so you always get the best out of Kaltura.
Newsletter