Home

Awesome

Icon

SharpCaster

Currently Supported Platforms

.NET

SharpCaster is Chromecast C# SDK any platform support .net standard 2.0.

The nuget package NuGet Status

https://nuget.org/packages/SharpCaster/

PM> Install-Package SharpCaster

Getting started

Finding chromecast devices from network

IChromecastLocator locator = new MdnsChromecastLocator();
var source = new CancellationTokenSource(TimeSpan.FromMilliseconds(1500));
var chromecasts = await locator.FindReceiversAsync(source.Token);

Connecting to chromecast device, launch application and load media

var chromecast = chromecasts.First();
var client = new ChromecastClient();
await client.ConnectChromecast(chromecast);
_ = await client.LaunchApplicationAsync("B3419EF5");

var media = new Media
{
	ContentUrl = "https://commondatastorage.googleapis.com/gtv-videos-bucket/CastVideos/mp4/DesigningForGoogleCast.mp4"
};
_ = await client.MediaChannel.LoadAsync(media);

SharpCaster Demo

SharpCaster Simple demo

Adding support for custom chromecast channels