none
c#的uwp程序如何读取视频文件的信息? RRS feed

答案

  • StorageFile.Properties.GetVideoPropertiesAsync 可以获取一些

    try
    {
        StorageFile file = rootPage.sampleFile;
        if (file != null)
        {
            StringBuilder outputText = new StringBuilder();
    
            // Get video properties
            VideoProperties videoProperties = await file.Properties.GetVideoPropertiesAsync();
            outputText.AppendLine("Year: " + videoProperties.Year);
            outputText.AppendLine("Rating: " + videoProperties.Rating);
        }
    }
    // Handle errors with catch blocks
    catch (FileNotFoundException)
    {
     // For example, handle a file not found error
    }

    • 已标记为答案 BillQu0002 2017年6月8日 7:52
    2017年6月6日 4:15

全部回复