9

Introducing LibVLCSharp for WinUI

 1 year ago
source link: https://mfkl.github.io/2023/04/04/introducing-libvlcsharp-for-winui.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Introducing LibVLCSharp for WinUI

1 minute read

Today, we are announcing the initial release of LibVLCSharp for WinUI on NuGetPermalink

logo-winui.png

WinUIPermalink

LibVLCSharp has had support for the Universal Windows Platform (UWP) since the early days. Before LibVLCSharp, the work to integrate LibVLC with the UWP platform and make the LibVLC engine work well on it, was pioneered by the now defunct VLC for WinRT project.

WinUI is the next evolution of the modern UI toolkit for the Windows desktop after UWP (unfortunately, the Xbox target is not supported with WinUI).

As of LibVLCSharp version 3.7.0, building multimedia apps using WinUI 3 is now supported with LibVLC. Expect the usual goodies such as default hardware decoding enabled.

Both Packaged and Unpackaged WinUI apps are supported with LibVLCSharp.

There are several important caveats and changes from the previous UWP LibVLCSharp support that I will detail below, for users migrating or supporting both UWP and WinUI.

API Breaking change for existing UWP usersPermalink

When upgrading to LibVLCSharp version 3.7.0, users currently targeting UWP will need to address a build failure as there was a needed namespace change.

In your XAML files:

-xmlns:lvs="using:LibVLCSharp.Platforms.UWP"
+xmlns:lvs="using:LibVLCSharp.Platforms.Windows"

In your C# files:

-using LibVLCSharp.Platforms.UWP;
+using LibVLCSharp.Platforms.Windows;

This should be quick and as painless as possible to fix as you upgrade to LibVLCSharp 3.7.0 in your UWP applications. The minor version of LibVLCSharp is bumped according to our documented versioning strategy.

LibVLC build typePermalink

With UWP apps using LibVLCSharp, the user needs to add a special, custom-built LibVLC variant, the VideoLAN.LibVLC.UWP nuget package. This has always been the case and is due to the expectation of the underlying runtime of the UWP platform.

For WinUI targets, the classic Windows LibVLC build, VideoLAN.LibVLC.Windows, must be used and only from version 3.0.18 minimum. Using a UWP LibVLC build will not work. As always, starting from the official sample app is a good idea.

Minimum Target Framework VersionPermalink

The minimal WinUI TFM supported version is net6.0-windows10.0.17763.0. Do make sure you target it for your WinUI project (or anything above).


As we release this initial support of WinUI on NuGet, please make sure to tell us if you encounter any issue and what apps you build with LibVLCSharp for WinUI!

Updated: April 4, 2023

Previous Next


Recommend

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK