sendCustomVideoFrame method

Future<V2TXLiveCode> sendCustomVideoFrame(
  1. V2TXLiveVideoFrame videoFrame
)

In the custom video capture mode, the collected video data is sent to the SDK

Note:

  • In this mode, the SDK no longer collects camera data, and only retains the encoding and sending functions.
  • You need to call enableCustomVideoCapture before startPush to enable custom capture.

Parameter:

videoFrame Video frame data sent to the SDK V2TXLiveVideoFrame

Return:

  • V2TXLIVE_OK: Succeed
  • V2TXLIVE_ERROR_INVALID_PARAMETER: The sending failed and the video frame data is invalid
  • V2TXLIVE_ERROR_REFUSED: If the sending fails, you must call enableCustomVideoCapture to enable custom video capture.

Implementation

Future<V2TXLiveCode> sendCustomVideoFrame(V2TXLiveVideoFrame videoFrame) async {
  var result = await _channel.invokeMethod("V2TXLiveAudioFrame", videoFrame.toJson());
  return _liveCodeWithResult(result);
}