AVPlayerItems で表される曲を再生するために AVPlayer を使用する iOS アプリケーションを使用しています。
MPNowPlayingInfoCenter.defaultCenter() の nowPlayingInfo プロパティを設定しようとしましたが、経過時間や再生時間などの他の情報を更新する必要があるため、AVPlayer によって情報がすぐに上書きされるようです。
プログラム実行直後でも
MPNowPlayingInfoCenter.defaultCenter().nowPlayingInfo?[MPMediaItemPropertyTitle] = "Title"
のプリントアウトMPNowPlayingInfoCenter.defaultCenter().nowPlayingInfo
は
Info: ["MPNowPlayingInfoPropertyElapsedPlaybackTime": 34.89555007300078, "AVNowPlayingInfoControllerIdentifierKey": <__NSConcreteUUID 0x13778e9b0> 9141DD1C-FD09-4210-B3C7-B948522E3AF6, "playbackDuration": 198.2516666666667, "MPNowPlayingInfoPropertyPlaybackRate": 1]
私は何を間違っていますか?タイトル/アルバム名などの追加のメタデータを AVPlayerItem に保存して、情報センターに表示することはできますか?
また、AVNowPlayingInfoControllerIdentifierKey とは何ですか? AVNowPlayingInfoController という名前のクラスはないようです。