just_audio
0.10.6, released 5 months ago by ryanheise.com
Feature‑rich audio player for Flutter supporting gapless playlists and multiple sources
What it does
just_audio provides a Flutter plugin that can play audio from assets, files, URLs or streams. It supports gapless playlists, looping, shuffling, headers, caching and background audio.
AI-written summary of version 0.10.6, based on the package's README and metadata. Report an inaccuracy
Use it when
- Playing audio in a Flutter app
- Creating gapless playlists or multi‑track sequences
- Need background audio support
- Managing multiple independent players
Skip it when
- Replacing native audio frameworks for low‑level audio processing
- Using it in non‑Flutter native projects
Strengths
- Wide platform support (Android, iOS, macOS, web, Linux, Windows)
- Rich API for playlists, looping, shuffling and headers
- Gapless playback and precise position control
- Active maintenance and recent releases
Weaknesses
- Requires native configuration for HTTP headers (proxy or native APIs)
- Some features need platform‑specific setup (e.g., Android AGP, iOS audio session)
- Large dependency tree (multiple native plugins)
Setup
- Kind
- Plugin (native code)
- Effort
- Medium
- Code generation
- No
- Direct dependencies
- 11
Add just_audio to pubspec, run flutter pub get. For HTTP headers enable non‑HTTPS proxy support on Android/iOS/macOS or set useProxyForRequestHeaders:false. Update Android build files for AGP 9 if using older projects.
import 'package:just_audio/just_audio.dart';
final player = AudioPlayer();
await player.setUrl('https://foo.com/bar.mp3');
player.play();Alternatives
Packages that do the same job and could replace just_audio.
- audioplayers
Simpler API, fewer native dependencies, good for basic playback
87Compare - media_kit
More advanced media handling, supports video and advanced features
76Compare
Works with
Packages commonly used together with just_audio: ones it builds on, ones built on it, and its own family.
- cryptojust_audio depends on itProvides SHA, MD5, and HMAC hashing functions for Dart.
- uuidjust_audio depends on itGenerates and parses RFC‑4122/9562 UUIDs (v1‑v8) for Dart.
- asyncjust_audio depends on itUtility classes and helpers that extend Dart's async library.
- path_providerjust_audio depends on itProvides Flutter APIs to locate common filesystem directories on Android, iOS, macOS, Linux and Windows.
- rxdartjust_audio depends on itImplementation of the ReactiveX API for asynchronous programming leveraging native Dart Streams.
- synchronizedjust_audio depends on itLock mechanism to prevent concurrent access to asynchronous code.
- audio_sessionjust_audio depends on itManages iOS audio session categories, Android audio attributes, and audio focus/ducking.
- just_audio_webjust_audio depends on itWeb platform implementation of just_audio for audio playback.