public ChannelContentProvider(WebServer server, TTVProxyDevice device)
 {
     server.AddRouteUrl(ChannelContentProvider.PLAYLIST_PATH, new Action<MyWebRequest>(((ContentProvider)this).SendResponse), HttpMethod.Get);
     server.AddRouteUrl(ChannelContentProvider.PLAY_PATH, new Action<MyWebRequest>(((ContentProvider)this).Play), HttpMethod.Get);
     server.AddRouteUrl(ChannelContentProvider.FAVOURITE_ADD, new Action<MyWebRequest>(this.AddFavouriteRequest), HttpMethod.Get);
     server.AddRouteUrl(ChannelContentProvider.FAVOURITE_DEL, new Action<MyWebRequest>(this.DelFavouriteRequest), HttpMethod.Get);
     server.AddRouteUrl(ChannelContentProvider.SCREEN_PATH, new Action<MyWebRequest>(this.ScreenRequest), HttpMethod.Get);
     this._device = device;
 }
Example #2
0
 public EpgContentProvider(TTVProxyDevice device)
 {
     this._device = device;
     this._device.Web.AddRouteUrl("/channels/epg", new Action<MyWebRequest>(((ContentProvider)this).SendResponse), HttpMethod.Get);
 }
Example #3
0
 public void Start()
 {
     Log.WriteInfo("Start TTVProxy");
     int setting = MySettings.GetSetting("web", "port", 8081);
     try
     {
         this.Vlc = new VlcClient();
         this.Vlc.OnEvent += new VlcClient.VlcEvent(this.VlcOnOnEvent);
         this.Vlc.ConnectAsync();
     }
     catch (Exception ex)
     {
         this.OnNotifyed("Не удалось запустить VLC-сервер. Дальнейшая работа программы не возможна", 2);
         this.IsWorking = false;
         return;
     }
     Log.WriteInfo("[TTVProxy] Starting Web-server");
     this._web = new WebServer(Convert.ToUInt16(setting));
     this._web.Start();
     this.Login();
     this.Device = new TTVProxyDevice(this._web, this);
     this.Device.Start();
     this.IsWorking = true;
 }