Using oEmbed to share and embed videos
Along with the manual ways of embedding videos from TwentyThree, we support oEmbed to make it easier and more flexible to embed content from your video website.
oEmbed is the recommended way to create embed codes and resolve other meta data from URLs.
What is oEmbed?
This standard is designed to allow an embedded representation of a URL on third party sites—or simply for developers needing to build embed snippets manually from IDs, tokens etc. The normal use case for oEmbed is allowing users in a content management system or other integrating software to simply copy-paste a direct URL to content into the integration. After this, developers will be able to retrieve not only a current embed code, but also control the player style and size along while getting access to basic information about the video. (This info can then be used to query the API for all available metadata if needed.)
- You can always send a link to a public and published video to
http://<video.domain.com>/oembed?url=<url>
to get metadata (see example). - The metadata of each page on a video website includes auto-discovery data for oEmbed in the HTML head. This allows you to use any standard implementation of oEmbed with TwentyThree.
You can read more about the concept on Webmonkey.
Using oEmbed with TwentyThree
Data can be accessed in JSON or XML and with a number of extra parameters:
url
: The URL you wish to look up metadata and embed information for.maxwidth
: The maximum width of the returned embed code (optional).maxheight
: The minimum width of the returned embed code (optional).autoplay
: Control whether the embed code will auto-play content or not. Valid options are0
and1
(optional).format
: The response format, valid options arexml
andjson
(optional).player_id
: The ID of the player you wish to use in the embed code (optional).
This oEmbed mechanism supports resolving URLs for videos, channels and tags.