Working with oEmbed: Embedding Videos
Gumlet Supports oEmbed and you can use it to generate embeddable iframe for the Gumlet Videos
oEmbed is a standard framework across the Internet for Embedding video and other content. We support oEmbed for the widespread acceptability of Gumlet videos across platforms and devices.
Embedding videos with oEmbed
Get the oEmbed response using a request:
GET https://api.gumlet.com/v1/oembed?url={video_url}
GET https://api.gumlet.com/v1/oembed?url=https://gumlet.tv/watch/64be6a1705ab8a164db198a5
The video URL (video_url) can support any of these schemes:
This URL is ... | URL Scheme |
---|---|
A watch page | https://gumlet.tv/watch/{video_id} |
A play embed code | https://play.gumlet.io/embed/{video_id} |
You can use any of the parameters mentioned in the Table to add more configurations.
Here is the sample response:
{
"version": "1.0",
"type": "video",
"provider_name": "Gumlet",
"provider_url": "https://www.gumlet.com/",
"title": "launch video 3",
"thumbnail_url": "https://video.gumlet.io/6435267e83c96cf7c982e560/64be6a1705ab8a164db198a5/thumbnail-1-0.png?v=1692964590857&width=800&height=450&dpr=2.0",
"thumbnail_width": 800,
"thumbnail_height": 450,
"width": 800,
"height": 450,
"html": "<iframe allowfullscreen width=\"800\" height=\"450\" src=\"https://play.gumlet.io/embed/64be6a1705ab8a164db198a5\" title=\"launch video 3\" frameBorder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; fullscreen\"></iframe>"
}
The response fields can be described as below:
Field | Description |
---|---|
version | The type of the oEmbed, which in this case is video. |
type | The version of the oEmbed Specifications. |
provider_name | The name of the oEmbed provider, i.e. Gumlet |
provider_url | The name of the oEmbed provider, i.e. https://www.gumlet.com/ |
title | The title of the video |
thumbnail_url | The thumbnail URL of the video |
thumbnail_width | The width of the thumbnail |
thumbnail_height | The height of the thumbnail |
width | The height of the video |
height | The width of the video |
html | The <iframe> element for embedding the video. |
Final Step
Embed the unescaped value from the response (html field), and include it in your HTML page:
<html>
<head>
<title>My Video Page</title>
</head>
<body>
<iframe src="https://play.gumlet.io/embed/64be6a1705ab8a164db198a5" width="800" height="450" frameborder="0" title="launch video 3" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
</body>
</html>
Discover the oEmbed URL
The <head>
section of Gumlet's video page contains the meta tag:
<link rel="alternate" type="application/json+oembed" href="https://api.gumlet.com/v1/oembed?url=https://gumlet.tv/watch/64be6a1705ab8a164db198a5&format=json"/>
The discovery tag helps editors, and platforms discover the oEmbed tag when you add the URL to a system that supports oEmbed discovery.
Feel free to reach out to chat support in case of any queries.
Updated 2 months ago