sendSEIMessage abstract method

Future<int?> sendSEIMessage({
  1. StreamIndex streamIndex = StreamIndex.main,
  2. required Uint8List message,
  3. required int repeatCount,
  4. SEICountPerFrame mode = SEICountPerFrame.single,
})

Sends SEI data.

In a video call scenario, SEI is sent with the video frame, while in a voice call scenario, SDK will automatically publish a black frame with a resolution of 16px × 16px to carry SEI data.

streamIndex specifies the type of media stream that carries SEI data.
In a voice call, you should set this parameter to main, otherwise the SEI data is discarded and cannot be sent to the remote user.

The length of message must not exceed 4KB.

repeatCount: Number of times a message is sent repeatedly. The value range is [0, max{29, %{video frame rate}-1}]. Recommended range: [2,4].
After calling this API, the SEI data will be added to a consecutive repeatCount+1 number of video frames starting from the current frame.

mode: SEI sending mode.

Returned value:

  • >=0: The number of SEIs to be added to the video frame.
  • <0: Failure.

Notes:

  • We recommend the number of SEI messages per second should not exceed the current video frame rate. In a voice call, the blank-frame rate is 15 fps.
  • In a voice call, this API can be called to send SEI data only in internal capture mode.
  • Each video frame carries only the SEI data received within 2s before and after. In a voice call scenario, if no SEI data is sent within 1min after calling this API, SDK will automatically cancel publishing black frames.
  • After the message is sent successfully, the remote user who subscribed the video stream will receive RTCVideoEventHandler.onSEIMessageReceived.
  • When you switch from a voice call to a video call, SEI data will automatically start to be sent with normally captured video frames instead of black frames.

Implementation

Future<int?> sendSEIMessage({
  StreamIndex streamIndex = StreamIndex.main,
  required Uint8List message,
  required int repeatCount,
  SEICountPerFrame mode = SEICountPerFrame.single,
});