Playing HTML5 Video Backwards
Sometimes we are asked to do strange things like play video backwards.
HTMLVideoElement.prototype.playBackwards = function() {
this.pause();
var video = this;
var fps = 25;
var intervalRewind = setInterval(function() {
if(video.currentTime == 0){
clearInterval(intervalRewind);
video.pause();
}
else {
video.currentTime += -(1/fps);
}
}, 1000 / fps);
};