VOOZH about

URL: https://www.nuget.org/packages/VlcVideoPlayer.Avalonia/

⇱ NuGet Gallery | VlcVideoPlayer.Avalonia 1.4.0




VlcVideoPlayer.Avalonia 1.4.0

Suggested Alternatives

FFmpegVideoPlayer.Avalonia

Additional Details

This package is deprecated and no longer maintained.
Please migrate to FFmpegVideoPlayer.Avalonia for active support, bug fixes, and ongoing compatibility updates.
Install with: dotnet add package FFmpegVideoPlayer.Avalonia

dotnet add package VlcVideoPlayer.Avalonia --version 1.4.0
 
 
NuGet\Install-Package VlcVideoPlayer.Avalonia -Version 1.4.0
 
 
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="VlcVideoPlayer.Avalonia" Version="1.4.0" />
 
 
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="VlcVideoPlayer.Avalonia" Version="1.4.0" />
 
Directory.Packages.props
<PackageReference Include="VlcVideoPlayer.Avalonia" />
 
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 VlcVideoPlayer.Avalonia --version 1.4.0
 
 
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: VlcVideoPlayer.Avalonia, 1.4.0"
 
 
#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 VlcVideoPlayer.Avalonia@1.4.0
 
 
#: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=VlcVideoPlayer.Avalonia&version=1.4.0
 
Install as a Cake Addin
#tool nuget:?package=VlcVideoPlayer.Avalonia&version=1.4.0
 
Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

VlcVideoPlayer.Avalonia

A self-contained VLC-based video player control for Avalonia UI with embedded VLC libraries.

👁 NuGet

👁 Video Player Screenshot

Features

  • 🎬 Full-featured video player control for Avalonia
  • 📦 VLC libraries included automatically - no manual VLC installation required!
  • 🎨 Clean, modern UI with Material Design icons
  • 🖥️ Cross-platform (Windows, macOS, Linux)
  • ⚡ Based on LibVLCSharp for maximum codec support
  • 🎛️ Built-in controls: Play/Pause, Stop, Seek bar, Volume slider, Mute

Installation

dotnet add package VlcVideoPlayer.Avalonia

That's it! The VLC native libraries for Windows are automatically included as a transitive dependency. For other platforms, see Platform Support.

Quick Start

Step 1: Add Material Icons to App.axaml

Important: The video player uses Material Icons for its controls. You must add the MaterialIconStyles to your App.axaml:

<Application xmlns="https://github.com/avaloniaui"
 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
 xmlns:materialIcons="clr-namespace:Material.Icons.Avalonia;assembly=Material.Icons.Avalonia"
 x:Class="YourApp.App">
 <Application.Styles>
 <FluentTheme />
 
 <materialIcons:MaterialIconStyles />
 </Application.Styles>
</Application>

Step 2: Initialize VLC at Startup

In your Program.cs or App.axaml.cs, initialize VLC before creating any windows:

using Avalonia.VlcVideoPlayer;

public class Program
{
 public static void Main(string[] args)
 {
 // Initialize VLC - must be called before creating windows
 VlcInitializer.Initialize();
 
 BuildAvaloniaApp().StartWithClassicDesktopLifetime(args);
 }

 public static AppBuilder BuildAvaloniaApp()
 => AppBuilder.Configure<App>()
 .UsePlatformDetect()
 .WithInterFont()
 .LogToTrace();
}

Step 3: Add the VideoPlayerControl to your Window

<Window xmlns="https://github.com/avaloniaui"
 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
 xmlns:vlc="clr-namespace:Avalonia.VlcVideoPlayer;assembly=Avalonia.VlcVideoPlayer"
 Title="My Video Player" Width="800" Height="600">
 
 <vlc:VideoPlayerControl x:Name="VideoPlayer" />
 
</Window>

Step 4: Play a Video

Use the built-in "Open" button, or load programmatically:

// Play a local file
VideoPlayer.Open(@"C:\Videos\movie.mp4");

// Or play from URL
VideoPlayer.OpenUri(new Uri("https://example.com/video.mp4"));

Complete Example

Here's a minimal working example:

MyApp.csproj:

<Project Sdk="Microsoft.NET.Sdk">
 <PropertyGroup>
 <OutputType>WinExe</OutputType>
 <TargetFramework>net8.0</TargetFramework>
 </PropertyGroup>
 <ItemGroup>
 <PackageReference Include="Avalonia" Version="11.3.6" />
 <PackageReference Include="Avalonia.Desktop" Version="11.3.6" />
 <PackageReference Include="Avalonia.Themes.Fluent" Version="11.3.6" />
 <PackageReference Include="VlcVideoPlayer.Avalonia" Version="1.4.0" />
 </ItemGroup>
</Project>

App.axaml:

<Application xmlns="https://github.com/avaloniaui"
 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
 xmlns:materialIcons="clr-namespace:Material.Icons.Avalonia;assembly=Material.Icons.Avalonia"
 x:Class="MyApp.App">
 <Application.Styles>
 <FluentTheme />
 <materialIcons:MaterialIconStyles />
 </Application.Styles>
</Application>

Program.cs:

using Avalonia;
using Avalonia.VlcVideoPlayer;

namespace MyApp;

class Program
{
 public static void Main(string[] args)
 {
 VlcInitializer.Initialize();
 BuildAvaloniaApp().StartWithClassicDesktopLifetime(args);
 }

 public static AppBuilder BuildAvaloniaApp()
 => AppBuilder.Configure<App>()
 .UsePlatformDetect()
 .LogToTrace();
}

Embedded Player (No Open Button)

For scenarios where you want to play a specific video without the file browser, use the Source property and hide the Open button:


<vlc:VideoPlayerControl 
 Source="C:\Videos\intro.mp4"
 AutoPlay="True"
 ShowOpenButton="False"
 ControlPanelBackground="#2d2d2d" />

Or set programmatically:

// Hide the Open button and set source
VideoPlayer.ShowOpenButton = false;
VideoPlayer.AutoPlay = true;
VideoPlayer.Source = @"C:\Videos\movie.mp4";

// Customize the control panel background
VideoPlayer.ControlPanelBackground = new SolidColorBrush(Color.Parse("#1a1a1a"));

Custom Control Panel Colors

The control panel background can be customized to match your app's theme:


<vlc:VideoPlayerControl ControlPanelBackground="#1a1a1a" />


<vlc:VideoPlayerControl ControlPanelBackground="{DynamicResource SystemAccentColor}" />


<vlc:VideoPlayerControl ControlPanelBackground="Transparent" />

Platform Support

Platform VLC Libraries
Windows x64 ✅ Included via NuGet (VideoLAN.LibVLC.Windows)
macOS 📥 Auto-copies from VLC.app if installed, or prompts to install
Linux 📦 Uses system VLC (sudo apt install vlc libvlc-dev)

Adding macOS/Linux support to your project

For cross-platform applications, add the appropriate LibVLC packages:


<ItemGroup Condition="$([MSBuild]::IsOSPlatform('OSX'))">
 <PackageReference Include="VideoLAN.LibVLC.Mac" Version="3.0.21" />
</ItemGroup>

<ItemGroup Condition="$([MSBuild]::IsOSPlatform('Linux'))">
 <PackageReference Include="VideoLAN.LibVLC.Linux" Version="3.0.21" />
</ItemGroup>

API Reference

VideoPlayerControl Properties

Property Type Description
Volume int Volume level (0-100)
AutoPlay bool Auto-play when media is loaded
ShowControls bool Show/hide playback controls
ShowOpenButton bool Show/hide the Open button (default: true)
Source string Video source path - set to auto-load video
ControlPanelBackground IBrush Background color of the control panel (default: White)
IsPlaying bool Whether media is currently playing
Position double Current playback position (0.0-1.0)
Duration TimeSpan Total media duration

VideoPlayerControl Methods

Method Description
Open(string path) Open a local file
OpenUri(Uri uri) Open from URL
Play() Start/resume playback
Pause() Pause playback
Stop() Stop playback
Seek(double position) Seek to position (0.0-1.0)
ToggleMute() Toggle audio mute

VideoPlayerControl Events

Event Description
PlaybackStarted Fired when playback starts
PlaybackPaused Fired when playback is paused
PlaybackStopped Fired when playback stops
MediaEnded Fired when media reaches the end

License

MIT License - see for details.

Credits

Product Versions Compatible and additional computed target framework versions.
.NET net8.0 net8.0 is compatible.  net8.0-android net8.0-android was computed.  net8.0-browser net8.0-browser was computed.  net8.0-ios net8.0-ios was computed.  net8.0-maccatalyst net8.0-maccatalyst was computed.  net8.0-macos net8.0-macos was computed.  net8.0-tvos net8.0-tvos was computed.  net8.0-windows net8.0-windows was computed.  net9.0 net9.0 was computed.  net9.0-android net9.0-android was computed.  net9.0-browser net9.0-browser was computed.  net9.0-ios net9.0-ios was computed.  net9.0-maccatalyst net9.0-maccatalyst was computed.  net9.0-macos net9.0-macos was computed.  net9.0-tvos net9.0-tvos was computed.  net9.0-windows net9.0-windows was computed.  net10.0 net10.0 was computed.  net10.0-android net10.0-android was computed.  net10.0-browser net10.0-browser was computed.  net10.0-ios net10.0-ios was computed.  net10.0-maccatalyst net10.0-maccatalyst was computed.  net10.0-macos net10.0-macos was computed.  net10.0-tvos net10.0-tvos was computed.  net10.0-windows net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
1.4.0 285 11/27/2025 1.4.0 is deprecated because it is no longer maintained.
1.3.0 236 11/27/2025
1.2.0 213 11/27/2025
1.1.0 213 11/27/2025
1.0.0 219 11/27/2025