VideoFiltersService

🚧

Deprecation notice

Dolby.io Communications SDK for Desktop has been deprecated. For building native desktop applications, we recommend using the vanilla Electron framework with the latest Web Client SDK.

🚀

Note

This service is supported only on the Desktop SDK. If you wish to change the local participant's background using the Web SDK, call the start or setProcessor method.

The VideoFiltersService manages the video filters that allow blurring the local participant's background or using a selected image as the local participant's background. The service allows checking the available video filters and applying the selected filter on the proper video stream.

Methods

getSupportedFilters

getSupportedFilters(): VideoFilter[]

Returns video filters that are available for the local participant.

The bokeh and staticImage filters are available only for the Desktop SDK users and are not supported on any other platform.

Returns: VideoFilter[]


setFilter

setFilter(filter: VideoFilter, options?: VideoFilterOptions): Promise<void>

Applies the selected video filter on the local participant's video stream. When setting the filter is successful, the method returns a promise. Otherwise, the promise is rejected and the SDK returns the UnsupportedError if the required filer is not supported or MediaStreamError if the requested constraints could not be applied.

Parameters:

NameTypeDefault valueDescription
filterVideoFilter-The selected video filter.
optionsVideoFilterOptions{}The video filter options. The options include the image file for the staticImage filter and information about the video stream on which the video filter should be applied.

Returns: Promise<void>