kakone / SSDP

.NET implementation (.NET Standard 1.4) of Simple Service Discovery Protocol (with AV transport service control point sample)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SSDP

.NET Standard implementation of Simple Service Discovery Protocol (with AV transport service control point sample).

Usage

Devices search

var devices = await new Ssdp().SearchUPnPDevicesAsync("MediaRenderer");

UPnP AV transport service control point

var controlPoint = new AVTransportControlPoint();

// Gets the list of the media renderers
var mediaRenderers = await controlPoint.GetMediaRenderersAsync();

// Play the Big Buck Bunny video to a media renderer
await controlPoint.PlayAsync(mediaRenderers.First(), "http://download.blender.org/peach/bigbuckbunny_movies/big_buck_bunny_480p_surround-fix.avi");

Note for UWP projects (version < build 16299)

NetworkInterface.GetAllNetworkInterfaces() method is not implemented in UWP before Fall Creators Update.

So, in order to make this work in UWP (version < build 16299), you must use the specific NetworkInfo class for UWP in your code. You will pass this NetworkInfo object to the constructor of the Ssdp class :

new AVTransportControlPoint(new Ssdp(new NetworkInfo()))

Download

NuGet Status

About

.NET implementation (.NET Standard 1.4) of Simple Service Discovery Protocol (with AV transport service control point sample)

License:GNU General Public License v2.0


Languages

Language:C# 100.0%