Forum Discussion
ChrisDorna
29 days agoCommunity Member
JavaScript to prevent user to force learners to watch entire video
The script you don’t want to use
As an e-learning developer, I don’t want to force learners to watch a video all the way through. Not because it’s technically difficult — quite the opposite — but b...
RitaBras
9 hours agoCommunity Member
Good afternoon Chris,
I have a course with several videos and I would like to use your solution. Is this solution designed only for a course with a single video, or can I use the code for multiple videos within the same course?
Thank you.
- ChrisDorna7 hours agoCommunity Member
Hi Rita,
You can use this script on a regular slide (if your project contains only one video) or on the master slide. In the latter case, you need an additional variable called startJavaScript.
On the slide where a video needs to be (un)locked, set the variables videoObjectId and videoLocked, and then toggle the startJavaScript variable.
On the master slide, add a trigger with the JavaScript that fires when the startJavaScript variable changes.
I made also a small change in the script. You can download it here: