StreamPlayerCore.WPF.Control
3.0.0
dotnet add package StreamPlayerCore.WPF.Control --version 3.0.0
NuGet\Install-Package StreamPlayerCore.WPF.Control -Version 3.0.0
<PackageReference Include="StreamPlayerCore.WPF.Control" Version="3.0.0" />
<PackageVersion Include="StreamPlayerCore.WPF.Control" Version="3.0.0" />
<PackageReference Include="StreamPlayerCore.WPF.Control" />
paket add StreamPlayerCore.WPF.Control --version 3.0.0
#r "nuget: StreamPlayerCore.WPF.Control, 3.0.0"
#:package StreamPlayerCore.WPF.Control@3.0.0
#addin nuget:?package=StreamPlayerCore.WPF.Control&version=3.0.0
#tool nuget:?package=StreamPlayerCore.WPF.Control&version=3.0.0
StreamPlayerCore.WPF.Control
WPF control for video streaming using FFmpeg.
Built with .NET 10.
Installation
You can install the StreamPlayerCore WPF control via NuGet Package Manager:
Install-Package StreamPlayerCore.WPF.Control
Usage
For a complete example of using the StreamPlayerCore WPF control, please refer to the StreamPlayerCore.WPF.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 System.Windows;
using Microsoft.Extensions.DependencyInjection;
using StreamPlayerCore.WPF.Control;
namespace StreamPlayerCore.WPF.Demo;
public partial class App
{
private void App_OnStartup(object sender, StartupEventArgs e)
{
var serviceCollection = new ServiceCollection();
serviceCollection.AddStreamPlayerCoreServices();
serviceCollection.AddSingleton<MainWindow>();
var serviceProvider = serviceCollection.BuildServiceProvider();
var mainWindow = serviceProvider.GetRequiredService<MainWindow>();
mainWindow.Show();
}
To use the StreamPlayerCore WPF control, it is recommended to add a DockPanel to your window and place the StreamPlayerCore control inside it programatically.
<Window x:Class="StreamPlayerCore.WPF.Demo.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
Title="MainWindow" Height="610" Width="1330">
<DockPanel x:Name="DpPlayer1"/>
</Window>
using StreamPlayerCore.WPF.Control;
using System.Windows;
namespace StreamPlayerCore.WPF.Demo
{
public partial class MainWindow : Window
{
private StreamPlayerControl _streamPlayer;
public MainWindow(IServiceScopeFactory serviceScopeFactory)
{
InitializeComponent();
using var scope = _serviceScopeFactory.CreateScope();
_streamPlayer = scope.ServiceProvider.GetRequiredService<StreamPlayerControl>();
DpPlayer1.Children.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.