public async Task SwitchChannel(string client) { var videos = await videoStore.GetVideos(); var video1 = videos.ElementAt(rand.Next(videos.Count())); var video2 = videos.ElementAt(rand.Next(videos.Count())); await Clients.Groups(client.ToUpperInvariant()) .SendAsync("switchChannel", video1.AbsoluteUri, video2.AbsoluteUri); }
public async Task <IActionResult> Get() { var videos = await store.GetVideos(); return(Ok(videos)); }