我只知道ShoutCast的功能,它流式无线电列表。如何在iphone应用程序中使用Shoutcast?
但不知道如何使用iPhone应用程序。
现在,我只是希望在其网站上http://www.shoutcast.com/ becaues我没有使用Google通过对execpt其网站
任何教程将有助于找到这么多东西。
我得到的响应为,
<?xml version="1.0" encoding="UTF-8"?>
<stationlist>
<tunein base="/sbin/tunein-station.pls" />
<station name="PJ Nicky SuperRequest - a SHOUTcast.com member station" mt="audio/mpeg" id="172748" br="64" genre="Various" ct="(Ost.) -" lc="9946" />
<station name=" TOP 100 ReaLCasT - a SHOUTcast.com member station" mt="audio/mpeg" id="242423" br="128" genre="" ct="- Be My Baby" lc="7485" />
<station name="Alex Jones - Infowars.com - a SHOUTcast.com member station" mt="audio/mpeg" id="1026951" br="32" genre="Talk News Political" ct="Sunday Show Replay - Hr 2 (PrisonPlanet.tv)" lc="4216" />
<station name=" . - a SHOUTcast.com member station" mt="audio/mpeg" id="119368" br="128" genre="" ct="[db]" lc="3453" />
<station name="Auto PJ. RequestRadio - a SHOUTcast.com member station" mt="audio/mpeg" id="30375" br="128" genre="" ct="- The Star 7" lc="2453" />
</stationlist>
成功解析这一点,并得到/sbin/tunein-station.pls
现在我如何才能
NSString *data = [[NSString alloc]initWithContentsOfURL:[NSURL URLWithString:"http://yp.shoutcast.com/sbin/tunein-station.pls?id=21585&play_status=1"]];
,因为我只得到/sbin/tunein-station.pls
NSString *strEscapedValue = (__bridge_transfer NSString *)CFURLCreateStringByAddingPercentEscapes(nil, (__bridge CFStringRef)data, NULL, NULL, kCFStringEncodingUTF8);
NSLog(@"escaped value : %@",strEscapedValue);
strEscapedValue
给(null)
NSURL *url = [NSURL URLWithString:strEscapedValue];
streamer = [[AudioStreamer alloc] initWithURL:url];
您需要获取他们的aac链接 – 2012-01-07 09:44:45
什么是aac链接?我在这个链接上找到了文档,http://dev.aol.com/SHOUTcast/documentation – Heena 2012-01-07 09:46:37
你应该能够在shoutcast站点上指向一个AVPlayer。 – 2012-01-07 09:55:48