AudioPlayerState

public enum AudioPlayerState
extension AudioPlayerState: Equatable

Identifies the player state.

  • Initial state, prior to acting on the first Play directive.

    Declaration

    Swift

    case idle
  • Indicates that audio is currently playing.

    Declaration

    Swift

    case playing
  • Indicates that audio playback was stopped due to an error or a directive which stops or replaces the current stream.

    Declaration

    Swift

    case stopped
  • Indicates that the audio stream has been paused.

    temporary true: Indicates taht the audio stream has been paused by FocusState.background. It will be resume when changed to FocusState.foreground.

    In this case, “playerActivity” in AudioPlayerAgent‘s context is “PLAYING”

    Declaration

    Swift

    case paused(temporary: Bool)
  • Indicates that playback has finished.

    Declaration

    Swift

    case finished