0

When playing a video through AVPlayerViewController, its artist metadata does not show up in the player below the title in iOS control center / Lock Screen player.

Right now, I'm setting metadata to the AVPlayerItem itself in a function within an AVPlayerItem extension, along the lines of this:

func setMetadata(title: String, artist: String) {
    let titleItem = AVMutableMetadataItem()
    titleItem.identifier = AVMetadataIdentifier.commonIdentifierTitle
    titleItem.value = title as (NSCopying & NSObjectProtocol)
    self.externalMetadata.append(titleItem)


    let artistItem = AVMutableMetadataItem()
    artistItem.identifier = AVMetadataIdentifier.commonIdentifierArtist
    artistItem.value = artist as (NSCopying & NSObjectProtocol)
    self.externalMetadata.append(artistItem)
}

The title item works properly, but the artist is not updating. Any thoughts? Do videos have some other metadata field shown in the player that isn't artist?

I've tried .commonIdentifierDescription and .iTunesMetadataTrackSubtitle as alternate metadata identifiers but these are not working as expected.

EVO
  • 1

0 Answers0