Reputation: 1484
I'd like to play an iTunes sample within my app, I can get a URL preview like this: http://a1.mzstatic.com/us/r1000/084/Music/2a/10/84/mzm.elnwknga.aac.p.m4a How can I play it in the app? Should I use an AVPlayer? Thanks
Upvotes: 1
Views: 2470
Reputation: 7703
Yes, you should use AVPlayer. It has a handy initWithURL: method that you can use to pass that url to. Then you just call [player play];
Upvotes: 4