FlyleafME 2.0.0-preview.1

This is a prerelease version of FlyleafME.
dotnet add package FlyleafME --version 2.0.0-preview.1
                    
NuGet\Install-Package FlyleafME -Version 2.0.0-preview.1
                    
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.1" />
                    
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.1" />
                    
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.1
                    
#r "nuget: FlyleafME, 2.0.0-preview.1"
                    
#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.1
                    
#: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.1&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=FlyleafME&version=2.0.0-preview.1&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 and App.xaml has StartupUri="MainWindow.xaml". Use your project's namespace in the XAML and code.

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 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 FlyleafLib.MediaPlayer;

namespace PlayerDemo;

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

    public MainWindow()
    {
        InitializeComponent();

        player = new Player();
        Media.Player = player;
        Media.RegisterDefaultPanels();
        PlaybackBar.MediaElement = Media;
    }

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

    protected override void OnClosed(EventArgs e)
    {
        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.

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.1 0 11/20/2026

First preview of the composed FlyleafME WPF control for .NET 10.