I'm trying to use a drop down window to be able to change the rate of which a video is playing at.
I've added the options on markup here:
<select id="playBackRateDrop">
<option>0.5</option>
<option selected= "selected">1</option>
<option>1.5</option>
<option>2</option>
</select>
Added a variable to getElementById here var playRate= document.getElementById("playBackRateDrop");
Added a actionListener to the dropdown window playRate.addEventListener("select", setPlaySpeed);
And created a function here
function setPlaySpeed() {
var rate= playRate.options[selectedIndex].value;
video.playbackRate= rate;
}
For some reason, the selecting an option from the dropdown doesn't change anything, the video plays as normal.