sendPublicStreamSEIMessage method
- int channelId,
- ArrayBuffer message,
- int repeatCount,
- SEICountPerFrame mode,
@hidden for internal use only
@valid since 3.56
@detail api
@hiddensdk(audiosdk)
@author wangzhanqiang
@brief <span id="IRTCEngine-sendseimessage-2"></span> WTN stream sends SEI data.
@param channelId SEI message channel id. The value range is 0 - 255. With this parameter, you can set different ChannelIDs for different recipients. In this way, different recipients can choose the SEI information based on the ChannelID received in the callback.
@param message SEI data.
@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 repeat_count+1 number of video frames starting from the current frame.
@param mode SEI sending mode. See SEICountPerFrame{@link #SEICountPerFrame}.
@return
- < 0:Failure
- = 0: You are unable to send SEI as the current send queue is full.
- > 0: Success, and the value represents the amount of sent SEI.
@note
- We recommend the number of SEI messages per second should not exceed the current video frame rate.
- 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 onWTNSEIMessageReceived{@link #IWTNStreamEventHandler#onWTNSEIMessageReceived}.
- When the call fails, neither the local nor the remote side will receive a callback.
Implementation
Future<int?> sendPublicStreamSEIMessage(int channelId, ArrayBuffer message,
int repeatCount, SEICountPerFrame mode) async {
$a() => ($instance as $p_a.RTCEngine).sendPublicStreamSEIMessage(channelId,
message, repeatCount, t_SEICountPerFrame.code_to_android(mode));
$i() => ($instance as $p_i.ByteRTCEngine).sendPublicStreamSEIMessage(
channelId, 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}');
}
}