直播Android(http或httplive)

Ran*_*a.S 5 android live-streaming http-live-streaming

有没有人在Android设备上运行http live Streaming(由Apple发现).我有一些Streaming Url.喜欢""www.abc/iphone/france24/allegro/fr/f24_fr.m3u8""类型.我的任务是为Android 3.0 OS类型移动设备制作应用程序.任何人都可以帮助我做到这一点.

这个话题在android market中是新的.所以在互联网上没什么帮助.我有一个示例代码在Android设备上运行直播.但它没有运行我拥有的网址.这些网址有效地用于IPAD或IPHONE.谢谢

小智 2

查看Android 错误报告中的问题。用 httplive 替换 http 对我有用。以下是错误报告中的示例代码

private void playVideo(Integer Media) {
    doCleanUp();
    try {
        switch (Media) {
            case Globals.TEST_HTTP:
                path = "http://devimages.apple.com/iphone/samples/bipbop/gear1/prog_index.m3u8";
                break;
            case Globals.TEST_HTTPLIVE:
                path = "httplive://devimages.apple.com/iphone/samples/bipbop/gear1/prog_index.m3u8";
                break;
        }
        mMediaPlayer = new MediaPlayer();
        mMediaPlayer.setDataSource(path);
        mMediaPlayer.setDisplay(holder);
        mMediaPlayer.prepare();
        mMediaPlayer.setOnBufferingUpdateListener(this);
        mMediaPlayer.setOnCompletionListener(this);
        mMediaPlayer.setOnPreparedListener(this);
        mMediaPlayer.setOnVideoSizeChangedListener(this);
        mMediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);
    } catch (Exception e) {
        Log.e(TAG, "error: " + e.getMessage(), e);
    }
}
Run Code Online (Sandbox Code Playgroud)