-
Notifications
You must be signed in to change notification settings - Fork 0
RTCVideoFilter
Adnan Elezović edited this page Jun 5, 2024
·
1 revision
implements
VideoFilter
Creates a new instance of the RTCVideoFilter
.
-
options
:RTCVideoFilterOptions
- Additional optional configuration used for setting up the video filter. If not provided, a new instance with default settings will be used.
-
RTCVideoFilter
- The created instance ofRTCVideoFilter
.
// Retrieve an image from a URL and decode it into a Bitmap
URL url = new URL("https://images.unsplash.com/photo-1558882224-dda166733046");
Bitmap image = BitmapFactory.decodeStream(url.openConnection().getInputStream());
// Create a RTCVideoFilterOptions object and set the virtual background image
RTCVideoFilterOptions options = RTCVideoFilterOptions.builder()
.mode(RTCVideoFilterMode.VIRTUAL_BACKGROUND)
.virtualBackground(image)
.build();
// Create the RTCVideoFilter object with created options
RTCVideoFilter videoFilter = new RTCVideoFilter(options);
This method allows you to configure the video filter by specifying additional options.
-
options
:RTCVideoFilterOptions
- An object containing the options used to customize the behavior of the video filter. These options can include settings such as background image selection, blur intensity, or any other parameters relevant to the video filter's functionality.
N/A
// Create a RTCVideoFilterOptions object with default values
RTCVideoFilterOptions options = RTCVideoFilterOptions.builder().build();
// Set created options on existing video filter object
videoFilter.setOptions(options);