The emulator does not have a video player installed, so it can't play video. If 
you get the "Sorry, this video cannot.." message, that means you probably did 
your code correctly, there just is no video player available to the system.
I bet if you try that out on a real phone, it will work.> Date: Thu, 15 Jan 
2009 23:48:17 -0800> Subject: [android-developers] Streaming videos in 
Emulator> From: rahulregunat...@gmail.com> To: 
android-developers@googlegroups.com> > > Is it possible to stream videos in an 
android emulator?...> > I tried streaming an mp3 file which worked 
perfectly...> but when i tried streaming an video file(tried 3gp,mp4) but both 
dint> work...> I am not sure if the format is supported in the emulator .. I 
get an> error "Sorry,this video cannot be played"> > This is the sample code i 
am using..I downloaded it from Google API> Demos> > package and.stream;> > > 
import android.app.Activity;> import android.graphics.PixelFormat;> import 
android.net.Uri;> import android.os.Bundle;> import android.util.Log;> import 
android.widget.MediaController;> import android.widget.Toast;> import 
android.widget.VideoView;> > public class videostream extends Activity {> > 
/**> * TODO: Set the path variable to a streaming video URL or a local> media> 
* file path.> */> private String path = "";> private VideoView mVideoView;> > 
@Override> public void onCreate(Bundle icicle) {> super.onCreate(icicle);> 
setContentView(R.layout.main);> mVideoView = (VideoView) 
findViewById(R.id.surface_view);> > if (path == "") {> // Tell the user to 
provide a media file URL/path.> Toast.makeText(> videostream.this,> "Please 
edit VideoViewDemo Activity, and set path"> + " variable to your media file 
URL/path",> Toast.LENGTH_LONG).show();> > } else {> > /*> * Alternatively,for 
streaming media you can use> * mVideoView.setVideoURI(Uri.parse(URLstring));> 
*/> mVideoView.setVideoPath(path);> mVideoView.setMediaController(new 
MediaController(this));> mVideoView.requestFocus();> > }> }> }> > In the place 
"path" i tried pasting some url's .. but it dint work> > Can someone help me 
with some sample codes... or streaming links which> would work.. I am not sure 
if those formats i am using are supported> in the emulator..> 
_________________________________________________________________
Windows Liveā„¢ HotmailĀ®: Chat. Store. Share. Do more with mail. 
http://windowslive.com/howitworks?ocid=TXT_TAGLM_WL_t1_hm_justgotbetter_howitworks_012009
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to