public DmcVideoStreamingSession(string qualityId, DmcWatchData res, NiconicoSession niconicoSession, NicoVideoSessionOwnershipManager.VideoSessionOwnership videoSessionOwnership) : base(niconicoSession, videoSessionOwnership) { _DmcWatchData = res; DmcWatchResponse = res.DmcWatchResponse; QualityId = qualityId; Quality = res.ToNicoVideoQuality(qualityId); #if DEBUG Debug.WriteLine($"Id/Bitrate/Resolution/Available"); foreach (var q in _DmcWatchData.DmcWatchResponse.Video.DmcInfo.Quality.Videos) { Debug.WriteLine($"{q.Id}/{q.Bitrate}/{q.Available}/{q.Resolution}"); } #endif VideoContent = DmcWatchResponse.Video.DmcInfo.Quality.Videos.FirstOrDefault(x => x.Id == qualityId); if (VideoContent != null) { Debug.WriteLine($"{VideoContent.Id}/{VideoContent.Bitrate}/{VideoContent.Available}/w={VideoContent.Resolution.Width} h={VideoContent.Resolution.Height}"); } }
public NicoVideoQuality QualityIdToNicoVideoQuality(string qualityId) { return(_dmcWatchData?.ToNicoVideoQuality(qualityId) ?? NicoVideoQuality.Unknown); }