Live streaming to android using 4.1 HTML 5-ThrowExceptions

Exception or error:

As most you of are probably aware flash will not be supported in the new versions of android 4.1 or above.

I am looking for a way to stream live video content to the new versions of android (I current just use flash) through the web browser.

I have tried html5 video tag and HLS stream however I have only managed to get the audio to come through.

I am testing this all on the android emulator.

At the moment there is no way for us to deliver content to anyone that will be using android 4.1.. Which is slightly worrying as it gains more users.

How to solve:

IF you can use VideoView….

I’m using HTTP Live Stream for Android 4.0.3 right now with Wowza Media Server.

    private VideoView mainVideo;
    public static String VIDEO_FEED_URL = http://192.168.1.102:1935/http/myStream/playlist.m3u8

    mainVideo = (VideoView) findViewById(R.id.mainVideo);
    mainVideo.setVideoURI(Uri.parse(VIDEO_FEED_URL));
    mainVideo.requestFocus();
    mainVideo.setOnPreparedListener(new OnPreparedListener() {

        public void onPrepared(MediaPlayer mp) {
            mainVideo.start();
        }
    });

Here’s the tutorial I followed for Wowza. http://www.wowza.com/forums/content.php?36-How-to-set-up-live-streaming-using-an-RTMP-based-encoder

I’m waiting for my 4.1 tablet right now to see if this works. Unless Google changed VideoView, this should still work.

###

On my Nexus 7 (Android 4.1) HLS / H.264 live streaming does not work in-browser.

However, if instead I supply or redirect to a link to the streaming manifest, this will launch the video player app, and that works just fine.

So a bit more JQuery hackery to wrap around something like JWPlayer or it’s ilk

Leave a Reply

Your email address will not be published. Required fields are marked *