Documentation

Playback Rate

Playback rate tuning

You can easily provide your audience with playback rate change options, thanks to our intuitive playback rate player module. For more advanced use-cases our player API will let you build a custom user experience. The playback rate module is only available for video content (e.g. not for audio-only player) but the playback rate API can be used with the audio-only player as well.

Player settings

speed: Boolean

Activate or not the playback rate module. Default: false.

speedRates: Array

Set the playback rate available values to be used by the playback rate module. Must be submitted as an array of numbers. Default: [0.25, 0.5, 1, 1.5, 2, 4].

Player code example - see this example here

<script src="https://cdn.radiantmediatechs.com/rmp/9.15.3/js/rmp.min.js"></script>
<div id="rmp"></div>
<script>
// Streaming source - HLS in this example
const src = {
  hls: 'https://your-hls-url.m3u8' 
};
const settings = {
  licenseKey: 'your-license-key',
  width: 640,
  height: 360,
  src: src,
  // Playback rate settings
  speed: true,
  speedRates: [0.25, 0.5, 1, 1.5, 2, 4],
  contentMetadata: {
    poster: [
      'https://your-poster-url.jpg'
    ]
  }
};
const rmp = new RadiantMP('rmp');
rmp.init(settings);
</script>

Playback rate API

Playback rate API events

ratechange

Fires when the playing speed of the video is changed.

Playback rate API methods

getPlaybackRate()

rmp.getPlaybackRate();

This method returns a Number representing the current playback rate. -1 is returned if this value is not available.

setPlaybackRate(rate)

rmp.setPlaybackRate(2);

This method will change the player playback rate to the Number set as input parameter. Decent values for playback rate ranges from 0.25 to 4 and can be increment by 0.1. Values outside this range may cause playback issues in some browsers.

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

©2015-2024 Radiant Media Player. All Rights Reserved.