AudioPlayer class
Methods
-
dispose()
→ Future<void>
-
-
getCurrentPlayingAudioIndex()
→ Future<int>
-
Gets current playing audio index
-
getCurrentPosition()
→ Future<Duration>
-
Gets audio current playing position
-
getDuration()
→ Future<Duration>
-
Gets audio duration after setting url.
-
getPlaybackSpeed()
→ Future<double>
-
Gets the Playback speed
-
getVolume()
→ Future<double>
-
Gets audio volume
-
next()
→ Future<Result>
-
Plays the next song.
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
pause()
→ Future<Result>
-
Pauses the audio that is currently playing.
-
play(String url, {bool repeatMode = false, bool respectAudioFocus = false, Duration position = const Duration(milliseconds: 0), PlayerMode playerMode = PlayerMode.BACKGROUND, AudioNotification? audioNotification})
→ Future<Result>
-
Plays an audio.
-
playAll(List<String> urls, {int index = 0, bool repeatMode = false, bool respectAudioFocus = false, Duration position = const Duration(milliseconds: 0), PlayerMode playerMode = PlayerMode.BACKGROUND, List<AudioNotification> audioNotifications = const []})
→ Future<Result>
-
Plays your playlist.
-
previous()
→ Future<Result>
-
Plays the previous song.
-
release()
→ Future<Result>
-
Releases the resources associated with this audio player.
-
resume()
→ Future<Result>
-
Resumes the audio that has been paused.
-
seekIndex(int index)
→ Future<Result>
-
Switches to the desired index in playlist.
-
seekPosition(Duration position)
→ Future<Result>
-
Moves the cursor to the desired position.
-
setAudioNotification(AudioNotification audioNotification)
→ Future<Result>
-
Sets the AudioNotification for the single player, if you want to change specific
notification in AudioNotifications list use setSpecificAudioNotification.
-
setAudioNotifications(List<AudioNotification> audioNotifications)
→ Future<Result>
-
Sets the AudioNotifications for the playlist player.
-
setPlaybackSpeed(double speed)
→ Future<Result>
-
speed range is from 1-8.
1 is regular speed.
-
setRepeatMode(bool repeatMode)
→ Future<Result>
-
-
setSpecificAudioNotification(AudioNotification audioNotification, int index)
→ Future<Result>
-
Sets a sepcific AudioNotification in the AudioNotifications for the playlist player.
-
setVolume(double volume)
→ Future<Result>
-
Sets the volume (amplitude).
-
stop()
→ Future<Result>
-
Stops the audio that is currently playing.
-
toString()
→ String
-
A string representation of this object.
inherited