fvp 0.0.2 copy "fvp: ^0.0.2" to clipboard
fvp: ^0.0.2 copied to clipboard

Flutter video player plugin for all platforms

FVP #

Flutter Video Player Plugin based on libmdk for all desktop and mobile platforms.

Features #

  • All platforms: Windows, Linux, macOS, iOS, Android
  • Optimal render api: d3d11 for windows, metal for macOS/iOS, OpenGL for Linux and Android
  • Hardware decoders are enabled by default
  • Minimal code change for existing Video Player apps

How to Use #

Add 2 lines in your video_player examples

import 'package:fvp/fvp.dart';

MdkVideoPlayer.registerWith();

Build #

git submodule update --init
cd example
flutter run

Will download libmdk sdk if not found. You can also download the latest sdk for android, windows and linux manually and extract in android, windows and linux folder. macOS and iOS will download the latest sdk by cocoapods. To upgrade to the latest macOS/iOS sdk

cd examples/macos
pod deintegrate
pod cache clean mdk
pod install --verbose

TODO: #

  • Assets
  • Android vulkan rendering

Known Issues #

  • Memory leak on linux if a player is disposed

Design #

  • Playback control api in dart via ffi
  • Manage video renderers in platform specific manners. Receive player ptr via MethodChannel to construct player instance and set a renderer target.
  • Callbacks and events in C++ are notified by ReceivePort

Screenshots #

fpv_android fvp_win fvp_linux fvp_macos