Skip to content

Chromecast C# SDK for Windows, Windows Phone, .NET 4.5.1, Xamarin.iOS and Xamarin.Android platforms.

License

Notifications You must be signed in to change notification settings

kalpesh2804/SharpCaster

 
 

Repository files navigation

Icon

SharpCaster

Currently Supported Platforms

.NET

This project is completed

I won't be adding any new features to this project. 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 chromecasts = await locator.FindReceiversAsync();
//If that does not return devices on desktop then you can use this, Where 192.168.1.2 is your machines local ip
var chromecasts = await locator.FindReceiversAsync("192.168.1.2");

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.GetChannel<IMediaChannel>().LoadAsync(media);

SharpCaster Demo

SharpCaster Simple demo

About

Chromecast C# SDK for Windows, Windows Phone, .NET 4.5.1, Xamarin.iOS and Xamarin.Android platforms.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 100.0%