Playback Speed

About

The Kaltura Player exposes the configuration and APIs that are used for controlling the playback speed.

  • The default playback speed is 1.
  • Values less than 1 will result in reducing playback speed relative to the normal speed.
  • Values greater 1 will result in increasing playback speed relative to the normal speed.

Playback Speed UI control

The playback speed can be changed using the UI setting => speed controller icon.

PlaybackRates

PlaybackRates sets the available rates at which the media can be played.

The player default playbackRates :

[
    0.5,
    1,
    1.5,
    2
]

Application may change the default config by providing new values in the playback config object

"playback": { 
...
       "playbackRates": [
          0.25,
          0.5,
          0.75,      
          1,
          1.25,
          1.5,
          1.75,
          2,
          4
      ],
....	  
	  

Note:

  • Player may have issues to serve playack in high playback speed, especially on TV's
  • Negative values are not valid
  • Playback speed 0 will stop the playback

Playback Speed API

Application may use the player API to get or set the player speed programatically. make sure you set values which match the playbackRates Array values, as values which are out of that range will not impact the playback speed.

  • Get API
kalturaPlayer.playbackRate = 1 
1 
  • Set API
kalturaPlayer.playbackRate = 0.5 
0.5 

Event: RATE_CHANGE

The application can listen to the RATE_CHANGE event and be informed that such action was triggered by the user

const events = [   kalturaPlayer.Event.Core.RATE_CHANGE ]; 
events.forEach(eventName => {  kalturaPlayer.addEventListener(eventName, event => console.info('Event:',  event.type, " ", event.payload)); });

Example:

Playback Speed Example

See the Pen  Playback Speed by Kaltura (@Knowledge-Center) on CodePen.

Was this article helpful?
Thank you for your feedback!
In This Article
Related Articles
Back to top

Never miss a thing!

Subscribe to our customer newsletter and our release notes updates, so you always get the best out of Kaltura.
Newsletter