簡體   English   中英

是否可以獲取MPMediaItem的iTunes Store ID?

[英]Is it possible to get the iTunes Store ID for an MPMediaItem?

有沒有辦法從MPMediaItem獲取歌曲的iTunes Store ID?

我正在嘗試拉出用戶的播放列表,將其傳輸到另一台設備,然后使用MPMusicPlayerController的setQueueWithStoreIDs播放歌曲。 這需要將MPMediaItem映射到iTunes Store中的內容,這是iTunes Match的目的,它包含在Apple Music訂閱中。

從理論上講,對於與iTunes內容匹配的歌曲,這應該是可能的。 但是,我無法在MPMediaItemMPMediaPlayer框架中支持此功能的任何其他類上找到屬性或valueForKey persistentId屬性集是本地數據庫密鑰,不會綁定到項目的iTunes內容。 它們在同一用戶的設備上似乎不相同。

這是現在可以使用iOS的10.3 + playbackStoreID在實例屬性MPMediaItem

https://developer.apple.com/documentation/mediaplayer/mpmediaitem/2813404-playbackstoreid

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM