Radiant Media Player

DASH streaming documentation



DASH support in Radiant Media Player

Starting with Radiant Media Player 4 we have built a new DASH engine based on Google Shaka player.

This new engine provides better peformance, increased stability and new fine-tuning options for custom playback of DRM-encrypted content. All DASH content with Radiant Media Player is streamed to HTML5 video through media source extensions.


Supported DASH features

  • ISO BMFF (MP4) and WebM content (even in the same manifest)
  • Live and on-demand media content
  • Optimized adaptive bitrate streaming with automatic or manual bitrate selection
  • Multiple-audio tracks
  • Multiple WebVTT or TTML tracks (subtitles/captions)
  • DRM (PlayReady, Widevine, ClearKey)
  • Multiple periods
  • Audio-only
  • Resilience to errors

Generally available features like video ads, JavaScript API or playback rate changes are also supported with DASH to Radiant Media Player.

By default the player expects a DASH manifest to expose both MP4 (H.264 with AAC) & WebM (VP9 with Vorbis) content. Wherever possible DASH WebM will be preferred over DASH MP4. If you are using DASH with MP4 only or WebM only content please refer to the dashMimeType setting below for best device coverage.

Currently unsupported features:

  • Offline content playback

Supported environments

See our compatibility table for a list of environments where DASH streaming is supported with Radiant Media Player.


Best practices

As a rule of thumb Radiant Media Player should work with any-standard compliant DASH provider. In order to provide better cross-device support for DASH streaming to Radiant Media Player we provide the following recommendations:

  • You must set up your streaming server to return proper CORS settings permitting GET requests
  • For H.264 encoded content H.264 Main profile provides best coverage - H.264 Level 5+ (this is for 4K content) encoded content may cause playback issue on older devices
  • Have the same video/audio codec for each rendition of the DASH stream
  • Have the same audio sampling rate and number of audio channels for each rendition of the DASH stream
  • Other general recommendations for streaming content through Shaka player apply

Player code example

In this example we use a multicodec, multilingual on-demand DASH stream:

<!-- Include Radiant Media Player JavaScript file in your <body> or <head> -->
<script src="https://cdn.radiantmediatechs.com/rmp/v4/latest/js/rmp.min.js"></script>
<!-- Set up your wrapper div with its unique id -->
<div id="rmpPlayer"></div>
<!-- Set up player configuration options -->
<script>
var bitrates = {
  dash: 'https://storage.googleapis.com/shaka-demo-assets/angel-one/dash.mpd',
  // For older devices and iOS we may provide an MP4 progressive download fallback
  mp4: [
    'https://d1swr4916zvh4g.cloudfront.net/media/bbb-360p.mp4'
  ]
};
var settings = {
  licenseKey: 'your-license-key',
  bitrates: bitrates,  
  delayToFade: 3000,
  width: 640,
  height: 360,
  poster: 'https://www.radiantmediaplayer.com/images/poster-rmp-showcase.jpg',
  // The below settings are not always necessary - they are displayed as an example
  // the displayed values are the default player values
  dashMimeType: {
    mp4: true,
    webm: true
  },
  webmCodecs: {
    video: 'vp9',
    audio: 'vorbis'
  }
};
// Reference to the wrapper div (unique id)
var elementID = 'rmpPlayer';
// Create an object based on RadiantMP constructor
var rmp = new RadiantMP(elementID);
// Initialization ... test your page and done!
rmp.init(settings);
</script>

DASH player settings

dashFirst: Boolean

When used in conjonction with HLS this setting will tell the player to pick DASH (where supported) as a first choice over HLS (picking HLS as a first choice is the player default). DASH (where supported) is always picked first over MP4/WebM progressive download. Default: false.

dashMimeType: Object

By default the player expects a DASH manifest to expose both MP4 (H.264 with AAC) & WebM (VP9 with Vorbis) content. If this is your use-case you do need to set the dashMimeType setting - the default value will work great. Wherever possible DASH WebM will be preferred over DASH MP4. If your DASH manifest does not include both MP4 & WebM content, or if your DASH manifest has a WebM codecs set other than VP9/Vorbis, you must give this information to the player up-front so that it can fallback to other streaming protocols like HLS or progressive download. If you do not provide HLS or progressive download alternatives (this is not recommended) to the player then setting dashMimeType is not necessary. Default:

dashMimeType: {
  mp4: true,
  webm: true
}

When dashMimeType.webm is set to true and your DASH manifest has WebM codecs data other than VP9/Vorbis the player also expects a webmCodecs setting to be set. The webmCodecs is an Object set has:

webmCodecs: {
  video: 'vp9',
  audio: 'vorbis'
}

webmCodecs.video must be either 'vp8' or 'vp9'. webmCodecs.audio must either be 'vorbis' or 'opus'.

dashAbrDefaultBandwidthEstimate: Number

The default bandwidth estimate to use if there is not enough data, in bit/sec. Default: 500000.

dashAbrEnabled: Boolean

If true, enable automatic adaptation by the player. Default: true.

dashPreferredAudioLanguage: String

The preferred language to use for audio tracks. If not given it will use the 'main' track. This must be specified as a language code (example: 'en', 'de' or 'pt-BR'). See https://tools.ietf.org/html/rfc5646 and http://www.iso.org/iso/home/standards/language_codes.htm. Default: ''.

dashPreferredTextLanguage: String

The preferred language to use for text tracks. This must be specified as a language code (example: 'en', 'de' or 'pt-BR'). See https://tools.ietf.org/html/rfc5646 and http://www.iso.org/iso/home/standards/language_codes.htm. Default: ''.

dashStreamingBufferBehind: Number

The maximum number of seconds of content that the player will keep in buffer behind the playhead when it appends a new media segment. The player will evict content to meet this limit. Default: 30.

dashStreamingBufferingGoal: Number

The number of seconds of content that the player will attempt to buffer ahead of the playhead. This value must be greater than or equal to the dashStreamingRebufferingGoal setting. Default: 60.

dashStreamingRebufferingGoal: Number

The minimum number of seconds of content that the player must buffer before it can begin playback or can continue playback after it has entered into a buffering state. Default: 2.

dashStreamingIgnoreTextStreamFailures: Boolean

If true, the player will ignore text stream failures and proceed to play other streams. Default: true.

dashStreamingUseRelativeCueTimestamps: Boolean

If true, WebVTT cue timestamps will be treated as relative to the start time of the VTT segment. Default: false.

dashRetryParameters: Object

This represents an Object to pass to the player to specific specific retry parameters when attempting to load DASH content. The same retry parameters will apply for fetching DRM, manifest or segment data. More information can be found here. The following example shows the default player parameter that should work for most case-scenario.

dashRetryParameters: {
  timeout: 0,       // timeout in ms, after which we abort a request; 0 means never
  maxAttempts: 2,   // the maximum number of requests before we fail
  baseDelay: 1000,  // the base delay in ms between retries
  backoffFactor: 2, // the multiplicative backoff factor between retries
  fuzzFactor: 0.5,  // the fuzz factor to apply to each retry delay
}
dashRestrictions: Object

An object describing application restrictions on what tracks can play. All restrictions must be fulfilled for a track to be playable. If a track does not meet the restrictions, it will not appear in the track list and it will not be played. More information can be found here. The setting is set as follows (replace number with the targeted value).

dashRetryParameters: {
  minWidth: number, // The minimum width of a video track, in pixels.
  maxWidth: number, // The maximum width of a video track, in pixels.
  minHeight: number, // The minimum height of a video track, in pixels.
  maxHeight: number, // The maximum height of a video track, in pixels.
  minPixels: number, // The minimum number of total pixels in a video track (i.e. width * height).
  maxPixels: number, // The maximum number of total pixels in a video track (i.e. width * height).
  minAudioBandwidth: number, // The minimum bandwidth of an audio track, in bit/sec.
  maxAudioBandwidth: number, // The maximum bandwidth of an audio track, in bit/sec.
  minVideoBandwidth: number, // The minimum bandwidth of a video track, in bit/sec.
  maxVideoBandwidth: number // The maximum bandwidth of a video track, in bit/sec.
}
dashRequestConfiguration: Object

This object allows the player to fine tune the way it request manifest, segment or DRM data. For manifest and segment this setting can be used to make requests with credentials. This will allow cookies in cross-site requests. See here for more information. Example:

dashRequestConfiguration: {
  manifest: {
    credentials: true
  },
  segment: {
    credentials: true
  }
}

This setting is often used in conjunction with DRM-encrypted content. See our DASH DRM documentation page for more advanced use-case.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 3.0 License.