Clarify documentation of setSpeed.

This commit is contained in:
Ryan Heise 2020-10-17 01:36:25 +11:00
parent ccbac04ba0
commit 9b5a82fd16
1 changed files with 6 additions and 1 deletions

View File

@ -590,7 +590,12 @@ class AudioPlayer {
await (await _platform).setVolume(SetVolumeRequest(volume: volume));
}
/// Sets the playback speed of this player, where 1.0 is normal speed.
/// Sets the playback speed of this player, where 1.0 is normal speed. Note
/// that on iOS, calls to [setSpeed] may ignored if the underlying media
/// doesn't support speed changes (e.g. live streams). On Android, values in
/// excess of 1.0 may result in stalls if the playback speed is faster than
/// the player is able to downloaded the audio (this should not happen with
/// locally-stored audio files).
Future<void> setSpeed(final double speed) async {
if (_disposed) return;
_playbackEvent = _playbackEvent.copyWith(