Iphone sdk support for playing mp3 files over the network

≯℡__Kan透↙ 提交于 2019-11-28 11:51:35

I ended up using 1. MPMediaPlayback protocol for controlling the MPMoviePlayerController 2. MPMoviePlayerPlaybackDidFinishNotification to determine if the playback completed due to error or due to user input.

The player plays fine both with streaming and Progressive download. The sample MoviePlayer code at http://developer.apple.com/iphone/library/samplecode/MoviePlayer_iPhone/Introduction/Intro.html#//apple_ref/doc/uid/DTS40007798 is an excellent starting point.

Take a look at AVPlayer, it can stream MP3's over the network connection.

        AVPlayer *player = [[AVPlayer playerWithURL:[NSURL URLWithString:@"http://www.mp3.com/mp3file.mp3"]] retain];

    [player play];

Check the documentation.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!