Radiant Media Player

Multiple audio tracks support (HLS & DASH)

Documentation sections

Audio tracks selection module

Radiant Media Player supports the rendering of multiple audio tracks (different language or bitrate) in HLS & DASH. When the player detects multiple audio tracks within a HLS or DASH stream it will automatically display the audio tracks selection module (headset icon). Information held within this module will be based from the available information in the HLS or DASH manifest.

This features is supported for on-demand, DVR and live video streaming.

Player code example

The below example is the one used for the player displayed above (HLS with multi-languages audio-tracks):

<script src="https://cdn.radiantmediatechs.com/rmp/4.9.0/js/rmp.min.js" 
<div id="rmpPlayer"></div>
var bitrates = {
  // Our multi-audio HLS stream
  hls: 'https://1703298472.rsc.cdn77.org/vod/smil:hls-maudios-prod.smil/playlist.m3u8'
var settings = {
  width: 640,
  height: 360,
  licenseKey: 'your-license-key',
  bitrates: bitrates,
  // We currently do not support swapping audio tracks with Google Cast - so it is best to disable it
  googleCast: false,
  // We do however support it with AirPlay on iOS (audio tracks can be changed in fullscreen mode)
  airplay: true,
  // On macOS Safari we need to force hls.js usage over native HLS to display the audio tracks module
  forceHlsJSOnMacOSSafari: true,
  poster: 'https://www.radiantmediaplayer.com/images/poster-rmp-demo.jpg'
var rmp = new RadiantMP('rmpPlayer');

Here is an example for the above code:

The above example will display multi-audio tracks in HLS. The language name of the audio track is indicative, "Deutsch" and "Fran├žais" tracks will play music.

Support notes

  • Audio tracks can be programmatically manipulated with the player API. See getAudioTracks and setAudioTrack methods and a complete example here.
  • On iOS the player must be in fullscreen mode for the audio-selector menu to be available
  • On macOS Safari we need to force hls.js usage over native HLS to display the audio tracks module, so set forceHlsJSOnMacOSSafari to true
  • Multi-audio tracks HLS or DASH casting with Google Cast is not supported - googleCast setting should be set to false for such use-cases
  • Be it with HLS or DASH, each audio track must have valid and unique language information (as defined by the related HLS or DASH specifications) for the player to properly identify them.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 3.0 License.