How to switch audio track in .mkv file on Chromecast (iOS)

I found that we can add mediaTracks for external audio and subtitles. And activate it with setActiveTrackIDs.

But how I can change current audio track from english to different language? Any code example? Infuse player in store somehow can do this.


One idea is to change default audio track in media file and reload from Chromecast. Dig little inside ffmpeg, understand this not easy if you not have experience.

The other idea is to retrieve audio stream data from video, and provide it with custom media server. This is also not trivial.

Third idea is AirConnect, but it works only with audio. Dig into VLC player code, found that there something similar implemented on low level programming.

Source: Ios