public YandexStreamTrack ExtractStreamTrack(YandexTrack track) { var trackDonloadInfo = GetDownloadTrackInfo(track.StorageDir); var trackDownloadUrl = _settings.GetURLDownloadTrack(track, trackDonloadInfo); var isNetworing = System.Net.NetworkInformation.NetworkInterface.GetIsNetworkAvailable(); return(YandexStreamTrack.Open(trackDownloadUrl, track.FileSize)); }
public YandexStreamTrack ExtractStreamTrack(string trackKey, int fileSize) { var time = _httpContext.GetTimeInterval(); var mainDownloadResponse = GetMetadataTrackForDownload(trackKey, time); var storageDownloadResponse = GetDownloadFilInfo(mainDownloadResponse, time); var fileLink = BuildLinkForDownloadTrack(mainDownloadResponse, storageDownloadResponse); return(YandexStreamTrack.Open(new Uri(fileLink), fileSize)); }