So I'm trying to do this:
VideoView video_view = new VideoView(context);
video_view.setVideoPath("res/raw/movie.mp4");
video_view.setMediaController(new MediaController(context));
video_view.requestFocus();
video_view.start();
Seems simple, but even with video files that I've seen work in other
video players on the phone, I keep getting the "Sorry, this video
cannot be played" message. And this associated debug info:
INFO/MediaPlayer-JNI(234): prepareAsync: surface=0x1a3ff0 (id=1)
ERROR/MediaPlayer(234): Error (-4,0)
DEBUG/VideoView(234): Error: -4,0
Any ideas as to what those errors mean or how I can fix this?
If this is not how I should be using VideoView please let me know. I'd
appreciate being sent in the right direction for how to get a local
video file playing within a view.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---