AudioPlayerService class
音频播放服务
Constructors
- AudioPlayerService()
-
factory
Properties
- currentPlayingPath → String?
-
当前播放的文件路径
no setter
-
durationStream
→ Stream<
Duration> -
音频时长流
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- isPlaying → bool
-
是否正在播放
no setter
-
positionStream
→ Stream<
Duration> -
播放位置流
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
stateStream
→ Stream<
AudioPlayerState> -
播放状态流
no setter
Methods
-
dispose(
) → void - 释放资源
-
getAudioDuration(
String filePath) → Future< Duration?> - 获取音频时长
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
pauseAudio(
) → Future< void> - 暂停播放
-
playAudio(
String filePath) → Future< bool> - 播放音频文件
-
resumeAudio(
) → Future< void> - 恢复播放
-
seekTo(
Duration position) → Future< void> - 设置播放位置
-
stopAudio(
) → Future< void> - 停止播放
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited