Quantcast
Channel: Active questions tagged crash - Stack Overflow
Viewing all articles
Browse latest Browse all 7191

AVPlayerItem externalMetadata unrecognized selector

$
0
0

This piece of code is crashing on iOS 12 with unrecognised selector exception:

[AVPlayerItem externalMetadata]: unrecognized selector sent to instance

However, this code is not crashing on iOS 13.

Apple documentation states that AVPlayerItem has externalMetadata getter and setter since iOS 12.


    let item = AVPlayerItem(url: videoURL)

    let mutableMetadataItem = AVMutableMetadataItem()
    mutableMetadataItem.identifier = AVMetadataIdentifier.commonIdentifierDescription
    mutableMetadataItem.value = 1
    item.externalMetadata.append(mutableMetadataItem)

Could you please help me to understand why is that happening?


Viewing all articles
Browse latest Browse all 7191

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>