'how use funtion rate in audio_service flutter
I'm creating an audio player and I already have most of its functionality; however, I need the function to speed up the audio playback. I cannot find that function in the package I'm using.
If anyone knows of any tutorial on how to use this function to speed up the audio speed, I would appreciate it.
Solution 1:[1]
/// Sets the playback rate - call this after first calling play() or resume().
///
/// iOS and macOS have limits between 0.5 and 2x
/// Android SDK version should be 23 or higher.
/// not sure if that's changed recently.
Future<int> setPlaybackRate({double playbackRate = 1.0}) {
return _invokeMethod('setPlaybackRate', {'playbackRate': playbackRate});
}
you can try like this or not?
audioplayers: ^0.16.1
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | jalen2024 |
