AudioPlaybackControlProtocol
@objc(LwayveAudioPlaybackControlProtocol)
public protocol AudioPlaybackControlProtocol
The protocol that provides the additional interface for controlling the audio playback.
-
Determine if the audio player is ready to play an audio track. If
true
is returned, the audio player is ready.Declaration
Swift
var isReadyToPlay: Bool { get }
-
Determine if the skip action can be performed in the audio player.
Declaration
Swift
var canSkip: Bool { get }
-
Determine if the rewind action can be performed in the audio player.
Declaration
Swift
var canRewind: Bool { get }
-
Indicates if the audio player is currently playing an audio track.
Declaration
Swift
var isPlaying: Bool { get }
-
Indicates if player is waiting for data to be loaded to continue playback.
Declaration
Swift
var isWaitingForCurrentTrackToBeLoaded: Bool { get }
-
Start playing queued audio tracks.
Seealso
isPlaying
Declaration
Swift
func play()
-
Pause the playback of the current audio track.
Declaration
Swift
func pause()
-
End the playback of the current audio track and remove all audio tracks from the queue.
Declaration
Swift
func stop()
-
End the playback of the current audio track and start the playback of the next audio track in the queue (if there is one).
Declaration
Swift
func skip()
-
Restart the current audio track from the beginning if it has played for greater than or equal to
kLwayveAudioPlaybackControlRewindThreshold
seconds; otherwise, start playing the previous audio track (if any). If there is no previous audio track, start the current audio track from the beginning.Declaration
Swift
func rewind()