How to programmatically detect audio tracks on iOS
This article describes how you can use the AudioTrack API, a sub-API of the MediaTrack API, to detect audio tracks. Implementing this functionality is a common use-case for developers who want to build their own UI to visualize the available audio languages.
Usage
Listen for the ADD_TRACK event
on player.audioTracks
to detect every MediaTrack that is added to the player.
self.player.audioTracks.addEventListener(type: AudioTrackListEventTypes.ADD_TRACK, listener: { addTrackEvent in
let audioTrack = addTrackEvent.track
})