sendStreamSyncInfo method

FutureOr<int> sendStreamSyncInfo(
  1. NSData data,
  2. ByteRTCStreamSyncInfoConfig config
)

@detail api @author wangjunzheng @brief Sends audio stream synchronization information. The message is sent to the remote end through the audio stream and synchronized with the audio stream. After the interface is successfully called, the remote user will receive rtcEngine:onStreamSyncInfoReceived:info:streamType:data:{@link #ByteRTCEngineDelegate#rtcEngine:onStreamSyncInfoReceived:info:streamType:data}. @param data Message content. @param config For configuration of media stream information synchronization. See ByteRTCStreamSyncInfoConfig{@link #ByteRTCStreamSyncInfoConfig}. @return - > = 0: Message sent successfully. Returns the number of successful sends. - -1: Message sending failed. Message length greater than 16 bytes. - -2: Message sending failed. The content of the incoming message is empty. - -3: Message sending failed. This screen stream was not published when the message was synchronized through the screen stream. - -4: Message sending failed. This audio stream is not yet published when you synchronize messages with an audio stream captured by a microphone or custom device, as described in the error code ByteRTCErrorCode{@link #ByteRTCErrorCode}. @note

  • Regarding the frequency, we recommend no more than 50 calls per second.
  • When using ByteRTCRoomProfileInteractivePodcast as room profile, the data will be delivered. For other coom profiles, the data may be lost when the local user is muted.

Implementation

FutureOr<int> sendStreamSyncInfo(
    NSData data, ByteRTCStreamSyncInfoConfig config) async {
  return await nativeCall('sendStreamSyncInfo:config:', [data, config]);
}