FrameFlux.Avalonia.Android 0.1.1

dotnet add package FrameFlux.Avalonia.Android --version 0.1.1
                    
NuGet\Install-Package FrameFlux.Avalonia.Android -Version 0.1.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="FrameFlux.Avalonia.Android" Version="0.1.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="FrameFlux.Avalonia.Android" Version="0.1.1" />
                    
Directory.Packages.props
<PackageReference Include="FrameFlux.Avalonia.Android" />
                    
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 FrameFlux.Avalonia.Android --version 0.1.1
                    
#r "nuget: FrameFlux.Avalonia.Android, 0.1.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 FrameFlux.Avalonia.Android@0.1.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=FrameFlux.Avalonia.Android&version=0.1.1
                    
Install as a Cake Addin
#tool nuget:?package=FrameFlux.Avalonia.Android&version=0.1.1
                    
Install as a Cake Tool

FrameFlux.Avalonia.Android

Android hardware video presentation backends for FrameFlux.Avalonia.

Call UseFrameFluxAndroid() while building the Avalonia application. The package registers two MediaCodec presentation paths:

  • GpuComposition uses SurfaceTexture and GL_TEXTURE_EXTERNAL_OES, supports Avalonia overlays, and remains the Automatic default.
  • NativeSurface sends MediaCodec output directly to a hosted Android SurfaceView, avoiding FrameFlux OpenGL composition.
protected override AppBuilder CustomizeAppBuilder(AppBuilder builder) =>
    base.CustomizeAppBuilder(builder).UseFrameFluxAndroid();

Select direct native presentation explicitly on the media view:

Player.PresentationMode = MediaVideoPresentationMode.NativeSurface;

NativeSurface requires a dedicated session and hardware-capable decoding. It does not support Avalonia overlay content, opacity, arbitrary transforms, or rounded clipping because SurfaceView is composed by Android outside the Avalonia visual tree. Popup-based controls such as ComboBox drop-downs, menus, tooltips, and flyouts can therefore appear behind the video. Use GpuComposition whenever Avalonia UI must overlap the video. Fill, Uniform, UniformToFill, and None sizing are supported by sizing and clipping the hosted native view.

If the native Surface is destroyed while MediaCodec is active, presentation restarts with GpuComposition. A subsequent GPU presentation failure falls back to SoftwareBitmap.

Install FrameFlux.FFmpeg.NativeAssets.Android in the final Android app to package the supplied FFmpeg shared libraries for each ABI.

Product Compatible and additional computed target framework versions.
.NET net10.0-android36.0 is compatible. 
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
0.1.1 75 9/8/2026
0.1.0 84 9/1/2026