使用AVAudioPlayer播放iPod歌曲是否可行? [英] Is it posible to play iPod songs using AVAudioPlayer?

查看:141
本文介绍了使用AVAudioPlayer播放iPod歌曲是否可行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个问题,是否可以使用AVAudioPlayer而不是使用MPMusicPlayer来播放和播放iPod库歌曲/播放列表?

I have a question that, Is it possible to get and play the iPod library songs / playlist using AVAudioPlayer instead of using MPMusicPlayer?

提前致谢,
Chandra。

Thanks in advance, Chandra.

推荐答案

我试过的一种方法就是将歌曲从iPod库复制到你的应用程序然后就可以玩了。当你关闭时,你也可以删除那些歌曲。但是在尺寸方面会让你的应用变得沉重。请参阅我的帖子

One way i tried with is just copy the song from iPod library to your app then you can play. When you close then you can delete also those songs. But makes your app heavy in terms of size. See my post.

我发现的另一种方法是使用 AVPlayer 。这支持iPod库。作为AVPlayer的参考,你可以去发布

Another way i found is using AVPlayer of AVFoundation framework. This supports iPod library. For reference of AVPlayer you can go to post

这篇关于使用AVAudioPlayer播放iPod歌曲是否可行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆