Can anyone 开发者_StackOverflow中文版tell me if the Android MediaPlayer class is able to play a video stored in a remote URL?
Just for testing purposes, can I use the URL http://localhost/video-name.3gp
.
Can anyone tell me if the Android MediaPlayer class is able to play a video stored in a remoted URL?
Yes, if the video is safe for streaming.
Just for testing purposes, can I use the URL http://localhost/video-name.3gp
No. localhost is going to be the emulator itself.
Another question is if the MediaPlayer works well on the emulator?
Only if you have a fairly fast machine, and not for streaming. You absolutely need hardware to test streaming video.
Ans:- Yes
create a media player object
Mediaplayer ob=mediaplayer.Create(mediaplayerActivity.this,file);
ob.start();
ob.play()
精彩评论