AudioManager class
Methods
-
file(File file, String title, {required String desc, required String cover, required bool auto})
→ Future<String>
-
This will load the file from the file-URI given by:
'file://${file.path}'
.
-
getCurrentVolume()
→ Future<double>
-
get current volume
-
next()
→ Future<String>
-
play next audio
-
nextMode({PlayMode? playMode, int? index})
→ PlayMode
-
Switch playback mode.
Playmode
priority is greater than index
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
onEvents(Events events)
→ void
-
callback events
-
play({int? index, bool? auto})
→ Future<String>
-
Play specified subscript audio if you want
-
playOrPause()
→ Future<bool>
-
Play or pause; that is, pause if currently playing, otherwise play
-
previous()
→ Future<String>
-
play previous audio
-
release()
→ dynamic
-
release all resource
-
seekTo(Duration position)
→ Future<String>
-
position
Move location millisecond timestamp.
-
setRate(AudioRate rate)
→ Future<String>
-
rate
Play rate, default AudioRate.rate100 is 1.0
-
setVolume(double value, {bool showVolume = false})
→ Future<String>
-
set volume range(0~1).
showVolume
: show volume view or not and this is only in iOS
⚠️ IOS simulator is invalid, please use real machine
-
start(String url, String title, {required String desc, required String cover, bool? auto})
→ Future<String>
-
Initial playback. Preloaded playback information
-
startInfo(AudioInfo audio, {required bool auto})
→ Future<String>
-
-
stop()
→ dynamic
-
stop play
-
toPause()
→ Future<bool>
-
to pause status
-
toPlay()
→ Future<bool>
-
to play status
-
toString()
→ String
-
A string representation of this object.
inherited
-
updateLrc(String lrc)
→ dynamic
-
Update play details