Esempio n. 1
0
        /// <summary>
        /// Convert VlcAspectRatio enum to a string.
        /// </summary>
        private string GetAspectRatioString(VlcAspectRatio ratio)
        {
            switch (ratio)
            {
            case VlcAspectRatio.Default: return("default");

            case VlcAspectRatio.Ratio_1_1: return("1:1");

            case VlcAspectRatio.Ratio_4_3: return("4:3");

            case VlcAspectRatio.Ratio_5_4: return("5:4");

            case VlcAspectRatio.Ratio_16_9: return("16:9");

            case VlcAspectRatio.Ratio_16_10: return("16:10");

            case VlcAspectRatio.Ratio_221_100: return("221:100");

            case VlcAspectRatio.Ratio_235_100: return("235:100");

            case VlcAspectRatio.Ratio_239_100: return("239:100");
            }

            throw new NotImplementedException("Aspect ratio not implemented: " + ratio);
        }
Esempio n. 2
0
 /// <summary>
 /// Set the aspect ratio for the current playback media.
 /// </summary>
 public async Task SetAspectRatio(VlcAspectRatio ratio)
 {
     await SendCommand("command=aspectratio&val=" + GetAspectRatioString(ratio));
 }