The metadata is pulling a transparent png image from a url. However the UIImageView is not coming in as transparent and has a white background.
Is there a work around this issue?
Perhaps .pngData()
@IBOutlet weak var mainCenterIcon: UIImageView!
func initAudioPlayer() {
let url = URL(string: activeAudioURL)
let playerItem:AVPlayerItem = AVPlayerItem(url: url!)
player = AVPlayer(playerItem: playerItem)
//MetaData to recieve album artwork
let metadataList = playerItem.asset.metadata
for item in metadataList {
guard let key = item.commonKey?.rawValue, let value = item.value else{
continue
}
switch key {
case "artwork" where value is Data : mainCenterIcon.image = UIImage(data: value as! Data)
default:
continue
}
}
}