I had a file in .wmv format and the size of 480 * 800 I reproduce this file in VideoView using this method
private void playVideo(){ videoView.setKeepScreenOn(true); // Here i set a path to video file String videoSource = "android.resource://com.example.android.camera2basic/" + R.raw.movie; videoView.setVideoURI(Uri.parse(videoSource)); videoView.setMediaController(null); videoView.setOnCompletionListener(myVideoViewCompletionListener); videoView.setOnPreparedListener(myVideoViewPreparedListener); } After the file was changed (the duration was added), it remained in the same .wmv format, but the size was 808 * 1440 and now when I play the video there is no picture, but the video goes ...
I read and understood that the problem may be in high resolution ...
And here's a question:
- What resolution should this file be in order to play on all devices?
- Or do you need to adjust it programmatically like that?