enableObserveVideoFrame method
Enable/disable the listening callback for video frames
After you enable this toggle again, the SDK will no longer render the video footage, you can use V2TXLivePlayerObserver to obtain the video frame and execute the custom rendering logic.
Parameter:
enable
Whether to enable custom rendering. Default: false
pixelFormat
Customize the video pixel format of the render callback V2TXLivePixelFormat
bufferType
Customize the video data format of the render callback V2TXLiveBufferType
Return:
- V2TXLIVE_OK: Succeed
- V2TXLIVE_ERROR_NOT_SUPPORTED: Pixel formats or data formats are not supported
Implementation
Future<V2TXLiveCode> enableObserveVideoFrame(
bool enable, int pixelFormat, int bufferType) async {
var result = await _channel.invokeMethod('enableObserveVideoFrame', {
"enable": enable,
"pixelFormat": pixelFormat,
"bufferType": bufferType
});
return _liveCodeWithResult(result);
}