-1

I'm creating a sender/receiver Chromecast App on Android device to display movies.

I'm using a .mpd file containing already the video, the audio tracks, and subtitles. So my question is how to add a selection button for those tracks?

I only found how to add tracks with different files (.vtt, .mp3, ..) but not with them inside the video file. Doc I'm using: URL

Thanks for your help!

nobody710
  • 125
  • 1
  • 8

1 Answers1

1

You should look at the android sender documentation. The 'Remove Tracks' sections talks about how to enable/disable tracks using setActiveMediaTracks.

If the media contains the tracks once it has finished loading you should be able to enable/disable the tracks.

  • thanks for you answer; I finally found how to play the track I wanted, but still nothing to know which tracks are available on the file I'm playing. – nobody710 Apr 12 '19 at 13:57
  • @nobody710 look at [MediaInfo](https://developers.google.com/android/reference/com/google/android/gms/cast/MediaInfo) getMediaTracks should return the available tracks. – Allan Guigou Apr 15 '19 at 17:36
  • @nobody710 can you help me out with this stuck with same issue https://stackoverflow.com/questions/70343201/changing-audio-track-in-remote-media-client-in-cast – sanoj lawrence Jan 09 '22 at 03:58