# Overlay Functionality
This is a feature that allows you to overlay a png image on top of your video. The video stream with the overlaid image is then displayed in all areas within TrueConf Room, as well as sent to other participants of the group conference.
# Overlay Images
Only
pngformat images are supportedThe image must be the same size as the frames from the video capture device. If it is larger or smaller, it will be automatically scaled to the size of the video frames without maintaining the aspect ratio. General recommendation: use images with an aspect ratio similar to that of the camera, and with good resolution, so that the proportions are not distorted when overlaid, and the visual quality is not degraded when your video window is displayed on a large screen for other participants.
# Working with Overlay Images
For working with images, http requests to the overlay tag are used (similar to avatars, frames, etc.) of the built-in http server. The list of parameters to be passed depends on the action to be performed. Available parameters:
token– a token received in response to one of the commands:auth,setAuthParamsorgetOverlayHttpToken. Must always be presenttype– the type of request, which determines the action to be performed. Acceptable values:drawing– working with overlay images. For this type, theimageIdparameter is also required - a unique identifier of the image to be overlaid.original_frames– working with original images, i.e. frames without any overlaid images. This type includes an optionalpeerIdparameter – a unique identifier of the frame source (conference participants, as well as your own video). If the parameter is absent, the identifier of your own video stream will be used by default.
Requests:
GET. Used to retrieve a specific image by its identifier. Available types:
drawing,original_framesPOST. Used to set a specific image by its identifier. Available types:
drawingDELETE. Used to remove a specific image by its identifier. Available types:
drawingOPTIONS. Standard logic. Available types:drawing,original_framesHEAD. Standard logic. Available types:drawing,original_frames
For usage examples, refer to the HTTP server description.
# General Logic
There can be an unlimited number of overlay images, but each will have its own unique identifier.
If there are multiple images, the order in which they are overlaid will be determined by the upload sequence to the server.
Uploaded images are automatically deleted 5 seconds after uploading.
The overlay feature works on top of the background blur and replacement functionality. That is, an image with blur/background replacement is formed first, and then an image is overlaid on top of it.
The overlay feature will only work in
PROmode.
See also: