mpv_audio_kit library

mpv_audio_kit — Flutter audio player powered by libmpv.

Supports macOS, Windows, Linux, iOS, and Android.

Quick start

import 'package:mpv_audio_kit/mpv_audio_kit.dart';

final player = Player();

player.stream.position.listen((pos) => print(pos));
player.stream.playing.listen((p)   => print('playing: $p'));

await player.open(Media('https://example.com/audio.mp3'));
await player.play();

// ...
await player.dispose();

Classes

AudioDevice
Represents an audio output device detected by mpv.
AudioFilter
An audio filter applied to the mpv filter graph (--af).
AudioParams
Audio format parameters as reported by the mpv audio output pipeline.
Media
A piece of media that can be loaded into the Player.
MpvAudioKit
Main class for global mpv_audio_kit configuration and initialization.
MpvEndFileError
Playback of a file ended with an error or unexpected EOF.
MpvError
MpvFileEndedEvent
Emitted for every file-end event, regardless of whether an error occurred.
MpvHookEvent
Emitted by PlayerStream.hook when mpv fires a registered hook.
MpvLogEntry
A structured log entry emitted by the mpv engine.
MpvLogError
A log message at error or fatal level from an mpv subsystem.
MpvPlayerError
Typed error events from the mpv engine.
Player
A high-performance audio player powered by libmpv.
PlayerConfiguration
Initial configuration for a Player instance.
PlayerState
Immutable snapshot of the Player's complete playback state.
PlayerStream
Typed event streams for subscribing to individual Player state changes.
Playlist
An ordered list of Media items loaded into the Player.

Enums

MpvEndFileReason
Why a file ended — mirrors mpv_end_file_reason from the C API.
PlaylistMode
The repeat / loop mode for the player's playlist.

Exceptions / Errors

MpvLibraryException
Exception thrown when the libmpv shared library cannot be loaded or resolved.