3

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?

Mikko Ohtamaa
  • 69,174
  • 40
  • 208
  • 346
Tyrice Clark
  • 83
  • 1
  • 6
  • Most likely you are dealing with this: http://stackoverflow.com/a/10619435/315168 – Mikko Ohtamaa Mar 29 '13 at 02:49
  • Put some console.log and test how thing goes under the hood. It should works –  Mar 29 '13 at 02:56
  • I've also should of noted I was testing it with app engine. Running on the app engine local server doesn't work, but when it is deployed it is able to get the information fine. This should be closed now. – Tyrice Clark Mar 29 '13 at 19:47

0 Answers0