Reputation: 2564
I have few tutorial screens in my app, and on some Samsung device, I get this error when trying to play it:
Can't play this video
The said video is in the app's package, and not on some external source like SD card, so I don't know whats the problem... The video is in .mp4
format, here is how I play it
vvTutorial = (VideoView) v.findViewById(R.id.vvTutorial);
Uri myUri = Uri.parse("android.resource://" + getActivity().getPackageName() + "/" + R.raw.video_tut_4);
vvTutorial.setMediaController(null);
vvTutorial.setVideoURI(myUri);
vvTutorial.start();
vvTutorial.setOnPreparedListener(new OnPreparedListener() {
@Override
public void onPrepared(MediaPlayer mp) {
mp.setLooping(true);
}
});
Whats wrong, why is it giving this error only on this device, but not on the others I've tested?
Upvotes: 1
Views: 1642
Reputation: 1481
android generally supports video of particular encoding only..and that too is dependent on device. It is better that you try with 3gp format And you can change the video format using VLC media palyer
Upvotes: 1