updateCurrentAudioPlayInfo method

dynamic updateCurrentAudioPlayInfo({
  1. required double progress,
  2. required bool isCompleted,
  3. bool? isPaused,
})

function for updating currently played audio information progress (required) progress of currently played audio isCompleted (required) whether currently played audio is finished isPaused (optional) whether currently played audio is paused

Implementation

updateCurrentAudioPlayInfo({
  required double progress,
  required bool isCompleted,
  bool? isPaused,
}) {
  if (_audioPlayInfo != null) {
    _currentPlayAudioInfo = CurrentPlayAudioInfo(
      progress: progress,
      playInfo: _audioPlayInfo!,
      isCompleted: isCompleted,
      isPaused: isPaused ?? false,
    );
    notifyListener(TencentCloudChatMessageDataKeys.currentPlayAudioInfo as T);
  }
}