THAT LINK IS POINTING AT AN HTML FILE.

The MediaPlayer is very particular about the path you send in. A quick
search on Google turned up these suggestions for YouTube streaming:

http://osdir.com/ml/Android-Beginners/2009-09/msg00570.html
http://www.mail-archive.com/[email protected]/msg68312.html

Your problem so far is that you are passing the wrong data into your
VideoView. You need to pass in a .3gp, .mp4, or some other file format
that matches the document that I gave you last time.

If you still have trouble, please convert your "XSCycling" video to a
compatible file format and try embedding it directly into your app. At
the moment you seem to be stabbing randomly in the dark.

On Wed, Dec 16, 2009 at 4:03 PM, Valentino XM <[email protected]> wrote:
> package info.shouraig.com;
>
>
>
> import java.io.IOException;
>
> import android.app.Activity;
> import android.media.MediaPlayer;
> import android.os.Bundle;
> import android.util.Log;
> import android.widget.VideoView;
>
> public class XSO9 extends Activity{
>        private static final String HTTP = "http://www.youtube.com/watch?
> v=6ej-imJWuno";
>        VideoView VideoXSO9;
>
>    /** Called when the activity is first created. */
>   �...@override
>    public void onCreate(Bundle savedInstanceState) {
>        super.onCreate(savedInstanceState);
>        setContentView(R.layout.main);
>
>        //Fill viewView from resource
>        VideoView videoView =(VideoView)findViewById(R.id.VideoXSO9);
>        Log.v("videoXSO9", "***Video to Play::" + HTTP);
>        MediaPlayer mp = new MediaPlayer();
>        try {
>                        mp.setDataSource(HTTP);
>                } catch (IllegalArgumentException e) {
>                        // TODO Auto-generated catch block
>                        e.printStackTrace();
>                } catch (IllegalStateException e) {
>                        // TODO Auto-generated catch block
>                        e.printStackTrace();
>                } catch (IOException e) {
>                        // TODO Auto-generated catch block
>                        e.printStackTrace();
>                } try {
>                        mp.prepare();
>                } catch (IllegalStateException e) {
>                        // TODO Auto-generated catch block
>                        e.printStackTrace();
>                } catch (IOException e) {
>                        // TODO Auto-generated catch block
>                        e.printStackTrace();
>                }
>            mp.start();
>
>
>
>
>
>        //Start Video
>
>
>
>
>    }
> }
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Beginners" 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-beginners?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" 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-beginners?hl=en

Reply via email to