Skip to main content

How to Add an Overlay Image

The layers endpoint allows you to place transparent images on top of your video stream. Overlays provide flexibility to customize your meeting appearance by masking specific areas or adding visual elements to enhance presentation contexts.

warning

Image dimensions must not exceed 1280x720 pixels in widescreen mode or 1280x960 pixels in fullscreen mode.

info

Smaller images are positioned at the top left of the video stream as overlay.

Displaying an Example Overlay

There are multiple ways to display images in an Eyeson meeting. In this case, we are using a public image. All other options are listed under Layers.

export ACCESS_KEY=123...
curl -X POST \
-d "url=https://docs.eyeson.com/img/examples/overlay_example.png" \
-d "z-index=1" \
"https://api.eyeson.team/rooms/$ACCESS_KEY/layers"

Setting a Predefined Layout

To ensure the overlay image is visible, a predefined layout is applied. More about layouts and the predefined layouts list. This is optional.

export ACCESS_KEY=...
curl -X POST \
-d "layout=auto" \
-d "show_names=true" \
-d "users[]=" \
-d "name=one" \
"https://api.eyeson.team/rooms/$ACCESS_KEY/layout"

Resulting Video Layout

If both API requests are successfully processed, the resulting video stream may be displayed as follows.

Layout with the overlay

Deleting the Overlay image

If you don't want the overlay image to be shown anymore, delete the layer by using these snippets.

export ACCESS_KEY=...
curl -X DELETE "https://api.eyeson.team/rooms/$ACCESS_KEY/layers/1"