Copy link to clipboard
Copied
I notice with Slide Videos you can control the start and stop point of the video, however I cannot find a feature that allows this with Event Videos. Also, you can only have one Slide Video per slide and I need a second video to play on the same slide. All of our video source files have a required leader and trailer that I need to skip over in Captivate. I'm guessing the solution lies within Javascript. Is there any way that you can control the start and end points within an Event Video?
Copy link to clipboard
Copied
Do you embed the videos? If you stream them from YouTube or Video, you can use the functionality of those platforms to reach your goal: control the start point and the duration which is defined by the end point.
Copy link to clipboard
Copied
They will not be streamed.
Copy link to clipboard
Copied
Sorry, I hope that the JS experts will pop in. Event video plays independently from Captivate's timeline.
Copy link to clipboard
Copied
This script will get the videos and set the start time to 10 seconds for each video and pause it at 15 seconds. Change the 10 and 15 to the start and end times of your videos:
var vids
const myTimeout = setTimeout(getVideo, 1000);
function getVideo() {
vids = document.getElementsByTagName("video");
vids[0].currentTime = 10;
vids[0].addEventListener("timeupdate", endVideo1)
vids[1].currentTime = 10;
}
function endVideo1()
{
if ( vids[0].currentTime > 15 )
{
vids[0].pause();
}
}
function endVideo2()
{
f ( vids[1].currentTime > 15 )
{
vids[1].pause();
}
Copy link to clipboard
Copied
Thank you, I will test this when I get a chance. Do you replace "video" with its Captivate component name or file name? Also, is there a way to set the variables in this up like Shared Actions or will each slide require its own unique script?
Copy link to clipboard
Copied
No, you leave it as video"