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 - see this example here

HLS with multi-languages audio-tracks

<!-- Include Radiant Media Player - here we use the optimised build for hls.js -->
<script src="https://cdn.radiantmediatechs.com/rmp/5.9.2/js/rmp-hlsjs.min.js"></script>
<div id="rmpPlayer"></div>
<script>
var src = {
  // Your multi-audio HLS stream
  hls: 'https://your-hls-url.m3u8'
};
var settings = {
  licenseKey: 'your-license-key',
  width: 640,
  height: 360,
  src: src,
  // On macOS and iPadOS Safari we need to force hls.js usage over native HLS to display the audio track selection module
  forceHlsJSOnMacOSIpadOSSafari: true,
  contentMetadata: {
    poster: [
      'https://your-poster-url.jpg'
    ]
  }
};
var rmp = new RadiantMP('rmpPlayer');
rmp.init(settings);
</script>

Similarly to the above example you can also use a DASH stream with embedded multi-audio tracks to display a multi-languages experience with our player.


Audio tracks API

See our player API docs here.


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 and iPadOS Safari when using HLS, we need to force hls.js usage over native HLS to display the audio tracks module, this is done by setting forceHlsJSOnMacOSIpadOSSafari to true.
  • 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.