I'm trying to follow this tutorial on making controls for video buttons and everything was working so far as I'm on seeking buttons right now. The code below works fine on Safari and Opera, but Firefox and Chrome doesn't do anything.
function initVideoDirectionStepButtons() {
var _stepSize = 10.0;
/* Add Code For Stepping Backward */
$('.rewind_button a').each(function() {
/*This code finds the video element and binds it to a click event.*/
var $_video=findVideoForElement(this);
$(this).click(function(e) {
e.preventDefault();
$_video.each(function(index, _video) {
_video.currentTime=_video.currentTime-_stepSize;
});
});
});
That's just the beginning of the code. It just repeats the same for fast_forward before the function is closed. It's then called when the html is ready.
Firefox and chrome doesn't show any errors for me in the console, it just does nothing as opposed to safari it will jump back and forward. I've looked around and seen many other examples do the same and it works for them. Is setting the currentTime not valid in firefox and chrome or is it the webm format not supported with it?