Forum Discussion
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 because playback time is not a guarantee of learning.
We all know the reality: as soon as a video starts, it becomes a coffee moment or an ALT+TAB moment for many learners. The video continues playing, but the learner’s attention is elsewhere. “When media completes” often just means that time has passed — not that the content has actually been absorbed.
This is something that comes up regularly in discussions with clients and accrediting bodies. Sometimes, despite your best efforts, it’s not possible to convince stakeholders otherwise. I’ve even encountered situations where accrediting organizations request a modified version of the same e-learning, allowing them to skip required elements during their own review process.
A key limitation in Storyline is that you cannot dynamically control the video player at runtime. While feature requests can be submitted, there is currently no built-in way to reliably prevent seeking or playback speed changes based on runtime logic.
That’s why I developed a JavaScript solution that prevents learners from seeking forward or changing playback speed. It avoids workarounds such as placing transparent overlays on top of the video or building a custom video player. Instead, a Storyline variable controls whether the video remains locked or whether full playback control is restored.
It’s the script you don’t want to use — but sometimes need to.
GitHub repository (documentation and source files):
https://github.com/ChrisDornaELearning/Articulate-Storyline-Locked-videoplayer
Articulate Review example:
https://360.articulate.com/review/content/b22d968d-65b0-4a0f-9bdb-90c6c8a0c9b5/review
1 Reply
- PhilMayorSuper Hero
I popped in here to say why would you do this, and then saw it was you ChrisDorna and thought he wouldn't post that.
Great solution for a problem we shouldn't have to find one for.