StreamPlayerCore.WinForms.Control
3.0.0
dotnet add package StreamPlayerCore.WinForms.Control --version 3.0.0
NuGet\Install-Package StreamPlayerCore.WinForms.Control -Version 3.0.0
<PackageReference Include="StreamPlayerCore.WinForms.Control" Version="3.0.0" />
<PackageVersion Include="StreamPlayerCore.WinForms.Control" Version="3.0.0" />
<PackageReference Include="StreamPlayerCore.WinForms.Control" />
paket add StreamPlayerCore.WinForms.Control --version 3.0.0
#r "nuget: StreamPlayerCore.WinForms.Control, 3.0.0"
#:package StreamPlayerCore.WinForms.Control@3.0.0
#addin nuget:?package=StreamPlayerCore.WinForms.Control&version=3.0.0
#tool nuget:?package=StreamPlayerCore.WinForms.Control&version=3.0.0
StreamPlayerCore.WinForms.Control
WinForms control for video streaming using FFmpeg.
Built with .NET 10.
Installation
You can install the StreamPlayerCore WinForms control via NuGet Package Manager:
Install-Package StreamPlayerCore.WinForms.Control
Usage
For a complete example of using the StreamPlayerCore WinForms control, please refer to the StreamPlayerCore.WinForms.Demo project.
This project is meant to be used with a Dependency Injection (DI) container. To configure the required services, you can use the following code snippet in your application startup:
using Microsoft.Extensions.DependencyInjection;
using StreamPlayerCore.WinForms.Control;
namespace StreamPlayerCore.WinForms.Demo;
internal static class Program
{
[STAThread]
private static void Main()
{
ApplicationConfiguration.Initialize();
var serviceCollection = new ServiceCollection();
serviceCollection.AddStreamPlayerCoreServices();
serviceCollection.AddSingleton<DemoForm>();
var serviceProvider = serviceCollection.BuildServiceProvider();
Application.Run(serviceProvider.GetRequiredService<DemoForm>());
}
}
To use the StreamPlayerCore WinForms control, it is recommended to add a Panel to your window and place the StreamPlayerCore control inside it programatically.
using StreamPlayerCore.WinForms.Control;
namespace StreamPlayerCore.WinForms.Demo
{
public partial class MainForm : Form
{
private StreamPlayerControl _streamPlayer;
public MainForm(IServiceScopeFactory serviceScopeFactory)
{
InitializeComponent();
_streamPlayer = new StreamPlayerControl(serviceScopeFactory);
_streamPlayer.Dock = DockStyle.Fill;
panelPlayer1.Controls.Add(_streamPlayer);
_streamPlayer.StartStream("rtsp://your_stream_url");
}
}
}
License
This project is licensed under the LGPLv3 License. See the LICENSE file for details.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0-windows7.0 is compatible. |
-
net10.0-windows7.0
- StreamPlayerCore (>= 3.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.