Video playback of a file stored in Media Library

流过昼夜 提交于 2019-12-13 19:35:56

问题


Is there an API which supports playback of Video files which are stored in the Media Library on a Windows Phone 8?

Until now I have only been able to find the option of playback from Isolated storage as mentioned on the following link:
http://msdn.microsoft.com/en-us/library/windowsphone/develop/hh394041(v=vs.105).aspx


回答1:


It seems there is no way to access videos stored in the Media Library :

From StackOverflow :

  • So there is no way to access videos on Windows Phone 8?
  • Windows Phone 8: Media file access
  • Does WP8 support to read video from media library?

From MSDN :

MSDN lists all the things that can be done with MediaLibrary in here, (Images, Music and its metadata). But read-only access of videos is not part of it. If it was, no doubt that MS would have mentioned it in this table.




回答2:


There are a couple answers in the following thread which points out it is now feasible to read the video files via KnownFolders if you upgrade to Windows Phone 8.1: Windows Phone 8: Media file access

Here is an alternative option for accessing the videos (also in Windows Phone 8.1):

        FileOpenPicker picker = new FileOpenPicker();
        picker.ViewMode = PickerViewMode.Thumbnail;
        picker.SuggestedStartLocation = PickerLocationId.VideosLibrary;
        picker.FileTypeFilter.Add(".mp4");
        picker.PickSingleFileAndContinue();  

Once you have the file you should be able to play it back.



来源:https://stackoverflow.com/questions/19480405/video-playback-of-a-file-stored-in-media-library

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!