private async Task GetAVProtocolAsync() { var avService = Properties.Services.FirstOrDefault(s => s.ServiceType == ServiceAvtransportType); if (avService == null) { return; } var url = avService.ScpdUrl; if (!url.Contains("/")) { url = "/dmr/" + url; } if (!url.StartsWith("/")) { url = "/" + url; } var httpClient = new SsdpHttpClient(_httpClient, _config); var document = await httpClient.GetDataAsync(Properties.BaseUrl + url); AvCommands = TransportCommands.Create(document); }
private async Task GetRenderingProtocolAsync() { var avService = Properties.Services.FirstOrDefault(s => s.ServiceType == ServiceRenderingType); if (avService == null) { return; } string url = NormalizeUrl(Properties.BaseUrl, avService.ScpdUrl); var httpClient = new SsdpHttpClient(_httpClient, _config); var document = await httpClient.GetDataAsync(url); RendererCommands = TransportCommands.Create(document); }
private async Task GetRenderingProtocolAsync() { var avService = Properties.Services.FirstOrDefault(s => s.ServiceId == ServiceRenderingId); if (avService == null) { return; } string url = avService.SCPDURL; if (!url.Contains("/")) { url = "/dmr/" + url; } if (!url.StartsWith("/")) { url = "/" + url; } var httpClient = new SsdpHttpClient(_httpClient); var document = await httpClient.GetDataAsync(new Uri(Properties.BaseUrl + url)); RendererCommands = TransportCommands.Create(document); }