sendSEIMessage method

Future<int?> sendSEIMessage(
  1. ArrayBuffer message,
  2. int repeatCount,
  3. SEICountPerFrame mode
)

@detail api @hiddensdk(audiosdk) @author wangzhanqiang @brief <span id="RTCEngine-sendseimessage-2"></span>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 16 × 16 pixels to carry SEI data. @param message SEI data. No more than 4 KB SEI data per frame is recommended. @param 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. @param mode SEI sending mode. See SEICountPerFrame{@link #SEICountPerFrame}. @return - >= 0: The number of SEIs to be added to the video frame - < 0: Failure. See ReturnStatus{@link #ReturnStatus} for more details. @note - 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. - In a video call, the custom captured video frame can also be used for sending SEI data if the original video frame contains no SEI data, otherwise calling this method will not take effect. - Each video frame carrys 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 your video stream will receive onSEIMessageReceived{@link #IRTCEngineEventHandler#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(
    ArrayBuffer message, int repeatCount, SEICountPerFrame mode) async {
  $a() => ($instance as $p_a.RTCEngine).sendSEIMessage(
      message, repeatCount, t_SEICountPerFrame.code_to_android(mode));
  $i() => ($instance as $p_i.ByteRTCEngine).sendSEIMessage(
      message, repeatCount, t_SEICountPerFrame.code_to_ios(mode));

  if (Platform.isAndroid) {
    return $a();
  } else if (Platform.isIOS) {
    return $i();
  } else {
    throw UnsupportedError(
        'Not Support Platform ${Platform.operatingSystem}');
  }
}