在检查媒体元素时,持续时间仅在媒体打开事件之后才得到。
还有其他方法可以找到持续时间吗?
在Win Rt App或Metro C#中获取视频文件的持续时间
StorageFile videoFile;
string path = ApplicationData.Current.LocalFolder.Path;
videoFile = await StorageFile.GetFileFromPathAsync(presentationItem.Slide_path_local);
Windows.Storage.FileProperties.VideoProperties x = await videoFile.Properties.GetVideoPropertiesAsync();
Duration videoDuration = x.Duration;
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句