Exemple #1
0
        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);
        }
Exemple #2
0
        public async Task <IActionResult> Get()
        {
            var videos = await store.GetVideos();

            return(Ok(videos));
        }