Alternate audio uses MediaPlayer to play a video that is specified in an M3U8 HLS playlist and that can contain several alternate audio streams.
Wait for the MediaPlayer
to be in at least the MediaPlayerStatus.PREPARED
status.
Listen for the MediaPlayerEvent.STATUS_CHANGED
event with status MediaPlayerStatus.PREPARED
.
This step means that the initial list of audio tracks is available.
Get the available audio tracks from the MediaPlayerItem
instance.
mediaPlayerItem.getAudioTracks()
(Optional) Present the available tracks to the user.
Set the selected audio track on the MediaPlayerItem
instance.
mediaPlayerItem.selectAudioTrack(audioTrack)