Skip to content
pubscout

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.

$ flutter pub add video_player_win
Source repository

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.

  • just_audio

    Focuses heavily on advanced audio playback features and playlist management.

Works with

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