Skip to main content

Background Image

This feature is very versatile. In the earlier example Layout Positioning, there was a background image with the numbered video layout spots blended in. Now let's overwrite that background image with a new PNG file which was put together in canvas from a PDF page and colorful background elements.

info

Images smaller than 1280x720 in widescreen mode or 1280x960 in fullscreen mode are placed centered in the background. Bigger Images are scaled accordingly to the size of the video stream. It behaves similar to object-fit: cover from the CSS language.

export ACCESS_KEY=123...

curl -X POST \
-d "url=https://docs.eyeson.com/img/examples/bg_p1.png" \
-d "z-index=-1" \
"https://api.eyeson.team/rooms/$ACCESS_KEY/layers"
custom layout with pdf as png background

Figure 1. The result may look like this.

For next pages just make the same request again with the adjusted PNG file.

animation of multiple backgrounds

Figure 2. This GIF shows a series of backgrounds.

Deleting the Background Image

If you don't want the background image to be shown anymore, try using these snippets

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