alphaBuffer property
The alpha channel data output by using portrait segmentation algorithm. This data matches the size of the video frame, with each pixel value ranging from 0,255
, where 0 represents the background and 255 represents the foreground (portrait). By setting this parameter, you can render the video background into various effects, such as transparent, solid color, image, video, etc. In custom video rendering scenarios, ensure that both the video frame and alphaBuffer are of the Full Range type; other types may cause abnormal alpha data rendering.
Implementation
@JsonKey(name: 'alphaBuffer', ignore: true)
final Uint8List? alphaBuffer;