采用Android的媒体播放器播放流M3U [英] Android playing stream m3u using mediaPlayer
本文介绍了采用Android的媒体播放器播放流M3U的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我建了播放来自网络流媒体m3u文件的应用程序。
I'm building an application that play streaming m3u file from web.
我使用媒体播放器类和它的作品。 这里的code:
I'm using mediaPlayer class and it works. Here's the code :
String test_path = "http://cast.idvps.com:8000/djwirya.m3u";
try {
mediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);
mediaPlayer.setDataSource(test_path);
mediaPlayer.prepareAsync();
} catch (IOException e) {Log.e("Error", "No Stream");}
mediaPlayer.start();
这是正常使用。但是,经过WHIE我又编了,没有声音。
It was working perfectly. But, after a whie I compiled it again, there's no sound.
请帮助.... THX
pls help.... THX
推荐答案
这是一个解决方案。 对不起,我是法国人但我认为这应该是确定与谷歌翻译。
This is a solution. Sorry I'm french but i'm think that should be ok with google translation.
这篇关于采用Android的媒体播放器播放流M3U的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文