rtcEngine$onAudioMixingPlayingProgress$progress method

FutureOr<void> rtcEngine$onAudioMixingPlayingProgress$progress(
  1. dynamic engine,
  2. dynamic mixId,
  3. dynamic progress
)
override

@detail callback @author songxiaomeng.19 @brief Callback for playback progress of mixed audio files @param engine Current RTC SDK object @param mixId ID of the mixing task @param progress The current playback progress (ms) of the mixed audio file @note After calling setAudioMixingProgressInterval:interval: to set the time interval to a value greater than 0, or calling startAudioMixing:filePath:config: to set the time interval in ByteRTCAudioMixingConfig to a value greater than 0, the SDK will trigger the callback according to the set time interval.

Implementation

FutureOr<void> rtcEngine$onAudioMixingPlayingProgress$progress(
    dynamic engine, dynamic mixId, dynamic progress) async {
  if ($instance == null || $instance is! IRTCEngineEventHandler) {
    return;
  }
  return ($instance as IRTCEngineEventHandler)
      .onAudioMixingPlayingProgress
      ?.call(int.tryParse(mixId.toString()) ?? 0,
          int.tryParse(progress.toString()) ?? 0);
}