public async void ConnectToChromecastAndLaunchApplicationAThenLaunchApplicationB() { var chromecast = await TestHelper.FindChromecast(); var client = new ChromecastClient(); var status = await client.ConnectChromecast(chromecast); status = await client.LaunchApplicationAsync("A9BCCB7C"); //Youtube var firstLaunchTransportId = status.Applications[0].TransportId; await client.DisconnectAsync(); status = await client.ConnectChromecast(chromecast); status = await client.LaunchApplicationAsync("B3419EF5"); //My sample Application Assert.NotEqual(firstLaunchTransportId, status.Applications[0].TransportId); }
public async void ConnectToChromecastAndLaunchApplicationTwiceWithoutJoining() { var chromecast = await TestHelper.FindChromecast(); var client = new ChromecastClient(); var status = await client.ConnectChromecast(chromecast); status = await client.LaunchApplicationAsync("B3419EF5"); var firstLaunchTransportId = status.Applications[0].TransportId; await client.DisconnectAsync(); status = await client.ConnectChromecast(chromecast); status = await client.LaunchApplicationAsync("B3419EF5", false); Assert.Equal(firstLaunchTransportId, status.Applications[0].TransportId); }
public async void StartApplicationAThenStartBAndLoadMedia() { var chromecast = await TestHelper.FindChromecast(); var client = new ChromecastClient(); await client.ConnectChromecast(chromecast); _ = await client.LaunchApplicationAsync("A9BCCB7C"); await client.DisconnectAsync(); 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); }