I have an MPD file from which I need to extract representation IDs and utilise them.
I've scoured the ExoPlayer JavaDocs but cannot figure out a way to get the exact String I need out of the MPD file using any of the ExoPlayer APIs. Here is the sample file:
<AdaptationSet lang="en" mimeType="audio/mp4" segmentAlignment="true" startWithSAP="1">
<ContentProtection cenc:default_KID="gejtwohtgoeghi" schemeIdUri="urn:mpeg:dash:mp4protection:2011" value="cenc"/>
<ContentProtection schemeIdUri="urn:uuid:rvtgwchghgihtwo-">
<mspr:pro>==</mspr:pro>
</ContentProtection>
<ContentProtection schemeIdUri="urn:uuid:uegeoupgheroughroguehopugerhopuw">
<cenc:pssh>orhuopuerthoerot=</cenc:pssh>
</ContentProtection>
<SegmentTemplate duration="2000" initialization="$RepresentationID$/init.mp4" media="$RepresentationID$/seg-$Number$.m4s" startNumber="1" timescale="1000"/>
<Representation audioSamplingRate="48000" bandwidth="72232" codecs="mp4a.40.2" id="audio/en/mp4a">
<AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>
</Representation>
</AdaptationSet>
I need to get the string - "audio/en/mp4a" from the above sample using ExoPlayer's classes such as DashUtil, etc.