Package 

Class AudioPlayerViewModel

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private final StateFlow<AudioPlayerState> state
    • Constructor Summary

      Constructors 
      Constructor Description
      AudioPlayerViewModel(AudioPlayerController controller)
    • Method Summary

      Modifier and Type Method Description
      final StateFlow<AudioPlayerState> getState() State of the audio player.
      final Unit playOrPause(Attachment attachment) Play or pause the audio.
      final Unit pause() Pause any running audio.
      final Unit changeSpeed(Attachment attachment) Change the speed of the audio.
      final Unit seekTo(Attachment attachment, Float progress) Seek to a specific progress in the audio.
      final Unit startSeek(Attachment attachment) Start seeking the audio.
      final Unit reset(Attachment attachment) Stop seeking the audio.
      • Methods inherited from class io.getstream.chat.android.compose.viewmodel.messages.AudioPlayerViewModel

        addCloseable, addCloseable, addCloseable, getCloseable
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AudioPlayerViewModel

        AudioPlayerViewModel(AudioPlayerController controller)
    • Method Detail

      • getState

         final StateFlow<AudioPlayerState> getState()

        State of the audio player.

      • playOrPause

         final Unit playOrPause(Attachment attachment)

        Play or pause the audio.

      • pause

         final Unit pause()

        Pause any running audio.

      • changeSpeed

         final Unit changeSpeed(Attachment attachment)

        Change the speed of the audio.

      • seekTo

         final Unit seekTo(Attachment attachment, Float progress)

        Seek to a specific progress in the audio.

      • startSeek

         final Unit startSeek(Attachment attachment)

        Start seeking the audio.

      • reset

         final Unit reset(Attachment attachment)

        Stop seeking the audio.