BlazorVideoPlayer 3.0.0
dotnet add package BlazorVideoPlayer --version 3.0.0
NuGet\Install-Package BlazorVideoPlayer -Version 3.0.0
<PackageReference Include="BlazorVideoPlayer" Version="3.0.0" />
paket add BlazorVideoPlayer --version 3.0.0
#r "nuget: BlazorVideoPlayer, 3.0.0"
// 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 ...
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 | Versions 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. |
-
net7.0
- Microsoft.AspNetCore.Components.Web (>= 7.0.4)
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,052 | 12/25/2023 | |
2.0.0 | 4,829 | 5/28/2022 | |
1.1.3 | 462 | 5/28/2022 | |
1.1.2 | 1,569 | 4/25/2021 | |
1.1.1 | 389 | 4/13/2021 | |
1.1.0 | 350 | 3/27/2021 | |
1.0.9 | 353 | 3/26/2021 | |
1.0.8 | 426 | 3/25/2021 | |
1.0.7 | 421 | 3/25/2021 | |
1.0.6 | 427 | 3/25/2021 | |
1.0.5 | 365 | 3/10/2021 | |
1.0.4 | 448 | 1/23/2021 | |
1.0.3 | 453 | 1/5/2021 | |
1.0.2 | 385 | 1/5/2021 | |
1.0.1 | 383 | 1/5/2021 | |
1.0.0 | 419 | 1/5/2021 |