0
I tried to create a javascript function to allow you to skip a few seconds in a video, but when you click the video button it just starts again.
var video = document.getElementById("video1");
var segundos = 30;
function skip(segundos) {
video.currentTime += segundos;
}
the function is called in HTML
<button class="pular" onclick="skip(segundos)">Skip</button>
I followed the examples given on https://msdn.microsoft.com/pt-br/library/hh924823(v=vs.85). aspx but it didn’t work.
All that matters is the button?
– user60252
In case my problem is being only with the jump button, I need to make one to advance and one to return. The other button is the Paly/pause button, but this one is already working.
– Vitor Hugo
Consider using a jquery
– user60252
Leo and what Jquery function would do this?
– Vitor Hugo
only do what is in the answer do not forget the library <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
– user60252
Vitor Hugo, did it?
– user60252
I did. Thanks and sorry for the delay in responding
– Vitor Hugo
Vitor Hugo, if the answer was accepted read this post
– user60252
missing post Lin :) https://pt.meta.stackoverflow.com/questions/1078/como-e-por-que-aceitar-uma-resposta/1079#1079
– user60252