var sender = new Sender();
var receiver = new Receiver()
{
IPEndPoint = CreateIPEndPoint(...)
};
// Connect to the Chromecast
await sender.ConnectAsync(receiver);
var channel = sender.GetChannel<IMediaChannel>();
await sender.LaunchAsync(channel);
await channel.LoadAsync(new Media{ ContentId = "http://.../media.mp3"});
(starts playing the media.mp3 file)
Then in Program2:
var sender = new Sender();
var receiver = new Receiver()
{
IPEndPoint = CreateIPEndPoint(...)
};
// Connect to the Chromecast
await sender.ConnectAsync(receiver);
var channel = sender.GetChannel<IMediaChannel>();
await sender.LaunchAsync(channel);
await channel.StopAsync();
Gets an exception about a null MediaSessionId. This is expected since we didn't start the session, but is there a way to stop the already playing stream?
In Program1:
(starts playing the media.mp3 file)
Then in Program2:
Gets an exception about a null MediaSessionId. This is expected since we didn't start the session, but is there a way to stop the already playing stream?