Hello everyone, I have this stupid problem with playing a video on my app
(game). It's very easy. Just don't work. I'm 100% sure it's not the video
codec because I have tried with a video that should work 100% sure.
Uri srcPath = null;
switch(startVideo){
case 1:
srcPath = Uri.parse("android.resource://com.getfun.treevolve/" +
R.raw.electricarc);
break;
}
MediaPlayer mediaPlayer = MediaPlayer.create(context, srcPath,playerholder);
mediaPlayer.start();
Log.d("player", "Video width: " +
Integer.toString(mediaPlayer.getVideoWidth()));
The Log.d show me 0.
I have the holder from here:
public void surfaceCreated(SurfaceHolder holder) {
level.playerholder = holder;
gameLoopThread.setRunning(true);
renderLoopThread.setRunning(true);
gameLoopThread.start();
renderLoopThread.start();
}
thank you everyone for the help =)
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en