Soenneker.Blazor.Videojs 11.0.439

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

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

Soenneker.Blazor.Videojs

Wraps Video.js in a Blazor component with typed configuration, dynamic source and poster updates, and common player events exposed as EventCallbacks.

Installation

dotnet add package Soenneker.Blazor.Videojs

Register the scoped interop in Program.cs:

using Soenneker.Blazor.Videojs.Registrars;

builder.Services.AddVideoJsInteropAsScoped();

Basic player

@using Soenneker.Blazor.Videojs
@using Soenneker.Blazor.Videojs.Configuration
@using Soenneker.Blazor.Videojs.Dtos

<VideoJs Configuration="@_configuration"
         OnPlay="HandlePlay"
         OnEnded="HandleEnded" />

@code {
    private readonly VideoJsConfiguration _configuration = new()
    {
        Controls = true,
        Autoplay = "muted",
        Muted = true,
        Fluid = true,
        Responsive = true,
        AspectRatio = "16:9",
        Poster = "https://vjs.zencdn.net/v/oceans.png",
        PlaybackRates = [0.5, 1, 1.5, 2],
        Sources =
        [
            new VideoJsSource { Src = "https://vjs.zencdn.net/v/oceans.mp4", Type = "video/mp4" },
            new VideoJsSource { Src = "https://vjs.zencdn.net/v/oceans.webm", Type = "video/webm" }
        ]
    };

    private void HandlePlay() { }
    private void HandleEnded() { }
}

The component creates and disposes the Video.js player with the component lifecycle. Its generated default classes are video-js vjs-default-skin; pass Class to append your own classes.

Change media after initialization

Pass Sources when the source list changes at runtime:

<VideoJs Configuration="@_configuration" Sources="@_sources" />

Sources overrides Configuration.Sources when provided.

_sources =
[
    new VideoJsSource
    {
        Src = "https://media.example.com/next-video.mp4",
        Type = "video/mp4"
    }
];

After the player is created, the component watches Sources and Configuration.Poster and applies changes through Video.js. Other configuration properties are creation options: changing them later does not recreate or reconfigure the player. Give each component a unique Id if you set one explicitly.

Packaged or CDN assets

Video.js CSS and JavaScript load from a pinned jsDelivr URL by default, with Subresource Integrity validation. To avoid the external dependency, use the assets included in the NuGet package:

private readonly VideoJsConfiguration _configuration = new()
{
    UseCdn = false
};

Keep UseCdn consistent for all players sharing the same scoped interop. Video.js installs a page-global videojs object, so this package cannot isolate two asset builds on the same page.

Events

Available callbacks are:

  • OnReady, OnPlay, OnPause, and OnEnded
  • OnTimeUpdate, OnDurationChange, and OnRateChange
  • OnLoadedMetadata, OnLoadedData, OnCanPlay, and OnCanPlayThrough
  • OnSeeking, OnSeeked, OnWaiting, and OnPlaying
  • OnVolumeChange, OnProgress, OnStalled, and OnSuspend
  • OnAbort, OnError, and OnEmptied

Callbacks can be added, replaced, or removed on later renders. They are notifications without event payloads; OnError does not include Video.js error details. OnTimeUpdate can fire frequently, so keep its handler inexpensive.

Configuration notes

VideoJsConfiguration mirrors commonly used Video.js creation options, including controls, autoplay, muted playback, responsive sizing, playback rates, control-bar options, HTML5 tech options, languages, and plugins. See the Video.js options guide for the browser library's option semantics.

  • Browser autoplay rules still apply. Autoplay = "muted" with Muted = true is the most broadly permitted mode, but playback is never guaranteed.
  • Media hosts must serve the correct MIME type and allow any cross-origin access required by the browser and selected streaming format.
  • Source and poster URLs are sent to the browser as provided. Do not build them from untrusted input without applying your application's URL policy.
  • The component exposes lifecycle and event integration, not imperative controls such as play, pause, seek, or volume setters.

Child content

Use ChildContent when the underlying <video> element needs custom children such as tracks or fallback markup:

<VideoJs Configuration="@_configuration">
    <track kind="captions"
           src="/captions/en.vtt"
           srclang="en"
           label="English"
           default />
</VideoJs>

When child content is supplied, the component does not render <source> elements itself; sources in the Video.js configuration are still passed to the player options.

Low-level interop

IVideoJsInterop exposes initialization, creation, source/poster updates, event registration, and player disposal for integrations that manage their own <video> element. Most applications should use the VideoJs component so player and .NET callback references are cleaned up together.

Product Compatible and additional computed target framework versions.
.NET net11.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
11.0.439 62 11/19/2026
11.0.438 61 11/19/2026
11.0.437 57 11/19/2026
11.0.436 54 11/19/2026
11.0.435 42 11/19/2026
11.0.433 48 11/18/2026
11.0.432 48 11/18/2026
11.0.430 66 11/18/2026
11.0.427 78 11/18/2026
11.0.426 86 11/17/2026
11.0.425 86 11/17/2026
11.0.424 101 11/16/2026
11.0.423 90 11/16/2026
11.0.422 84 11/15/2026
11.0.421 97 11/15/2026
11.0.420 89 11/15/2026
11.0.419 86 11/15/2026
11.0.418 86 11/15/2026
11.0.417 95 11/15/2026
11.0.416 99 11/15/2026
Loading failed

Updated Multiple NuGet packages