有人知道如何在 Windows Phone 中获取视频列表吗?当试图通过 Xna.Framework.Media 对象访问它们时,但它似乎只允许访问 SongCollection、PictureCollection 和单个 Video 对象。有什么提示吗?另外,有没有办法判断文件是否是 DRM 内容?
这是一些示例代码
void somefunction()
{
MediaLibrary ML = new MediaLibrary();
//returns a PictureCollection with [x] pictures in MediaLibrary
PictureCollection PC = ML.Pictures;
//do something with IEnumerable object
foreach (Picture obj in PC)
{
if (obj.Album.Name != "Sample Pictures")
//do something
else
//ignore
}
//same thing for Audio Files...
//returns a SongCollection with [x] songs in MediaLibrary
SongCollection SC = ML.Songs;
//what about video files??
}
我的项目正在构建以使用 Silverlight 4 并以 WinPhone7.1 为目标
" C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Silverlight\v4.0\Profile\WindowsPhone71\Microsoft.Xna.Framework.dll"