In order to provide to our users more information about the different audio tracks available in our streams, I am trying to identify Dolby audio tracks from the AVAssetMediaSelectionGroup that I get from the asset.
To do that, I am trying to get the audio codec from each AVMediaSelectionKeyValueOption. That way, from the codec, I could identify this track as Dolby, Stereo, etc...
Sadly, I did not find this information available in AVMediaSelectionKeyValueOption. Is there some way that I could use to get this data?
For the log, this is I am currently able to get from each media selection:
(lldb) po playerItem.asset.mediaSelectionGroup(forMediaCharacteristic: .audible) ▿ Optional<AVMediaSelectionGroup> - some : <AVAssetMediaSelectionGroup: 0x28306fa00, options = ( "<AVMediaSelectionKeyValueOption: 0x28306d480, language = en, mediaType = 'soun', title = English, default = YES>", "<AVMediaSelectionKeyValueOption: 0x28306d380, language = nar, mediaType = 'soun', title = Other (nar)>" ), allowsEmptySelection = YES>