Video From Youtube in Emulator Android 2.1 Eclipse Gallileo/ Unable to play video

by Valentino XM » Mon, 14 Dec 2009 06:08:32 GMT


Sponsored Links
 Hi!

having no luck with playback of video from source file, i thought id
try video from youtube... Emulator says it cannot play video.. So now
what?.. can anyone tell me aoubt this code below.

TIA.

cheers

package info.shouraig.com;

import android.app.Activity;
import android.net.Uri;
import android.os.Bundle;
import android.util.Log;
import android.widget.MediaController;
import android.widget.VideoView;

public class XSO5 extends Activity {
        private static final String RTSP = " http://www.youtube.com/watch? 
v=8bmWwxixT0Y";
        VideoView videoXSO5;

    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

      //***VideoView to video element inside Multimedia.xml file

       VideoView videoView  = (VideoView)findViewById(R.id.videoXSO5);
       Log.v("videoXSO5", "***Video to Play:: " + RTSP);
       MediaController mc = new MediaController(this);
       mc.setAnchorView(videoView);
       Uri video = Uri.parse(RTSP);
       videoView.setMediaController(mc);
       videoView.setVideoURI(video);
       videoView.start();

--



Other Threads

1. How to get the rtsp (rtcp rtp packets) message ?

I wrote a simple app that play the rtsp.The app is just use the
mediaplayer to play the rtsp url. But I can not sure whether the app
could get the packets that come from the server.So I want to print the
packet message ,but I don't know how to print . I tried to print it in
the log. And  I also try to add the LOGD in the jitterBufferNode(in
the opencore) ,but it doesn't work and I get nothing .Because some one
said that playing on the emulator has some problems,so I try it on the
device.But some thing wrong also happened.Update the buffering is
always 0%.Could anyone tell me what wrong with my app?
--~--~---------~--~----~------------~-------~--~----~

2. Why Update buffering is always 0% when mediaplayer play the rtsp ?

Hi,all.
Why Update buffering is always 0% when mediaplayer play the rtsp ?
I try to play this  both on the emulator and on the device.
but eveytime it shows that the Update buffering is always 0%.
Could anyone give me a reason ?

At last it always shows the log

E/MediaPlayer( 1455): stop called in state 4

E/MediaPlayer( 1455): error (-38, 0)

E/PlayerDriver( 1088): Command (7) was cancelled


--~--~---------~--~----~------------~-------~--~----~

3. ListView progres

4. Android Scripting Environment

5. How to get the orange border with TextView ?

6. Please help _Confused_Server Side For android mobile application

7. unique phone id....