本文介绍了Android的音频流M3U8 - 如何的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

正如标题,我怎么能流的M3U8音频在Android上没有vitamio? (在Android 2.3以上版本)。我见过一些应用程序可以流我的我的链接<一个href=\"http://4metest1-view.4me.it/api/xpublisher/resources/weebopublisher/getContentDescriptor.m3u8?clientId=4metest1&contentId=b55f7d74-cd81-48ce-9390-d9ffd5c49281&channelType=STREAMHTTPIOS&v=4\" rel=\"nofollow\">http://4metest1-view.4me.it/api/xpublisher/resources/weebopublisher/getContentDescriptor.m3u8?clientId=4metest1&contentId=b55f7d74-cd81-48ce-9390-d9ffd5c49281&channelType=STREAMHTTPIOS&v=4
像VLC或浅绿色的球员,但我不能设置mMediaPlayer重现它。

As the title, how can I stream an m3u8 audio on Android without vitamio? (on Android 2.3+). I've seen that some app can stream my my link http://4metest1-view.4me.it/api/xpublisher/resources/weebopublisher/getContentDescriptor.m3u8?clientId=4metest1&contentId=b55f7d74-cd81-48ce-9390-d9ffd5c49281&channelType=STREAMHTTPIOS&v=4like VLC or aqua Player, but i cannot setup mMediaPlayer to reproduce it.

推荐答案

使用一个VideoView和轻松的音乐来播放音频:)

Use a VideoView to play your audio with relaxing music :)

myVideoView = (VideoView)this.findViewById(R.id.myVideoView);
            MediaController mc = new MediaController(this);
            myVideoView.setMediaController(mc);                     
            urlStream = "http://4metest1-view.4me.it/api/xpublisher/resources/weebopublisher/getContentDescriptor.m3u8?clientId=4metest1&contentId=b55f7d74-cd81-48ce-9390-d9ffd5c49281&channelType=STREAMHTTPIOS&v=4";
            runOnUiThread(new Runnable() {
                @Override
                public void run() {
                    myVideoView.setVideoURI(Uri.parse(urlStream)); 
                }
            });

这篇关于Android的音频流M3U8 - 如何的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-19 02:48