Forum Discussion
JavaScript to prevent user to force learners to watch entire video
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.
- ChrisDorna22 days 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:
- RitaBras21 days agoCommunity Member
Hi Chris,
Thanks for sharing the information and for the detailed explanation.
I’ll run a few tests to see how it turns out.
Best regards