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://www.rooom.com/product/e725a9e18cb87bbc2977b73d4bdc65
json
{
"provider_name": "rooom",
"provider_url": "https:\/\/www.rooom.com",
"type": "rich",
"version": "1.0",
"title": "Puky Bike Demo",
"height": 360,
"width": 640,
"author_name": "Demo Rooom",
"html": "<div class=\"rooom-embed-wrapper\"><iframe width=\"640\" height=\"360\" src=\"https:\/\/viewer.rooom.com\/product\/e725a9e18cb87bbc2977b73d4bdc65\" allow=\"autoplay; fullscreen; vr\" title=\"Puky Bike Demo\" frameborder=\"0\" webkitallowfullscreen=\"true\" class=\"\" mozallowfullscreen=\"true\" allowfullscreen=\"\" onmousewheel=\"\" allowvr=\"\"><\/iframe><\/div>",
"thumbnail_url": "https:\/\/storage.rooom.com\/store\/viewers\/5ebd7b94903c994867147144\/preview.9bb48c@512.jpg",
"thumbnail_width": 512,
"thumbnail_height": 288
}