INNER CODE UNIT · Dart
KoelAudioHandler
koel/player · lib/audio_handler.dart:16
class KoelAudioHandler extends BaseAudioHandler with QueueHandler, SeekHandler {
/// How many songs in a row may fail before playback gives up rather than
/// keep skipping. Low, because the common cause of a run of failures is a
/// dead connection, and each skip costs the user their place in the queue.
static const MAX_ERROR_COUNT = 3;
late final DownloadProvider downloadProvider;
late final PlayableProvider playableProvider;
late AudioServiceRepeatMode repeatMode;
/// How long a source is given to become playable before we give up on it.
/// Without this, a stalled connection leaves the player in `loading`
/// indefinitely: neither just_audio nor the platform player time out on
/// their own, so the future never completes and never throws.
final Duration sourceLoadTimeout;
var _errorCount = 0;
var _initialized = false;