oEmbed
Introduction
We implemented the oEmbed protocol to allow seamless embedding of our viewer on any website. The oEmbed protocol allows websites to embed content from other websites without having to know the specifics of the embedded content.
Our oEmbed endpoint is https://viewer.rooom.com/oembed
Parameters
Parameter | Required | Description |
---|---|---|
url | YES | URL of the viewer: https://viewer.rooom.com/product/* or https://viewer.rooom.com/space/* where * is the ID of the viewer you wish to embed. |
maxwidth | No | Maximum width of the returned viewer |
maxheight | No | Maximum height of the returned viewer |
Response
A JSON response will be returned. The html
attribute contains an iframe with the viewer.
Example
https://viewer.rooom.com/oembed?url=https://viewer.rooom.com/space/f7ef4851b8
json
{
"provider_name": "rooom",
"provider_url": "https:\/\/www.rooom.com",
"type": "rich",
"version": "1.0",
"title": "demo rooom",
"height": 360,
"width": 640,
"author_name": "Demo Rooom",
"html": "<div class=\"rooom-embed-wrapper\"><iframe width=\"640\" height=\"360\" src=\"https:\/\/viewer.rooom.com\/space\/f7ef4851b8\" allow=\"autoplay; fullscreen; vr\" title=\"demo rooom\" frameborder=\"0\" webkitallowfullscreen=\"true\" class=\"\" mozallowfullscreen=\"true\" allowfullscreen=\"\" onmousewheel=\"\" allowvr=\"\"><\/iframe><\/div>",
"thumbnail_url": "https:\/\/storage.rooom.com\/store\/viewers\/5f1ebffecc408429264d9144\/preview.f2f630@512.jpg",
"thumbnail_width": 512,
"thumbnail_height": 288
}