My javascript is not seeking the right amount of time on my audio files

I am able to play pause and stop audio files through the keyboard, but when I am seeking back and forth, I am using left and right arrow keys, and it is being seeking 15 sec. I need to do it for 5 or 10 seconds, instead. Below is the java script that i used

// Keyboard shortcuts
                $(document).keydown(function (e) {
                    var unicode = e.charCode ? e.charCode : e.keyCode;
                    // right arrow
                    if (unicode == 39) {
                        var next = $('li.playing').next();
                        if (!next.length) next = $('ol li').first();
                        next.click();
                        // back arrow
                    } else if (unicode == 37) {
                        var prev = $('li.playing').prev();
                        if (!prev.length) prev = $('ol li').last();
                        prev.click();
                        // spacebar
                    }
                    else if (unicode == 32) {
                        audio.playPause();
                    }
                })
            });
        </script>
         <script>
             $(function () {
                 $('ol li').click(function (e) {
                     e.preventDefault();
                     $(this).addClass('playing').siblings().removeClass('playing');
                     audio.load($('a', this).attr('Pause'));
                     audio.playPause();
                 });
             });
                </script>

Hi there,

You haven’t shared the piece of the code that is responsible for seeking when next.click() fires.
What are those click events doing at the moment?

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.