Is Is there an event listener or some way to achieve this? I see here how to do it on demand:
In Safari for iPad, how can I get the current video position via Javascript?
However, I am looking for an automatic trigger function Method instead of requiring user interaction to trigger getting the location. Can this be done?
video.addEventListener('timeupdate', function() {
console.log('video time: '+ video.currentTime);
});
You can check the presenter of the event here:
http://www. w3.org/2010/05/video/mediaevents.html
I want to execute the JavaScript function once per second, or whenever the When the time position changes.
Is there an event listener or some way to achieve this? I see here how to do it on demand:
In Safari for iPad, how can I get the current video position via Javascript?
However, I am looking for an automatic trigger function Method instead of requiring user interaction to trigger getting the location. Can this be done?
You can attract a lot of activities through HTML5 video. Not all browsers support all browsers, but Mobile Safari should meet your needs well, This is the “timeupdate” event.
video.addEventListener('timeupdate', function() {
console.log('video time: '+ video .currentTime);
});
You can view the presenter of the event here:
http://www.w3.org/2010/05/video/mediaevents. html