2013-02-18 60 views
1

的流媒體廣播網上的代碼如下一些網址沒有在網上電臺Android平臺

player = new MediaPlayer(); 
    player.setDataSource(RADIO_STATION_URL); 
    player.setOnPreparedListener(new OnPreparedListener() { 
     public void onPrepared(MediaPlayer mp) { 
      player.start(); 
     } 
    }); 

,如果我把網址到位RADIO_STATION_URL像http://test1.leanstream-hd.com/CFHKFM,它會給我一個錯誤

02-18 17:12:34.035: E/MediaPlayer(1205): error (1, -2147483648) 

和播放器不工作它將工作在許多網址,但在這種情況下的網址它不工作:(

我已經GOOGLE了,我得到了一些媒體格式不支持mediapl艾爾通過以下鏈接

http://developer.android.com/guide/appendix/media-formats.html

,但任何人可以建議我如何找到網址是哪包含我想在這個鏈接來自服務器,是動態的,通用的無線應用程序,它的媒體格式

+0

一旦檢查此[鏈接](http://stackoverflow.com/a/7114893/1398150)可能有用 – Harish 2013-02-18 13:08:28

回答

2

在VLC運行URI和去Tool --> Codec Information檢查詳細..以下是截屏爲http://test1.leanstream-hd.com/CFHKFM URI

enter image description here

enter image description here

+0

謝謝SOOOOO多:) Praful納加爾 – 2013-02-18 12:31:27

+0

很高興我能:-)幫助.. – 2013-02-18 12:32:21

+1

但Praful我想通過android代碼知道! – 2013-02-18 12:33:12