HI to all
i am recorded a video with .mp4 format... and try to play on
emulator through
sdcard as well as streaming... But i will give error like cannot play
the video.... I am
using sdk 1.5... Can anyone help me what is wrong with my code...
sdcard:-
setContentView(R.layout.main);
myVideo=(VideoView)findViewById(R.id.video);
myVideo.setVideoPath("/sdcard/video.mp4");
mc=new MediaController(this);
myVideo.start();
mc.setMediaPlayer(myVideo);
myVideo.setMediaController(mc);
myVideo.requestFocus();
video streaming:-
private String path = "http://192.168.14.6:8080/qvisdvr/
control/video.mp4";
private VideoView mVideoView;
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
setContentView(R.layout.videoview);
mVideoView = (VideoView) findViewById(R.id.surface_view);
if (path == "") {
// Tell the user to provide a media file URL/path.
Toast.makeText(
demo.this,
"Please edit VideoViewDemo Activity, and set path"
+ " variable to your media file URL/path",
Toast.LENGTH_LONG).show();
}
else
{
mVideoView.setVideoURI(Uri.parse(path));
// mVideoView.start();
mVideoView.setMediaController(new MediaController(this));
mVideoView.requestFocus();
}
Thank You
Nithin N V
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---