sendStreamSyncInfo method
- required ArrayBuffer data,
- required StreamSyncInfoConfig config,
@detail api @author wangjunzheng @brief Send 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 a onStreamSyncInfoReceived{@link #IRTCEngineEventHandler#onStreamSyncInfoReceived} callback. @param data Message content. @param config Configuration related to audio stream synchronization information. See StreamSyncInfoConfig{@link #StreamSyncInfoConfig}. @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 ErrorCode{@link #ErrorCode}. @note
- Regarding the frequency, we recommend no more than 50 calls per second.
- When using
CHANNEL_PROFILE_INTERACTIVE_PODCASTas room profile, the data will be delivered. For other coom profiles, the data may be lost when the local user is muted.
Implementation
Future<int?> sendStreamSyncInfo(
{required ArrayBuffer data, required StreamSyncInfoConfig config}) async {
$a() => ($instance as $p_a.RTCEngine).sendStreamSyncInfo(
data, unpackObject<$p_a.StreamSyncInfoConfig>(config));
$i() => ($instance as $p_i.ByteRTCEngine).sendStreamSyncInfo(
data, unpackObject<$p_i.ByteRTCStreamSyncInfoConfig>(config));
if (Platform.isAndroid) {
return $a();
} else if (Platform.isIOS) {
return $i();
} else {
throw UnsupportedError(
'Not Support Platform ${Platform.operatingSystem}');
}
}