Solved
Allow user to start video but not pause it
I want to embed a video into a survey. Is there code I can write that allows the user to start the video, but doesn't allow the user to pause the video after it starts?
Best answer by npetrov937
Hi @azhang21 ,
There were some typos in the code.
HTML:
``<div id="question1" style="height=480px;width=640px;"><video class="qmedia" controls="true" height="640" preload="auto" width="360"><source src="YOURSOURCE" type="video/mp4" /><embed align="middle" autoplay="false" bgcolor="white" class="qmedia" controller="true" height="640" pluginspage="http://www.apple.com/quicktime/download/" src="YOURSOURCE" type="video/quicktime" width="360" /></video></div>``
Javascript:
Qualtrics.SurveyEngine.addOnload(function()
{
jQuery("video").on('play', function() {
jQuery("#question1")[0].style.pointerEvents = "none"
});
});
Working .qsf attached.
Good luck.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
