Radiant Media Player supports MPEG-DASH streaming with Shaka Player to HTML5 video & audio. Our implementation relies on media source extensions (MSE). Where media source extensions support is not available (e.g. iOS, older Android) we fallback to native HLS to HTML5 video, provided the player has a valid HLS stream as an input setting.
See our compatibility table for a list of environments where MPEG-DASH streaming is supported with Radiant Media Player.
You must set up your streaming server to return proper CORS settings permitting GET requests for MPEG-DASH streaming to Radiant Media Player to work as expected.
MPEG-DASH stream with HLS fallback:
<!-- Include Radiant Media Player - here we use the optimised build for Shaka player --> <script src="https://cdn.radiantmediatechs.com/rmp/9.10.0/js/rmp-shaka.min.js"></script> <!-- Player container element --> <div id="rmp"></div> <!-- Set up player configuration options --> <script> // Here we pass our MPEG-DASH streaming source const src = { dash: 'https://your-dash-url.mpd', // For older devices and iOS where MPEG-DASH is not supported, we provide a HLS (or MP4) fallback hls: 'https://your-hls-url.m3u8' }; const settings = { licenseKey: 'your-license-key', src: src, width: 640, height: 360, // Here we need to state that MPEG-DASH is preferred over HLS, when both are available on the device dashFirst: true, contentMetadata: { poster: [ 'https://your-poster-url.jpg' ] } }; const rmp = new RadiantMP('rmp'); rmp.init(settings); </script>
dashFirst: Boolean
When used in conjonction with HLS this setting will tell the player to pick MPEG-DASH (where supported) as a first choice over HLS (picking HLS as a first choice is the player default). MPEG-DASH (where supported) is always picked first over MP4/WebM
progressive download. Default: false
.
capLevelToPlayerSize: Boolean
This setting limits bitrates usable in auto-quality depending on player size (width). Default: true
. If set to true, potential rendition width will be compared with the actual player width and only the best match will be used as the
maximum available bitrate, hence helping to preserve bandwidth usage while maintaining streaming quality. This setting is ignored in manual mode so all levels can be selected manually. For 360° video this setting is always set to false.
Why is that setting on by default in Radiant Media Player?
Bandwidth can be expensive. Not only for you as a streaming service (cost of CDN and/or origin streaming servers) but also for your viewers. There is very little point to throw a 1080p rendition in a player that is 640x360 sized. This can actually
result in a poor viewing experience as more resources will be used by the client device (CPU, memory, network). Therefore we have decided to set capLevelToPlayerSize
default to true. This can still be turn off for specific needs.
ignoreDevicePixelRatio: Boolean
When set to true this setting will not take into account devicePixelRatio for ABR logic. Default: true.
shakaPreferredAudioLanguage: 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') and must match a MPEG-DASH manifest value. See
https://tools.ietf.org/html/rfc5646 and
http://www.iso.org/iso/home/standards/language_codes.htm for more information. Default:
''
.
shakaRestrictions: 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).
shakaRestrictions: { 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. }
shakaRequestConfiguration: 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:
shakaRequestConfiguration: { manifest: { credentials: true }, segment: { credentials: true } }
This setting is often used in conjunction with DRM-encrypted content. See our MPEG-DASH DRM documentation page for more advanced use-case.
manualSwitchingMode: String
Select what mode for manual bitrate switching should be used by the player. Available values are 'instant'
, 'smooth'
,
'conservative'
. Default: 'smooth'
which provides an intermediary setting between 'instant'
(immediate) and
'conservative'
(slow) bitrate switching.
shakaIgnoreMinBufferTime: Boolean
In Media Presentation Description (MPD), minBufferTime specifies a common duration used in the definition of the Representation data rate. This setting allows for ignoring the minBufferTime value in the manifest therefore letting the player set
the minBufferTime value. Default:
false
.
shakaStartAtSegmentBoundary: Boolean
If true
, adjust the start time backwards so it is at the start of a segment. This affects both explicit start times and calculated start time for live streams. This can put us further from the live edge but may resolve some live start-up
issues. Default:
false
.
shakaInaccurateManifestTolerance: Boolean
The maximum difference, in seconds, between the times in the manifest and the times in the segments. Larger values allow us to compensate for more drift in live streams (up to one segment duration). Smaller values reduce the incidence of extra
segment requests necessary to compensate for drift. Default:
2
.
autoLowLatencyMode: Boolean
By default player auto-detect LL-DASH streams and configure itself for LL-DASH support when a LL-DASH stream is detected. If you want to disable LL-DASH detection/configuration set this setting to false. Default:
true
.
For information on closed captions styling (FCC compliant) see this article.
shakaStreamingIgnoreTextStreamFailures : Boolean
If true, the player will ignore text stream failures and proceed to play other streams. Default: true
.
shakaPreferredTextLanguage: String
The preferred language to use for text tracks. If a matching text track is found, and the selected audio and text tracks have different languages, the text track will be shown. Changing this during playback will not affect the current playback.
Default: ''
.
enableCMCD: Boolean
Enables CMCD data to be passed with manifest/chunks/license requests. Default behaviour is to pass those data through URI query string. Default:
false
.
useHeadersForCMCD: Boolean
Pass CMCD data through HTTP request headers instead of URI query string. Default:
false
.
cmcdContentId: string
If not specificed the player will try to use contentMetadata.id
for cmcdContentId. With this setting you can specify a custom cmcdContentId. Default:
''
.
cmcdSessionId: string
If not specificed the player will automatically create a cmcdSessionId (UUID). With this setting you can specify a custom cmcdSessionId. Default:
''
.
retryParameters: Object
This represents an Object to pass to the player to specify specific retry parameters when attempting to load MPEG-DASH content with Shaka player. The following example shows the default player parameters:
retryParameters: { manifest: { timeout: 20000, // timeout in ms, after which we abort a request maxAttempts: 3, // the maximum number of requests before we fail delay: 1000 // the base delay in ms between retries }, levels: { // levels property only applies to HLS (when using hlsEngine: "shakaplayer") timeout: 20000, maxAttempts: 3, delay: 1000 }, segment: { timeout: 12000, maxAttempts: 5, delay: 1000 }, drm: { timeout: 12000, maxAttempts: 3, delay: 1000 } }
You may pass to the player any
parameter available with Shaka player using the
shakaCustomConfig
setting:
shakaCustomConfig: Object
Allow passing a custom config object to Shaka Player. As such any Shaka Player internal setting can be tuned. Note that settings in shakaCustomConfig
will complement (complement and override if applicable) any other Shaka player settings
set with other player settings. Default: {}
. Example:
shakaCustomConfig: { abr: { bandwidthDowngradeTarget: 0.95, bandwidthUpgradeTarget: 0.85, enabled: true, switchInterval: 8 } }
shakaFullCustomConfig: Object
Allow passing a full custom config object to Shaka player. All player settings related to Shaka player will be overridden with those found in shakaFullCustomConfig or otherwise reset to Shaka player default if not specified. Default: {}
.
Example:
shakaMaxBufferAhead: Number
Maximum front buffer size in seconds that the player can reach. When this value is reached the player will stop downloading chunks until further content has been consumed. Default:
20
. It generally is best to use the default value.
shakaMaxBufferBehind: Number
Maximum back buffer size in seconds that the player can reach. The player will progressively remove already consumed content from the buffer passed that mark. Default:
30
. It generally is best to use the default value.
If you are having a start-up issue (delayed playback or video/audio artifacts) with a live MPEG-DASH stream you can try the following settings:
shakaIgnoreMinBufferTime: true,
shakaStartAtSegmentBoundary: true,
shakaInaccurateManifestTolerance: 0,
autoLowLatencyMode: false // if your stream is not a low-latency stream - otherwise leave to true
Enabling Radiant Media Player debug mode can also help identify issues though your browser developer tools.
If you have taken reasonable troubleshooting steps and are still experiencing an issue while trying to play a MPEG-DASH stream with our player, please open a technical support ticket - we will do our best to help.
©2015-2023 Radiant Media Player. All Rights Reserved.