How to get all the available audio tracks for a video in Playkit


#1

Hi ,

I am able to get the list of the text tracks but not getting the list of all the audio tracks. It is always returning 1 audio track.I uploaded a mp4 file with multiple audio tracks to the KMC. Do we need to upload the file in any specific format? My code and other details are given below.

self.playerController.addObserver(self, events: [PlayerEvent.tracksAvailable], block:{ (event:Any) -> Void in

        let captions = (event as AnyObject).value(forKeyPath: "tracks") as! PKTracks
        print("captions %@",captions.textTracks!)
        weakSelf?.arrayTextTracks = captions.textTracks as NSArray!
        weakSelf?.arrayAudioTracks = captions.audioTracks as NSArray?
    })

PartnerId- 2262221
ConfigId- 38677152