0

I have used videoview for playing the video from the url.. while trying it out in emulator i got the error msg as "Sorry this video cannot be played". i though that the error occurs because i am trying to run in emulator.. but even after installing into Android device, am getting the same error msg... Plz help me out with a solution to this problem...

My code is as follow

    VideoView vv;
    vv = (VideoView) this.findViewById(R.id.VideoView);
    MediaController mc = new MediaController(this);
    mc.setAnchorView(vv);
    Uri videoUri = Uri
        .parse(d_playurl); //"http://people.sc.fsu.edu/~jburkardt/data/mp4/cavity_flow_movie.mp4"
    vv.setMediaController(mc);

    vv.setVideoURI(videoUri);

    vv.requestFocus();
    vv.start();

i could play the mp4 video even in the emulator, but wondering why not any other url could not be played even in device.

note: playurl is the url which i retrieve from a json feed and passing that url..

Swathy
  • 39
  • 3

1 Answers1

0

Does your URL require a redirect before the actual stream URL is presented to the VideoView? VideoView cannot handle redirects.

Edit The Android player cannot play all formats. Read Sorry, this video cannot be played - streaming mp4 to android and Android videoView gives me Alert "Sorry,This video cannot be played"?

Community
  • 1
  • 1
Vikram Bodicherla
  • 7,133
  • 4
  • 28
  • 34