Пример #1
0
 //------------------------------------------------------------------------------------------------------------------------
 public bool serverNegotiation(Yodiwo.YPChannel.Channel channel)
 {
     //requires authentication
     var resp = channel.SendRequest<VideoAuthenticationResponse>(new VideoAuthenticationRequest());
     if (resp == null)
         return false;
     else
     {
         //handle response
         if (!videofeeds.ContainsKey(resp.videotoken))
             return false;
         else
         {
             //create context
             var ctx = new ChannelContext()
             {
                 videoInfo = videofeeds[resp.videotoken],
             };
             channel.Tags.Add(typeof(ChannelContext), ctx);
             ctx.Receiving = true;
             return true;
         }
     }
 }