コード例 #1
0
        public void Init()
        {
            Items.Clear();
            PlaybackUrls = new Dictionary <string, string>();
            Quality      = VideoQuality.Normal;
            switch (Youtube2MP._settings.VideoQuality)
            {
            case 0:
                Quality = VideoQuality.Normal;
                break;

            case 1:
                Quality = VideoQuality.High;
                break;

            case 2:
                Quality = VideoQuality.HD;
                break;

            case 3:
                Quality = VideoQuality.FullHD;
                break;

            case 4:
            {
                if (FmtMap.Contains("18"))
                {
                    Quality = VideoQuality.High;
                }
                if (FmtMap.Contains("22/"))
                {
                    Quality = VideoQuality.HD;
                }
                if (FmtMap.Contains("37/"))
                {
                    Quality = VideoQuality.FullHD;
                }
                break;
            }

            case 5:
            {
                Quality = VideoQuality.High;
            }
            break;
            }
            IsInited = false;
        }
コード例 #2
0
        public void Init()
        {
            Items.Clear();
            Quality = VideoQuality.Normal;
            switch (Youtube2MP._settings.VideoQuality)
            {
            case 0:
                Quality = VideoQuality.Normal;
                break;

            case 1:
                Quality = VideoQuality.High;
                break;

            case 2:
                Quality = VideoQuality.HD;
                break;

            case 3:
            {
                if (FmtMap.Contains("18"))
                {
                    Quality = VideoQuality.High;
                }
                if (FmtMap.Contains("22/"))
                {
                    Quality = VideoQuality.HD;
                }
                break;
            }

            case 4:
            {
                Quality = VideoQuality.High;
            }
            break;
            }
            IsInited = false;
        }