Android - Load video from private folder of app

前端 未结 1 1847
不思量自难忘°
不思量自难忘° 2021-01-14 00:33

I have a problem that I have been trying to find a solution for a long time. My situation is as follows:

I have an app that downloads zipped videos and unzips them a

相关标签:
1条回答
  • Why do I get those errors which according to what I have found online are errors that are related with problematic encoding of the video file ?

    Because the media playback engine runs in its own process, and it does not have rights to read your file.

    What is the best things to use in my case, a VideoView or a surfaceView ?

    A VideoView contains a SurfaceView. Whether you use VideoView or a combination of MediaPlayer and SurfaceView is up to you.

    Which is the ideal method to load a video from the application's private folder and be able to play it?

    Either create a ContentProvider that can serve up your local file and use the provider Uri instead of the Uri to a local file, or create the local file using openFileOutput() and MODE_WORLD_READABLE.

    0 讨论(0)
提交回复
热议问题