alphaBuffer property
Alpha channel data output by portrait segmentation algorithm. This data has the same dimensions as the video frame. Each pixel value ranges from 0,255, where 0 represents background and 255 represents foreground (portrait).
By setting this parameter, you can render the video background with various effects such as transparency, solid color, image, or video.
In custom video rendering scenarios, ensure that both the video frame and alphaBuffer are Full Range type; other types may result in incorrect rendering of Alpha data.
Make sure that the dimensions of alphaBuffer exactly match the video frame (width × height), otherwise the app may crash.
Implementation
@JsonKey(name: 'alphaBuffer', ignore: true)
final Uint8List? alphaBuffer;