BlazorVideoPlayer 3.0.0

dotnet add package BlazorVideoPlayer --version 3.0.0                
NuGet\Install-Package BlazorVideoPlayer -Version 3.0.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="BlazorVideoPlayer" Version="3.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add BlazorVideoPlayer --version 3.0.0                
#r "nuget: BlazorVideoPlayer, 3.0.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.
// Install BlazorVideoPlayer as a Cake Addin
#addin nuget:?package=BlazorVideoPlayer&version=3.0.0

// Install BlazorVideoPlayer as a Cake Tool
#tool nuget:?package=BlazorVideoPlayer&version=3.0.0                

BlazorVideoPlayer

A suitable and customisable video player for Blazor WebAssembly.Based on plyr.io, With capabilities such as Fullscreen, Shortcuts, Picture-in-Picture, Playsinline,Speed controls,Multiple captions,Responsive and ...

Image of Plyr

Install the package

Find the package through NuGet Package Manager or install it with following command.

Install-Package BlazorVideoPlayer -Version x.x
dotnet add package BlazorVideoPlayer

x.x is version of package for use last version see https://www.nuget.org/packages/BlazorVideoPlayer

Add Imports

After the package is added, you need to add the following in your _Imports.razor

@using BlazorVideoPlayer

Register Services

Add the following in Program.cs

builder.Services.AddVideoPlayerServices();

How To Use

Be sure to use a unique ID

<div style="width:700px;">
    <Player id="advanced"
            CurrentTimeControl="true"
            DownloadControl="true"
            DurationControl="true"
            FastForwardControl="true"
            FullscreenControl="true"
            PIPControl="true"
            VolumeControl="true"
            MuteControl="true"
            SettingsControl="true"
            RewindControl="true"
            RestartControl="true"
            ProgressControl="true"
            PlayControl="true"
            CaptionsControl="true"
            AirplayControl="true"
            PlayLargeControl="true"
            Captions="true"
            Loop="true"
            Quality="true"
            Speed="true"
            Poster="poster.png"
            Sources="@sources"
            OnEndedVideo="OnEndedVideo"
            OnPlayVideo="OnPlayVideo"
            OnVideoTimeUpdate="@((e) => OnVideoTimeUpdate(e.currentTime,e.duration))" />
</div>

@code{
    private List<Source> sources = new()
    {
        new()
        {
            Src = "/path/to/video.mp4",
            Type = "video/mp4"
        }
    };
    private void OnEndedVideo()
    {
        Console.WriteLine("End of play");
    }
    private void OnPlayVideo()
    {
        Console.WriteLine("Start playing");
    }
    private void OnVideoTimeUpdate(float currentTime, float duration)
    {
        Console.WriteLine("Current Time: " + currentTime);
        Console.WriteLine("Duration: " + duration);
    }
}
Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.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
3.0.0 4,122 12/25/2023
2.0.0 4,833 5/28/2022
1.1.3 463 5/28/2022
1.1.2 1,570 4/25/2021
1.1.1 390 4/13/2021
1.1.0 351 3/27/2021
1.0.9 354 3/26/2021
1.0.8 427 3/25/2021 1.0.8 is deprecated because it has critical bugs.
1.0.7 422 3/25/2021 1.0.7 is deprecated because it has critical bugs.
1.0.6 428 3/25/2021 1.0.6 is deprecated because it has critical bugs.
1.0.5 366 3/10/2021
1.0.4 449 1/23/2021
1.0.3 454 1/5/2021
1.0.2 386 1/5/2021
1.0.1 384 1/5/2021
1.0.0 422 1/5/2021