Windows应用商店应用程序,是否可以从存储文件中找到视频时长?还有从Media Element获得持续时间的功能吗?

用户名

在检查媒体元素时,持续时间仅在媒体打开事件之后才得到。

还有其他方法可以找到持续时间吗?

用户名

在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] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

Related 相关文章

热门标签

归档