Files
plezy/lib/mpv/mpv.dart
T

56 lines
1.3 KiB
Dart
Raw Normal View History

2025-11-27 07:32:07 +01:00
/// MPV Player library for Flutter.
///
/// This library provides a platform-agnostic interface for video playback
/// using MPV as the underlying player engine.
///
/// ## Features
///
/// - Stream-based reactive state updates
/// - Audio passthrough support for lossless audio
/// - Subtitle rendering with libass
/// - Hardware-accelerated decoding
/// - Cross-platform support (macOS, iOS, Android, Windows, Linux)
///
/// ## Usage
///
/// ```dart
/// import 'package:flutter_application_1/mpv/mpv.dart';
///
/// // Create a player
2025-12-02 16:53:54 +01:00
/// final player = Player();
2025-11-27 07:32:07 +01:00
///
/// // Configure player properties
/// await player.setProperty('hwdec', 'auto');
/// await player.setProperty('demuxer-max-bytes', '150000000');
/// await player.setAudioPassthrough(true);
///
/// // Open and play media
2025-12-02 16:53:54 +01:00
/// await player.open(Media('https://example.com/video.mp4'));
2025-11-27 07:32:07 +01:00
///
/// // Listen to state changes
/// player.streams.position.listen((position) {
/// print('Position: $position');
/// });
///
/// // Display video
2025-12-02 16:53:54 +01:00
/// Video(
2025-11-27 07:32:07 +01:00
/// player: player,
/// controls: (context) => MyCustomControls(),
/// )
///
/// // Clean up
/// await player.dispose();
/// ```
library;
// Player
2025-12-04 08:36:07 +01:00
export 'player/player.dart';
export 'player/player_state.dart';
export 'player/player_streams.dart';
2025-11-27 07:32:07 +01:00
// Models
2025-12-15 01:16:22 +01:00
export 'models.dart';
2025-11-27 07:32:07 +01:00
// Video
2025-12-15 01:16:22 +01:00
export 'video.dart';