FlyleafME 2.0.0-preview.3

This is a prerelease version of FlyleafME.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package FlyleafME --version 2.0.0-preview.3
                    
NuGet\Install-Package FlyleafME -Version 2.0.0-preview.3
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="FlyleafME" Version="2.0.0-preview.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="FlyleafME" Version="2.0.0-preview.3" />
                    
Directory.Packages.props
<PackageReference Include="FlyleafME" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add FlyleafME --version 2.0.0-preview.3
                    
#r "nuget: FlyleafME, 2.0.0-preview.3"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package FlyleafME@2.0.0-preview.3
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=FlyleafME&version=2.0.0-preview.3&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=FlyleafME&version=2.0.0-preview.3&prerelease
                    
Install as a Cake Tool

FlyleafME

FlyleafME is a reusable WPF media player control powered by FlyleafLib. It combines a video surface with customizable playback controls, a queue and slideshow, subtitles, on-screen messages, and dockable panels.

FlyleafME is the successor to the FlyleafLib.Controls.WPF package. The new package ID and assembly are FlyleafME, and the public namespace is Flyleaf.Controls.WPF.

Install

Use a WPF project targeting net10.0-windows.

dotnet add package FlyleafME --prerelease

Omit --prerelease when installing a stable release. The package brings in the managed FlyleafLib dependency. Put the compatible native FFmpeg DLLs in an FFmpeg folder beside your executable and choose a project platform that matches the DLLs, such as x64. Flyleaf downloads

Quick start

In this example, the WPF project is named PlayerDemo. Use your project's namespace in the XAML and code.

Load the control templates in App.xaml

Merge the FlyleafME resource dictionaries so WPF can render the playback bar and overlay layout.

<Application x:Class="PlayerDemo.App"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             StartupUri="MainWindow.xaml">
    <Application.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="pack://application:,,,/FlyleafME;component/Themes/Dark.xaml"/>
                <ResourceDictionary Source="pack://application:,,,/FlyleafME;component/Themes/Controls.xaml"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Application.Resources>
</Application>

Start the engine in App.xaml.cs

Initialize the engine once on the UI thread, before creating any players.

using System;
using System.IO;
using System.Windows;
using FlyleafLib;

namespace PlayerDemo;

public partial class App : Application
{
    protected override void OnStartup(StartupEventArgs e)
    {
        Engine.Start(new EngineConfig
        {
            FFmpegPath = Path.Combine(AppContext.BaseDirectory, "FFmpeg")
        });

        base.OnStartup(e);
    }
}

Add the control in MainWindow.xaml

<Window x:Class="PlayerDemo.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:me="clr-namespace:Flyleaf.Controls.WPF;assembly=FlyleafME"
        Title="FlyleafME Demo" Width="800" Height="450">
    <DockPanel>
        <Button x:Name="OpenFileButton" DockPanel.Dock="Top" Content="Open file" Click="OpenFile_Click"/>
        <me:FlyleafME x:Name="Media">
            <me:FlyleafME.OverlayContent>
                <me:FlyleafOverlayLayout>
                    <me:FlyleafOverlayLayout.BottomContent>
                        <me:FlyleafPlaybackBar x:Name="PlaybackBar"/>
                    </me:FlyleafOverlayLayout.BottomContent>
                </me:FlyleafOverlayLayout>
            </me:FlyleafME.OverlayContent>
        </me:FlyleafME>
    </DockPanel>
</Window>

Connect the player in MainWindow.xaml.cs

using System;
using System.Windows;
using Flyleaf.Controls.WPF;
using FlyleafLib.MediaPlayer;

namespace PlayerDemo;

public partial class MainWindow : Window
{
    private readonly Player player;
    private WindowState previousWindowState;

    public MainWindow()
    {
        InitializeComponent();

        player = new Player();
        Media.Player = player;
        Media.RegisterDefaultPanels();
        Media.UIConfig.PlaybackBar.Visibility = FlyleafVisibilityPolicy.Auto;
        Media.FullScreenChanged += Media_FullScreenChanged;
        PlaybackBar.MediaElement = Media;
    }

    private void OpenFile_Click(object sender, RoutedEventArgs e) => Media.OpenFile();

    private void Media_FullScreenChanged(object? sender, EventArgs e)
    {
        if (Media.IsFullScreen)
        {
            previousWindowState = WindowState;
            WindowStyle = WindowStyle.None;
            ResizeMode = ResizeMode.NoResize;
            OpenFileButton.Visibility = Visibility.Collapsed;
            WindowState = WindowState.Maximized;
        }
        else
        {
            WindowStyle = WindowStyle.SingleBorderWindow;
            ResizeMode = ResizeMode.CanResize;
            OpenFileButton.Visibility = Visibility.Visible;
            WindowState = previousWindowState;
        }
    }

    protected override void OnClosed(EventArgs e)
    {
        Media.FullScreenChanged -= Media_FullScreenChanged;
        PlaybackBar.MediaElement = null;
        Media.Player = null;
        Media.Dispose();
        player.Dispose();
        base.OnClosed(e);
    }
}

Open a local file with the button. Playback starts automatically with the default player settings. To open a path or URL from code, call Media.OpenInput(pathOrUrl) on the UI thread.

Double-click the video or use the fullscreen button to toggle the borderless maximized window. Press Esc to return to the previous window state. FlyleafME raises FullScreenChanged when its state changes, and the host window applies the window changes.

Common tasks

The examples use Media from the quick start. Call them from the UI thread, for example in a button click handler.

Configure playback bar visibility

In Auto, the bar stays visible before media is opened and hides after mouse inactivity once media is open. Moving the mouse over the video brings it back. Idle detection uses the engine's UIRefresh setting, which is enabled by default.

Media.UIConfig.PlaybackBar.Visibility = FlyleafVisibilityPolicy.Auto;
Media.UIConfig.PlaybackBar.AutoHideDelayMilliseconds = 3000;

Choose Always or Never for fixed visibility. Leave the bar's WPF Visibility property unset to use the built-in policy.

Queue files and play them in order

var first = Media.Queue.Add(@"C:\Media\first.mp4");
Media.Queue.Add(@"C:\Media\second.mp4");
Media.Queue.AutoAdvance = true;
Media.Queue.Open(first);

The queue also advances through still images as a slideshow. Set Media.UIConfig.Queue.SlideShowIntervalMilliseconds to control how long each still image is shown.

Dock the queue panel

After the control has loaded, open a panel registered by RegisterDefaultPanels().

Media.ShowPanel("queue", FlyleafPanelMode.Docked, FlyleafPanelSide.Right);

Change the theme and show a message

Media.UIConfig.Appearance.Theme = FlyleafTheme.Light;
Media.UIConfig.Appearance.Accent = FlyleafAccent.Teal;
Media.ShowOSD("Playback ready");

Customize the control

  • Use UIConfig to change appearance, playback bar behavior, subtitle styling, on-screen messages, and mouse gestures
  • Use HeaderContent and OverlayContent to compose your own player UI
  • Use RegisterDefaultPanels() for the built-in panels and RegisterPanel(...) to supply your own
  • Use Media.Queue for queue operations and Media.Queue.AutoAdvance = true to enable automatic progression and slideshow playback

Your application owns the player lifecycle and decides when to save settings and panel layouts. Use FlyleafUIConfigSerializer to serialize the control preferences and CapturePanelLayout() and RestorePanelLayout(...) to save and restore panel placements.

See the Flyleaf desktop player source for an example with multiple windows, profiles, and playlist management.

License

LGPL-3.0-or-later

Product Compatible and additional computed target framework versions.
.NET net10.0-windows7.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0-windows7.0

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.0-preview.4 0 11/26/2026
2.0.0-preview.3 44 11/24/2026
2.0.0-preview.2 55 11/23/2026
2.0.0-preview.1 61 11/20/2026

Downloads & Recordings
- Introduces a shared download manager with configurable concurrent downloads
- Adds a Downloads panel with Docked, Floating and Overlay modes
- Supports individual and batch downloads with start, pause, resume and stop controls
- Supports Automatic and Custom download modes with embedded and external stream selection
- Supports automatic filename and container selection with optional overrides
- Supports scheduled recordings with configurable start date/time and recording duration
- Integrates downloading directly into the queue context menu

DVD & Blu-ray Playback
- Adds DVD and Blu-ray playback with runtime FFmpeg capability detection
- Adds Open Disc and Add Disc commands with automatic disc type detection
- Supports title, playlist, chapter and angle selection
- Adds native Blu-ray MPLS metadata parsing and playlist duration filtering
- Supports adding multiple disc titles to the queue
- Displays friendly disc and playlist titles throughout the UI

Queue & Search
- Adds live queue search and filtering without affecting playback order or queue persistence
- Adds Quick Queue Search with keyboard navigation and configurable Ctrl+F keybinding
- Reorganizes queue toolbar and context menus with consistent Open, Add and Paste operations

On-Screen Display (OSD)
- Redesigns the OSD with independent clock, queue, status, action and error regions
- Adds configurable playback clock positioning and optional millisecond precision
- Adds queue position, item count and media title with configurable visibility
- Improves dynamic positioning based on player activity and playback bar visibility
- Improves transient and blocking error presentation and automatic clearing
- Extends OSD configuration and settings

Capture Devices
- Adds audio and video capture device selection through the main context menu and corresponding panels
- Supports dynamic device enumeration and camera capture format selection

API & Other Improvements
- Exposes ShowError API for consistent error reporting from hosting applications
- Improves main context menu consistency
- Improves keyboard focus and keybinding handling
- Fixes LIVE indicator visibility when closing an input