Miko.Components 0.1.0

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

Miko.Components

Native components for Miko. The player requires a platform video backend; it does not depend on Ionic, Bootstrap, a browser, or FFmpeg.

using Miko.Components.Player;

builder.Services.AddMikoPlayer();
builder.UseSystemVideo(); // Desktop. Android: UseAndroidVideo(); iOS: UseIosVideo().
@using Miko.Components.Player
@using Miko.Components.Player.Danmaku

<MikoPlayer Source="https://example.com/video.m3u8" AutoPlay="true"
            Danmaku="@comments" DanmakuSettings="@settings" />

@code {
    private IReadOnlyList<DanmakuItem> comments = [
        new(TimeSpan.FromSeconds(1), "Hello"),
        new(TimeSpan.FromSeconds(2), "Pinned", DanmakuMode.Top)
    ];
    private DanmakuSettings settings = new() { FontSize = 22, Opacity = .9f, MaxVisible = 80 };
}

The library is written as C# components, so consumers use the existing Miko Razor compiler without requiring an additional compiler in this package.

Playback

Parameters: Source, MimeType, Poster, AutoPlay, Loop, Muted, Volume, PlaybackRate, Class, Style, Danmaku, and DanmakuSettings.

Instance methods: Play(), Pause(), Seek(TimeSpan), SetVolume(float), SetMuted(bool), SetPlaybackRate(float), SetDanmakuSettings(...), ToggleSettings(), ToggleFullscreen(), and Retry(). Controller exposes playback snapshots and a Changed event. Call methods on the UI thread. The engine owns and disposes video sessions; disposing a controller does not dispose its backend.

The control bar includes play/pause, seeking, elapsed/total time, mute, danmaku, settings, and fullscreen. Settings include volume, speed, loop, opacity, text size, travel time, area, and density. Fullscreen fills the host viewport and restores the original layout when closed; it does not change the OS window mode or system bars. Unknown-duration live streams show LIVE and disable duration-based seeking. Buffered ranges are displayed only when the backend reports them. Poster currently follows the core video element's local-file support.

Platform Backends

Platform System Pipeline Notes
Windows Media Foundation Media Engine + D3D11 HLS, audio, buffering, seeking and rate control; managed Vortice bindings, no bundled native decoder
Android MediaPlayer + SurfaceTexture HLS, audio, buffering; playback rate requires API 23 or newer
macOS / iOS AVPlayer Native HLS and audio; exposes buffering state
Linux GStreamer playbin + appsink Audio and HLS require installed GStreamer plugins and an audio sink

Miko.Video.FFmpeg remains an explicitly selected optional extension with its existing video-only limitations. AddMikoPlayer() does not install or replace a decoder.

Danmaku

Scroll, Top, and Bottom comments use media time, so pause, rate changes, seeks and loops stay synchronized. Supply a new immutable list when replacing comments. Rendering uses one canvas element, an indexed timeline, bounded visible entries and a 512-entry text cache. Default density is 80, configurable with AddMikoPlayer(o => o.MaxVisibleDanmaku = 120). Congested comments are dropped rather than queued indefinitely. Seeking scans at most 2,048 recent candidates. The steady-state timeline loop allocates no managed memory per frame.

Icons are selected Ionicons assets already present in the repository (MIT); they are embedded at build time without a runtime dependency on Miko.Ionic.

See design and examples.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.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
0.1.0 105 10/26/2026