Forum Discussion
Video timestamp
Hi Phil,
I've been working on a similar concept for a while now. I've successfully manipulated the video independently from the timeline. This is the basic set up to integrate with Storyline:
let video = document.getElementsByTagName('video')[0];
video.duration;
video.currentTime;
video.ontimeupdate = function() { getVideoTimes() };
function getVideoTimes() {
let player = GetPlayer();
player.SetVar('currentTime', video.currentTime);
player.SetVar('duration', video.duration);
console.log(video.currentTime);
console.log(video.duration);
}
- PhilMayor8 months agoSuper Hero
Hi Nedim
Thanks for posting. That was almost the same as I have. I used the help you gave me on a previous post on videos and used that to get the duration.
Thanks again.
Phil
Sent from my iPhone