Hi All,
I am just trying to play a video from a raw folder available in my project resource by using the following simple code snippet provided by Android developers website.
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
MediaPlayer mp = MediaPlayer.create(getBaseContext(), R.raw.sample); // sample: it is a .m4v file.
mp.start();
}
But when i run my code, it plays only the sound, i didn't see video player or video. Only sound is coming. May i know what should be the problem and how to resolve this issue?
Note: I'm trying on Android OS 1.5 HTC T-mobile handset.
Can someone came across this please provide me your suggestions?
John..
i havent had that issue - but check the video codec is supported.
the .extenstion isnt necessarily an indicator or the video/audio codecs
you may need to convert it to what ever the media player wants, specifically.
check the documentation, make sure your video matches exactly
To view links or images in signatures your post count must be 5 or greater. You currently have 0 posts.
Bookmarks