问题描述
我被要求做出非官方的在线流媒体的Android应用程序一定电台。
我有经验,在Android的某些MP3或其他流流。
但我不知道流网址
来提供 mediaPlayer.setDataSource(URL)
。
I've been asked to make unofficial online streaming android application for a certain radio station.
I've experience with streaming in android for certain mp3 or whatever stream.
But I don't know the stream url
to provide in mediaPlayer.setDataSource(url)
.
有没有什么办法让从ofiicial流页面的前流网址。 此单选流?
Is there any way to get the stream url from the ofiicial streaming page for ex. this radio stream?
推荐答案
并不难,
如果你看一下在页面的源代码,你会看到它使用流通过Shoutcast的声音。
if you take a look at the page source, you'll see that it uses to stream the audio via shoutcast.
这是流网址
StreamUrl:<一href="http://stream.radiotime.com/listen.stream?streamIds=3244651&rti=c051HQVbfRc4FEMbKg5RRVMzRU9KUBw%2fVBZHS0dPF1VIExNzJz0CGQtRcX8OS0o0CUkYRFJDDW8LEVRxGAEOEAcQXko%2bGgwSBBZrV1pQZgQZZxkWCA4L%7e%7e%7e">http://stream.radiotime.com/listen.stream?streamIds=3244651&rti=c051HQVbfRc4FEMbKg5RRVMzRU9KUBw%2fVBZHS0dPF1VIExNzJz0CGQtRcX8OS0o0CUkYRFJDDW8LEVRxGAEOEAcQXko%2bGgwSBBZrV1pQZgQZZxkWCA4L%7e%7e%7e",
"StreamUrl": "http://stream.radiotime.com/listen.stream?streamIds=3244651&rti=c051HQVbfRc4FEMbKg5RRVMzRU9KUBw%2fVBZHS0dPF1VIExNzJz0CGQtRcX8OS0o0CUkYRFJDDW8LEVRxGAEOEAcQXko%2bGgwSBBZrV1pQZgQZZxkWCA4L%7e%7e%7e",
它返回一个JSON这样的:
which returns a JSON like that:
{
"Streams": [
{
"StreamId": 3244651,
"Reliability": 92,
"Bandwidth": 64,
"HasPlaylist": false,
"MediaType": "MP3",
"Url": "http://mp3hdfm32.hala.jo:8132",
"Type": "Live"
}
]
}
我相信您需要的网址: http://mp3hdfm32.hala.jo:8132
i believe that's the url you need:http://mp3hdfm32.hala.jo:8132
这篇关于如何从网上流媒体广播电台流网址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!