video_player_win
3.3.1, released 5 weeks ago by an unverified publisher
Windows implementation of the video_player plugin using Media Foundation API.
What it does
Provides a lightweight video player implementation for Windows that leverages the built-in Windows Media Foundation API. It can be used alongside the video_player plugin to support Windows platforms with GPU hardware acceleration.
AI-written summary of version 3.3.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- You are building a Flutter app for Windows that needs to play videos or audio.
- You want to use the official video_player API while adding Windows desktop support.
Skip it when
- You need to play HLS (.m3u8) streams.
- You are targeting platforms other than Windows with this specific package alone.
Strengths
- GPU hardware acceleration with low CPU usage.
- Supports 4K 60fps video playback.
- Small footprint with no third-party libraries inside and a single DLL file.
Weaknesses
- Does not support HLS (.m3u8) streams.
- Relies on preloaded Windows codecs or requires external codec packs for certain media formats.
Setup
- Kind
- Plugin (native code)
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 2
Add video_player and video_player_win to pubspec.yaml. May require administrator mode for building if MSB3073 occurs.
import 'dart:io';
import 'package:flutter/material.dart';
import 'package:video_player_win/video_player_win.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatefulWidget {
const MyApp({Key? key}) : super(key: key);
@override
State<MyApp> createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
late VideoPlayerController controller;
@override
void initState() {
super.initState();
controller = VideoPlayerController.file(File("E:\\test.mp4"));
controller.initialize().then((value) {
if (controller.value.isInitialized) {
controller.play();
setState(() {});
}
});
}
@override
void dispose() {
controller.dispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
body: Center(child: VideoPlayer(controller)),
),
);
}
}Alternatives
Packages that do the same job and could replace video_player_win.
- media_kit
A comprehensive media player for Flutter supporting more formats and platforms out of the box.
76Compare - just_audio
Focuses heavily on advanced audio playback features and playlist management.
80Compare
Works with
Packages commonly used together with video_player_win: ones it builds on, ones built on it, and its own family.
- plugin_platform_interfacevideo_player_win depends on itReusable base class for platform interfaces of Flutter federated plugins.
- genuiBuilt on video_player_winGenerates and displays dynamic user interfaces in Flutter using AI.
- video_player_control_panelBuilt on video_player_winA control panel UI widget laid on top of VideoPlayer with play, pause, seek, and fullscreen support.
- adaptive_video_playerBuilt on video_player_winFlutter video player package for YouTube and direct video URLs with adaptive controls.