I am trying to add controls to a video.js player to allow the user to change the playback speed. According to their documentation, I should be able to pass an array with the playback rates I want to offer to the user. For instance: playbackRates: [0.5, 1, 1.5, 2]
.
I have found this similar question who suggests doing exactly what the doc says. This answer links to a snippet which many have claimed that works. Unfortunately, this snippet does not show any controls to change playback speed. Here is what I see when running the snipped. I tried implementing a simple player with playback speeds on my own and it does not allow me to change playback speed:
<video class="video-js" autoplay controls data-setup='{ "playbackRates": [0.5, 1, 1.5, 2] }'>
<source src="http://techslides.com/demos/sample-videos/small.mp4" type="video/mp4">
</video>
What exactly am I doing wrong? Is video.js
not supporting this anymore?