Radiant Media Player

Working with Streamroot


At Radiant Media Player we are committed to providing support for the best and latest technologies from the online video world. Peer-to-peer assisted streaming offers a great way to improve your viewer streaming experience and to reduce media content delivery cost. As such we have partnered with Streamroot in order to make the Streamroot technology available with Radiant Media Player.

To overcome the limitations of traditional unicast delivery, Streamroot has developed a hybrid video streaming solution based on peer-to-peer protocols. Working in tandem with a server or CDN architecture, Streamroot creates a mesh network of viewers watching the same content at the same time. Viewers can obtain video segments from the source that provides them most quickly - either the server or another viewer - optimizing data exchanges and freeing up congested servers.

In this article we will review how to use Streamroot peer-to-peer accelerated streaming with Radiant Media Player.

Scope of support

Streamroot support in Radiant Media Player is currently available for HLS in the following environments:

  • Chrome for Desktop
  • Firefox for Desktop
  • Opera for Desktop

Streamroot technology can be used for on-demand, live or DVR media content with Radiant Media Player. All Radiant Media Player features can be used in conjunction with Streamroot technology. Where Streamroot support is not available (MS Edge, Safari) the player will gracefully fallback to "classic" media content delivery (e.g. not peer-accelerated). You can obtain further technical information about Streamroot inner workings here.


First you will need an account with Streamroot to obtain a StreamrootKey. More information about Streamroot offer can be found here.

Then we will set up our player code. In order to make your life easier we have built Streamroot support in Radiant Media Player - you just need to pass a streamrootP2pConfig object to the player. This object references your StreamrootKey and other Streamroot related options.

<!DOCTYPE html>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
  <title>TODO supply a title</title>
  <!-- Include Radiant Media Player JavaScript file in your <body> or <head> -->
  <script src="https://cdn.radiantmediatechs.com/rmp/4.6.22/js/rmp.min.js" 
  <!-- Set up your wrapper div with its unique id -->
  <div id="rmpPlayer"></div>
  <!-- Set up player configuration options -->
  // First we specify bitrates to feed to the player
  var bitrates = {
    hls: 'https://dqwp3xzzbfhtw.cloudfront.net/vod/smil:bbb.smil/playlist.m3u8'
  // Then we specify our Streamroot p2p config object
  var streamrootP2pConfig = {
    streamrootKey: 'your-streamrootKey-license-key',
    cacheSize: 130,
    mobileBrowserEnabled: false
  // Then we set our player settings
  var settings = {
    licenseKey: 'your-radiant-license-key',
    streamrootP2pConfig: streamrootP2pConfig,
    bitrates: bitrates,
    width: 640,
    height: 360, 
    poster: 'https://www.radiantmediaplayer.com/images/poster-rmp-showcase.jpg'
  // 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!

That is it! You are all set to enjoy the best of Radiant Media Player and Streamroot.

Note that when Streamroot technology is used with Radiant Media Player the player internally set hlsJSMaxBufferLength to 30 and hlsJSLiveSyncDuration to 30 in order to fit Streamroot recommendations as described here.

To complement Streamroot support in Radiant Media Player we also provide a player API method to access the Streamroot peerAgent public API. List of peerAgent public API getters/setters is documented here.


This method returns the Streamroot peerAgent. This is available when hlsinstancecreated player event fires.

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