setStreamExtraInfo method

Future<int?> setStreamExtraInfo(
  1. string extra_info
)

@detail api @region Stream Management @brief Sets extra information about the stream the local user publishes. @param extra_info Extra information of the stream. The length does not exceed 1024 bytes. @return - 0: Success. - < 0: Failure. @note - You can use this function to set extra information about the stream the local user publishes. Stream extra information is an additional information attached to the stream ID. Unlike the stream ID, the stream extra information can be modified during the publishing of the corresponding stream ID. Developers can use the stream extra information to synchronize the content of the stream ID with the corresponding stream ID. - You can call this API before or after you call joinRoom{@link #RTCRoom#joinRoom}. - Other users in the same room will receive the notification through onRoomStreamExtraInfoUpdate{@link #IRTCRoomEventHandler#onRoomStreamExtraInfoUpdate}.

Implementation

Future<int?> setStreamExtraInfo(string extra_info) async {
  $a() => ($instance as $p_a.RTCRoom).setStreamExtraInfo(extra_info);
  $i() => ($instance as $p_i.ByteRTCRoom).setStreamExtraInfo(extra_info);

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