hey folks,

I'm trying to build a sample app that plays arbitrary web-based video
streams (in this case youtube streams, but for the sake of this
discussion, let's please disregard the youtube app)..   i've hacked it
up with a VideoView and an HttpUrlConnection and some other stuff, and
it works, the relevant code being something along these lines:

public void doVideo() {
        String result = null;
        result = getContentUrl(); // this grabs the stream url from a
feed.. it works, don't worry about it
        VideoView vv=(VideoView)findViewById(R.id.surface_view);
        if (vv.isPlaying() == true) {
                vv.stopPlayback();
        }
        vv.setVideoURI(Uri.parse(result));
        vv.requestFocus();
        vv.start();
    }

.. so as I said, this does work, but it's rough..  playback fails or
hangs unexpectedly (sometimes the video stops but the audio continues,
etc), and no useful info is provided to the user..     anyway, ideally
I'd like the experience to be a lot more like the WeatherChannel app's
video playback..  it has 'loading' notifications, and access to
playback controls, which leads me to believe they implemented it using
MediaPlayer rather than VideoView...   right?

so I guess my real questions here are:

can (or should?) this be achieved using VideoView, building the
loading and playback stuff by hand, or is there a way to implement
something similar to my above noted code, using MediaPlayer rather
than VideoView?

code samples, or relevant links thereof, would be greatly appreciated.

Thanks,

-br

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to