Implementation of the Google Cast protocol (.NET Standard 2.0 library).
This documentation was really helpful to understand the protocol.
These two others C# projects were also helpful to implement the protocol : SharpCast and SharpCaster.
// Use the DeviceLocator to find a Chromecastvarreceiver=(awaitnewDeviceLocator().FindReceiversAsync()).First();varsender=newSender();// Connect to the Chromecastawaitsender.ConnectAsync(receiver);// Launch the default media receiver applicationvarmediaChannel=sender.GetChannel<IMediaChannel>();awaitsender.LaunchAsync(mediaChannel);// Load and play Big Buck Bunny videovarmediaStatus=awaitmediaChannel.LoadAsync(newMediaInformation(){ContentId="http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4"});