So there is no way to access videos on Windows Phone 8?

倾然丶 夕夏残阳落幕 提交于 2020-01-05 05:43:30

问题


I need to access videos on camera roll and also on Music+Video. but it seems there is no way at all.

Here in the documentation says we can use:

MediaLibrary library = new MediaLibrary();

But it only can access musics.

Can we say I should forget this thing for ever in WP8?


回答1:


Unfortunately, there is no way to access videos in Media Library.
You have read-write access only to audio and photos. See this answer: https://stackoverflow.com/a/13473349/1029518




回答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/17873874/so-there-is-no-way-to-access-videos-on-windows-phone-8

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