iOS应用中iTunes音乐商店的音乐预览 [英] Music preview from iTunes music store in iOS app

查看:136
本文介绍了iOS应用中iTunes音乐商店的音乐预览的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个有趣的问题。可以在iOS应用中播放iTunes音乐商店中的音乐预览吗?怎么做?我需要你的帮助。

I have interesting question. It is possible to play music preview from iTunes music store in iOS app? How to do that? I need your help.

推荐答案

是的,你可以这样做。我有一个已发布的应用程序,这样做。

Yes, you can do this. I have a published app which does this.

您需要获取音乐预览文件的URL。一种方法是通过iTunes搜索API。另一个是通过Apple Enterprise Partner Feed。

You need to get the URL's to the music preview files. One way is via the iTunes search API's. Another is via the Apple Enterprise Partner Feed.

http://www.apple.com/itunes/affiliates/resources/documentation/itunes-store-web-service-search-api.html

http:/ /www.apple.com/itunes/affiliates/resources/documentation/itunes-enterprise-partner-feed.html

获得网址后,即可可以将其提供给MPMoviePlayerController以进行渐进式下载/回放。或者您可以自己下载文件并将其提供给AVAudioPlayer或您自己的播放基础设施。

Once you have the URL, you can feed it to MPMoviePlayerController for progressive-download/playback. Or you can download the file yourself and feed it into AVAudioPlayer or your own playback infrastructure.

请查看Apple使用预览链接的指南。我相信你必须是一个会员,你必须宣传相关歌曲的销售。我也相信(请检查)Apple还允许联盟会员在网页上放置这些预览链接,以及联盟链接以购买歌曲。

Please check the Apple guidelines for using preview links. I believe you must be an affiliate, and you must be advertising the sale of the associated song. I also believe (please check) that Apple also permits affiliates to place these preview links on web pages, alongside affiliate links to purchase the songs.

这篇关于iOS应用中iTunes音乐商店的音乐预览的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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