Overlay functionality
Overlay functionality
This feature allows you to overlay a png image on top of your video. The video stream with the overlay is then displayed in all areas in TrueConf Room API and sent to other participants in the group conference.
Overlay images
Only
pngformat images are supported.The image should 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 approximately the same aspect ratio as the camera and with good resolution, so that proportions are maintained during overlay and visual quality is not diminished when your video window is displayed on a large screen for other participants.
Working with Overlaid Images
To work with images, http requests are used on the overlay tag (similarly to avatars, frames, etc.) of the integrated HTTP server. The list of parameters to be transmitted depends on the action being performed. Available parameters:
token– the token received in response to one of the commands:auth,setAuthParams, orgetOverlayHttpToken. It must always be present.type– the request type, determines the action to be performed. Accepts the following values:drawing– working with overlay images. For this type, the parameterimageIdis also required, serving as the unique identifier of the image being overlaid.original_frames– processing of original images, i.e., frames without overlays. This type includes an optional parameterpeerId, which is the unique identifier of the frame source (conference participants, as well as your own video). If the parameter is absent, your own video stream identifier will be used by default.
Requests:
GET. Used to retrieve a specific image by its ID. Available types:
drawing,original_framesPOST. Used to set a specific image by its identifier. Available types:
drawing.DELETE. 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
See usage examples in the HTTP server description.
General logic
You can overlay as many images as you like, but each will have its unique identifier.
If there are multiple images, their overlay order will be determined by the upload order to the server.
Uploaded images are automatically deleted 5 seconds after being uploaded.
The overlay feature operates on top of the background blur and replacement functionality. This means that the image is first processed with blur or background replacement, and then the overlay image is applied.
The overlay feature will only work in
PROmode.
See also: