如何在UITableView中播放流媒体音频

时间:2013-07-25 17:22:36

标签: iphone ios url streaming avplayer

我无情地搜索,但没有运气。

我只是想在我的tableview(didSelectRowAtIndexPath)中播放流式音频文件(mp3)但是它们在xcode中没有错误但mp3不会播放

这是一个片段

NSString *urlstr = @"www.nosajsolomon.com/pull_up_to_mi_bumper.mp3";
NSURL *url = [NSURL URLWithString:urlstr];
AVPlayerItem *playerItem2 = [AVPlayerItem playerItemWithURL:url];
player = [AVPlayer playerWithPlayerItem:playerItem2];
[player play];
player.actionAtItemEnd = AVPlayerActionAtItemEndNone;

知道我做错了吗?

0 个答案:

没有答案