开发者

Android: Problem playing videos from internal storage

I'm trying to play a video file with this code:

MediaController mc = n开发者_JAVA技巧ew MediaController(this);
 mc.setAnchorView(videoView);
 mc.setMediaPlayer(videoView);
 Uri video = Uri.parse(path);
 videoView.setMediaController(mc);
 videoView.setVideoURI(video);
 videoView.start();

With videos located on the SD card it works great, but when I try to play a video from the internal storage it says it's unable to play the video.

Now, I think (but not sure) it has something to do with the fact that maybe the videos in the internal storage don't have the necessary permissions.

What do you think?


Context.MODE_WORLD_WRITEABLE does not imply Context.MODE_WORLD_READABLE.

Probably you only want only readable, but you can "or" the constants together if you do want both.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜