Content Integration aka Layers
Show any data content inside your video using the Eyeson layer service. There are currently three ways to achieve this.
To show simple text message inserts you can use the insert parameter. You'd listen for tweets in a separate service and display them using the tweet senders avatar as an icon, name as title and the tweet as content.
For more complex data generate an image and either upload the image or provide a public URL. For overlaying images use a transparent background.
Any Eyeson room video has a resolution of either 1280x960 pixels (960p in default) or 1280x720 pixels (HD in widescreen mode). Ensure any file uploaded is an alpha interlaced PNG or WebP image with a corresponding resolution to avoid any distortions.
When using layers you might want to disable the SFU mode that in default room configuration will transport individual streams for single and two participants and not show layer media.
POST /rooms/<access_key>/layers # insert image or text message
RESPONSES 201 CREATED, 400 BAD REQUEST, 404 NOT FOUND, 410 GONE
Parameters | Type | Description |
---|---|---|
file | File (optional) | File upload. |
url | String (optional) | File URL. |
insert[icon] | String (optional) | URL for an icon to show. |
insert[title] | String (optional) | Message title. |
insert[content] | String (optional) | Message content. |
z-index | String (optional) | Use -1 for background or 1 (default) for foreground position. |
id | String (optional) | Layer id for relation control in observer |
Supported image types are: PNG, WebP, and JPEG.
Background layer has no transparency, foreground layer can be transparent.
$ curl -X POST \
-d "url=https://eyeson-team.github.io/api/images/eyeson-overlay.png" \
https://api.eyeson.team/rooms/<ACCESS_KEY>/layers
DELETE /rooms/<access_key>/layers/<layer_index> # clear layer, layer_index: -1 or 1
RESPONSES 200 OK, 404 NOT FOUND, 410 GONE