【问题标题】:iphone access to song database/statsiphone 访问歌曲数据库/统计信息
【发布时间】:2010-10-15 18:05:27
【问题描述】:

您开发的应用程序能否与 iPhone/iPod 上的 iTunes 交互,以获取歌曲名称或 iPhone 或 iPod 用户播放次数最多的歌曲列表?

【问题讨论】:

    标签: iphone


    【解决方案1】:

    使用媒体播放器框架,您可以获得的有关任何特定歌曲的信息仅限于 Apple 公开的 MPMediaItemProperty 值。 General Media Item Property Keys如下:

    NSString *const MPMediaItemPropertyPersistentID;      // filterable
    NSString *const MPMediaItemPropertyMediaType;         // filterable
    NSString *const MPMediaItemPropertyTitle;             // filterable
    NSString *const MPMediaItemPropertyAlbumTitle;        // filterable
    NSString *const MPMediaItemPropertyArtist;            // filterable
    NSString *const MPMediaItemPropertyAlbumArtist;       // filterable
    NSString *const MPMediaItemPropertyGenre;             // filterable
    NSString *const MPMediaItemPropertyComposer;          // filterable
    NSString *const MPMediaItemPropertyPlaybackDuration;
    NSString *const MPMediaItemPropertyAlbumTrackNumber;
    NSString *const MPMediaItemPropertyAlbumTrackCount;
    NSString *const MPMediaItemPropertyDiscNumber;
    NSString *const MPMediaItemPropertyDiscCount;
    NSString *const MPMediaItemPropertyArtwork;
    NSString *const MPMediaItemPropertyLyrics;
    NSString *const MPMediaItemPropertyIsCompilation;     // filterable
    NSString *const MPMediaItemPropertyReleaseDate;
    NSString *const MPMediaItemPropertyBeatsPerMinute;
    NSString *const MPMediaItemPropertyComments;
    NSString *const MPMediaItemPropertyAssetURL;
    

    如您所见,此处未列出播放次数(或类似内容),因此答案为“否”。

    【讨论】:

      【解决方案2】:

      随着用户定义的属性键的引入,这种情况发生了变化。

      参考这个问题: ios get play count for items in the media library

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2010-10-13
        • 1970-01-01
        • 1970-01-01
        • 2011-02-24
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多