Agash.StreamTransport.AspNetCore 0.2.0-dev1

This is a prerelease version of Agash.StreamTransport.AspNetCore.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package Agash.StreamTransport.AspNetCore --version 0.2.0-dev1
                    
NuGet\Install-Package Agash.StreamTransport.AspNetCore -Version 0.2.0-dev1
                    
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="Agash.StreamTransport.AspNetCore" Version="0.2.0-dev1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Agash.StreamTransport.AspNetCore" Version="0.2.0-dev1" />
                    
Directory.Packages.props
<PackageReference Include="Agash.StreamTransport.AspNetCore" />
                    
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 Agash.StreamTransport.AspNetCore --version 0.2.0-dev1
                    
#r "nuget: Agash.StreamTransport.AspNetCore, 0.2.0-dev1"
                    
#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 Agash.StreamTransport.AspNetCore@0.2.0-dev1
                    
#: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=Agash.StreamTransport.AspNetCore&version=0.2.0-dev1&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Agash.StreamTransport.AspNetCore&version=0.2.0-dev1&prerelease
                    
Install as a Cake Tool

Agash.StreamTransport.AspNetCore

WHIP (RFC 9725) and WHEP endpoints for Agash.StreamTransport, mapped onto an existing ASP.NET Core application's routing. The host keeps its own Kestrel, middleware, authentication and CORS; these are endpoints like any other.

builder.Services.AddStreamTransport().AddStreamTransportWebRtc().AddFFmpegCodecs().AddOpusCodecs().AddHttpMediaEndpoints();

app.MapWhip("/whip/{room}", (context, ct) =>
        ValueTask.FromResult<HttpMediaSetup?>(new(new MediaEndpoints { VideoSink = sink, AudioSink = speaker },
            MediaSessionOptions.For(MediaProfile.InteractiveP2P))))
    .RequireAuthorization();

app.MapWhep("/whep/{room}", (context, ct) =>
        ValueTask.FromResult<HttpMediaSetup?>(new(new MediaEndpoints { VideoSource = camera, AudioSource = microphone },
            MediaSessionOptions.For(MediaProfile.InteractiveP2P))));

A POST of an SDP offer makes a session and answers 201 Created with the resource's Location and the SDP answer; a DELETE of the resource ends it. Candidates travel inside the offer and answer, so the answer waits briefly for STUN and TURN servers. A handler returning null refuses the offer with 404. Sessions end on DELETE, on failure, and when the host stops.

A client trickles candidates it gathers later, such as a field device's modem coming up mid-stream, in a PATCH of the resource with an application/trickle-ice-sdpfrag body and If-Match set to the resource's ETag (RFC 9725 section 4.3.2). The server adds them and answers 204, then checks the new addresses itself, which opens its own firewall to them. A PATCH without If-Match gets 428, with a stale tag 412.

A PATCH with new ICE credentials and If-Match: * is an ICE restart (section 4.3.3): the session restarts ICE under them, keeping its DTLS-SRTP keys, and answers 200 with its own new credentials and candidates and a new ETag for the new ICE session. IMediaSession.RestartTransportAsync does this from the client.

The clients, WhipClient.PublishAsync and WhepClient.PlayAsync, are in Agash.StreamTransport; they trickle late candidates the same way and stop if the server answers that it takes none.

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
0.2.0-dev5 60 11/11/2026
0.2.0-dev4 77 11/3/2026
0.2.0-dev3 73 11/3/2026
0.2.0-dev2 238 11/2/2026
0.2.0-dev1 66 11/2/2026