From 3d5eaf7a5f77e65ef8c1628f47624e3dd7458373 Mon Sep 17 00:00:00 2001 From: Ryan Heise Date: Tue, 5 Jan 2021 14:26:07 +1100 Subject: [PATCH] Document iOS gapless looping. --- just_audio/lib/just_audio.dart | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/just_audio/lib/just_audio.dart b/just_audio/lib/just_audio.dart index 0f7bf9f..3a16f23 100644 --- a/just_audio/lib/just_audio.dart +++ b/just_audio/lib/just_audio.dart @@ -779,12 +779,8 @@ class AudioPlayer { await (await _platform).setSpeed(SetSpeedRequest(speed: speed)); } - /// Sets the [LoopMode]. The gapless looping support is as follows: - /// - /// * Android: supported - /// * iOS/macOS: not supported, however, gapless looping can be achieved by - /// using [LoopingAudioSource]. - /// * Web: not supported + /// Sets the [LoopMode]. Looping will be gapless on Android, iOS and macOS. On + /// web, there will be a slight gap at the loop point. Future setLoopMode(LoopMode mode) async { if (_disposed) return; _loopModeSubject.add(mode); @@ -1854,10 +1850,6 @@ class ClippingAudioSource extends IndexedAudioSource { // An [AudioSource] that loops a nested [AudioSource] a finite number of times. // NOTE: this can be inefficient when using a large loop count. If you wish to // loop an infinite number of times, use [AudioPlayer.setLoopMode]. -// -// On iOS and macOS, note that [LoopingAudioSource] will provide gapless -// playback while [AudioPlayer.setLoopMode] will not. (This will be supported -// in a future release.) class LoopingAudioSource extends AudioSource { AudioSource child; final int count;