OnBufferingUpdateListener, OnCompletionListener, OnPreparedListener, Public class MediaPlayerActivity extends Activity implements * An activity to display local or remote video or play audio file. They are specific to my program (automated system for platform testing) package my.package You can remove the code related to Sequencer, Scenario and Test classes. See the last source code provided in my comment. The asset contains well written source code which is. Users can also hide their private videos with Video Vault features of this app. HD Video Player & Videos Vault is a coolvideo player app which enables users to play any video file on their android device in high quality. The activity's arguments are set by Intent. Video Player All Format for Android Description. Remember that, presently, an URI for valid youtube video on android is to be like this: rtsp://v5.cache1.c./CjYLENy73wIaLQnhycnrJQ8qmRMYESARFEIJbXYtZ29vZ2xlSARSBXdhdGNoYPj_hYjnq6uUTQw=/0/0/0/video.3gp.
It was validated on 4.0.3 and 4.1.2 for local 3gp, local mp4, http 3gp and youtube rtsp streams. Finally, I ended up writting my own solution based on SurfaceView and MediaPlayer. Even VideoView didn't match all of my needs. I had a very hard time implementing a player supporting many features and formats. Install the F-Droid app to get notified about updates. You really have to use a raw URI to the YouTube Video, for your Video it would be: F-Droid is a trusted catalogue of Free and Open Source applications for Android.
I tried the code above with a self extracted URI to a mp4 version of the video and it worked just fine on my Android 4.0 phone.
Usually they are extracted from the source code of the original YouTube Video page but that's an other topic.
The tricky part here is not Android related it is how to get the raw URI of a YouTube video. If the user has multiple video players installed the user also gets a choice which one he wants to use for the playback. StartActivity(intent) // called directly from an other activity as you see tDataAndType(uri, "video/*") // important! otherwise you just download the video Intent intent = new Intent(Intent.ACTION_VIEW) You just need a raw URI of the YouTube video and trigger an intent with it: Uri uri = Uri.parse(" // i.e.