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

            return(Ok(videos));
        }