1 audio mobile android flutter just-audio
我正在使用just_audio并且效果很好。
但似乎找不到快进或快退的方法。
更新:事实证明 just_audio 是audio_service包的一部分,使用audio_service 解决了我的问题。
小智 7
player.seek(Duration(seconds: player.position.inSeconds - 15));
快退 15 秒
player.seek(Duration(seconds: player.position.inSeconds + 15));
快进 15 秒'
IconButton(
icon: Icon(
Icons.replay_10,
color: Colors.white,
),
iconSize: 25,
onPressed: () async {
await player.seek(Duration(seconds: player.position.inSeconds - 15));
},
)`
Run Code Online (Sandbox Code Playgroud)
来自player
AudioPlayer player
归档时间: |
|
查看次数: |
1582 次 |
最近记录: |