Skip to content
pubscout

media_kit

1.2.6, released 11 months ago by media-kit.dev

Cross‑platform video and audio player for Flutter and Dart

WASM-ready
$ flutter pub add media_kit
Source repository

What it does

Provides a unified Player API that supports video, audio, subtitles, playlists, and hardware acceleration on Android, iOS, web, macOS, Windows, and Linux.

AI-written summary of version 1.2.6, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need a single package that handles both video and audio playback
  • You require hardware/GPU acceleration and wide format support
  • You want to avoid multiple platform‑specific player packages

Skip it when

  • You only need simple audio playback
  • You prefer a minimal dependency footprint
  • You are targeting a single platform and can use a native player

Strengths

  • Wide format and codec support
  • Hardware/GPU acceleration
  • Playlist and track selection features
  • Extensible via separate video/audio libraries

Weaknesses

  • Requires additional native libraries (media_kit_libs_video/audio)
  • Setup complexity for native dependencies
  • Large bundle size if both video and audio are used

Setup

Kind
Pure Dart
Effort
Medium
Code generation
No
Direct dependencies
11

Add media_kit, media_kit_video, and media_kit_libs_video (or audio) to pubspec. Call MediaKit.ensureInitialized() before runApp. No build_runner needed.

import 'package:media_kit/media_kit.dart';\nimport 'package:media_kit_video/media_kit_video.dart';\n\nvoid main(){\n  WidgetsFlutterBinding.ensureInitialized();\n  MediaKit.ensureInitialized();\n  runApp(const MaterialApp(home: MyScreen()));\n}\n\nclass MyScreen extends StatefulWidget{\n  const MyScreen({Key? key}) : super(key:key);\n  @override\n  State<MyScreen> createState()=>_MyScreenState();\n}\n\nclass _MyScreenState extends State<MyScreen>{\n  late final player=Player();\n  @override\n  void initState(){\n    super.initState();\n    player.open(const Media('https://example.com/video.mp4'));\n  }\n  @override\n  Widget build(BuildContext context)=>Video(controller: VideoController(player));\n}

Alternatives

Packages that do the same job and could replace media_kit.

Works with

Packages commonly used together with media_kit: ones it builds on, ones built on it, and its own family.