Skip to content

Instantly share code, notes, and snippets.

Last active Apr 17, 2018
What would you like to do?
using GoogleCast;
using GoogleCast.Channels;
using GoogleCast.Models.Media;
using System.Linq;
using System.Threading.Tasks;
namespace SayGoogleHome
class Program
static void Main(string[] args)
static async Task Say()
var receiver = (await new DeviceLocator().FindReceiversAsync()).First();
var sender = new Sender();
await sender.ConnectAsync(receiver);
var mediaChannel = sender.GetChannel<IMediaChannel>();
await sender.LaunchAsync(mediaChannel);
var url = ""; // 任意の音声ファイル
var mediaStatus = await mediaChannel.LoadAsync(new Media()
//ContentType = "audio/mp3",
ContentId = url
await sender.DisconnectAsync();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment