FlyleafME 2.0.0-preview.2
See the version list below for details.
dotnet add package FlyleafME --version 2.0.0-preview.2
NuGet\Install-Package FlyleafME -Version 2.0.0-preview.2
<PackageReference Include="FlyleafME" Version="2.0.0-preview.2" />
<PackageVersion Include="FlyleafME" Version="2.0.0-preview.2" />
<PackageReference Include="FlyleafME" />
paket add FlyleafME --version 2.0.0-preview.2
#r "nuget: FlyleafME, 2.0.0-preview.2"
#:package FlyleafME@2.0.0-preview.2
#addin nuget:?package=FlyleafME&version=2.0.0-preview.2&prerelease
#tool nuget:?package=FlyleafME&version=2.0.0-preview.2&prerelease
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
UIConfigto change appearance, playback bar behavior, subtitle styling, on-screen messages, and mouse gestures - Use
HeaderContentandOverlayContentto compose your own player UI - Use
RegisterDefaultPanels()for the built-in panels andRegisterPanel(...)to supply your own - Use
Media.Queuefor queue operations andMedia.Queue.AutoAdvance = trueto 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
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0-windows7.0 is compatible. |
-
net10.0-windows7.0
- FlyleafLib (>= 3.12.1 && < 4.0.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 |
- PlaybackBar: Fixes auto-hide when idle in standalone hosts
- PlaybackFeedback: Suppresses expected cancellation errors for interrupted opens/seeks
- PlaybackFeedback: Uses cancellation-aware seek results and improves seeking state handling
- Queue: Improves navigation responsiveness by interrupting superseded opens while preserving serialized requests
- Queue: Updates titles immediately during navigation and preserves custom titles on failed opens
- Queue: Highlights requested items immediately and automatically scrolls them into view
- Settings: Adds support for application-defined reset defaults
- Settings: Updates Player settings reset actions to use the configured reset source
- Settings: Preserves FlyleafLib defaults when no custom reset configuration is provided
- Settings: Clones mutable configuration values to prevent shared-state modifications