开发者

MPMoviePlayerViewController to stream Mp3's

I am trying to stream an mp3 using MPMoviePlayerViewController. I realize this was (obviously) meant to be used for movies, but I read that I could use it to stream mp3's as well.

Once the MPMoviePlayerViewController loads, the "Loading..." screen comes up and a couple of seconds later it just closes down. The problem doesn't seem to be with my url since I can plug it into a browser and the mp3 downloads just fine.

Here is my code:

NSLog(@"OpenFlowVC: url: %@",url);
    MPMoviePlayerViewController *playerVC = [[MPMoviePlayerViewController alloc] initWithContentURL:url];
    playerVC.moviePlayer.movieSourceType = MPMovieSourceTypeStreaming;
    [self presentMoviePlayerViewControllerAnimated:playerVC];
    [playerVC autorelease];

E开发者_如何转开发xample URL: http://dl.soundowl.com/12kj.mp3

The strange thing is, this works for some mp3's but not others. Any input would be appreciated. Thanks


Have you checked the real format and encoding of each MP3, try to use some tool that would give you all this information (Try this one free) They may be all files with mpp3 as extension but not all the same way encoded. Compare a working with a non working mp3.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜