rtcRoom$onSubtitleStateChanged$errorCode$errorMessage method

FutureOr<void> rtcRoom$onSubtitleStateChanged$errorCode$errorMessage(
  1. dynamic rtcRoom,
  2. dynamic state,
  3. dynamic errorCode,
  4. dynamic errorMessage,
)
override

@hidden currently not available @detail callback @author qiaoxingwang @brief Callback on subtitle states.
After you call startSubtitle:{@link #ByteRTCRoom#startSubtitle} and stopSubtitle{@link #ByteRTCRoom#stopSubtitle}, you will receive this callback which informs you of the states and error codes of the subtitling task, as well as detailed information on the third party services' errors. @param rtcRoom ByteRTCRoom instance. @param state The states of subtitles. Refer to ByteRTCSubtitleState{@link #ByteRTCSubtitleState} for details. @param errorCode Error codes of the subtitling task. Refer to ByteRTCSubtitleErrorCode{@link #ByteRTCSubtitleErrorCode} for details. @param errorMessage Detailed information on the third party services' errors. If the states of subtitles are changed due to the third party services, you will receive this parameter which informs you of the detailed information on the third party services' errors.

Implementation

FutureOr<void> rtcRoom$onSubtitleStateChanged$errorCode$errorMessage(
    dynamic rtcRoom,
    dynamic state,
    dynamic errorCode,
    dynamic errorMessage) async {
  if ($instance == null || $instance is! IRTCRoomEventHandler) {
    return;
  }
  return ($instance as IRTCRoomEventHandler).onSubtitleStateChanged?.call(
      t_SubtitleState.ios_to_code($p_i.ByteRTCSubtitleState.values
          .firstWhere((t) => t.$value == state || t.name == state)),
      t_SubtitleErrorCode.ios_to_code($p_i.ByteRTCSubtitleErrorCode.values
          .firstWhere((t) => t.$value == errorCode || t.name == errorCode)),
      errorMessage.toString());
}