Skip to main content

Custom playback rates

It is possible to modify the playback rates available on the player. Sample code below.

<script src="https://player.vdocipher.com/playerAssets/1.6.10/vdo.js"></script>
<div id="embedBox" style="width:1280px;max-width:100%;height:auto;"></div>
<script>
const video_ = new VdoPlayer({
otp: 'REPLACE WITH OTP',
playbackInfo: 'REPLACE WITH PLAYBACKINFO',
theme: '9ae8bbe8dd964ddc9bdb932cca1cb59a',
container: document.querySelector('#embedBox'),
});

video_.addEventListener('load', () => {
video_.availablePlaybackRates = [0.75, 1.0, 1.25, 1.5, 1.75, 2.0];
});
</script>

After creating the player object, it is waiting for the load event. At load event, the default rates have been read by player. Now, any overrides can work. Here, it is modifying the availablePlaybackRates property of the video object.