Skip to main content

Forcing a Specific Speed in Your Video

You can force a specific speed on your video other than the normal one using our API. However, keep in mind that the text on the Playback Speed button (1X, 1.5X, 2X, etc.) in the Control Bar wouldn't be automatically changed, so it might be confusing for your viewers.

If you'd still like to proceed with this, here's the script you'd need to use:

<script>
// update this to match your Vidalytics Embed ID
const EMBED_ID = 'vidalytics_embed_[EMBED_ID]';

!function(v,a,p,i){
v.getVidalyticsPlayer=n=>{v[a]=v[a]||{},v[a][p]=v[a][p]||{};let d=v[a][p][n]=v[a][p][n]||{};
return new Promise((e=>{if(d[i])return void e(d[i]);let t;
Object.defineProperty(d,i,{get:()=>t,set(i){t=i,e(i)}})}))}
}(window,'_vidalytics','embeds','player');

getVidalyticsPlayer(EMBED_ID).then(player => {
// values can be 0.5, 0.75, 1, 1.25, 1.5, 2, etc.
player.playbackRate(5); // x5
});
</script>

As always, make sure to replace [EMBED_ID] with your actual embed code ID 😉