Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Hide the continue Button until video has been fully viewed

  • stevie2022
  • stevie2022's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 years 1 month ago #239057 by stevie2022
Please help us help you and fill where relevant:
Your LimeSurvey version: Version 5.4.15+221212
Own server or LimeSurvey hosting: Self-Hosted
Survey theme/template: Fruity
==================
Hi!
In one of my questions, I have embedded a video.
I would like to hide the "continue" Button until the video has been played.
Please advise me how to do this!
Thanks!

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 1 month ago - 2 years 1 month ago #239060 by Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 2 years 1 month ago by Joffm.

Please Log in to join the conversation.

  • stevie2022
  • stevie2022's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 years 1 month ago #239061 by stevie2022
Hi!
Thanks for the fast answer!
This helped me to fix my problem and hide the continue button until the video has finished playing.
But still, I need to disable all controls on the video! How can I further customize the javascript code to achieve this?
Thanks!

Please Log in to join the conversation.

  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 1 month ago #239062 by holch

But still, I need to disable all controls on the video! How can I further customize the javascript code to achieve this?


That was not part of the initial question... ;-)

Help us to help you!
  • Provide your LS version and where it is installed (own server, uni/employer, SaaS hosting, etc.).
  • Always provide a LSS file (not LSQ or LSG).
Note: I answer at this forum in my spare time, I'm not a LimeSurvey GmbH employee.

Please Log in to join the conversation.

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 1 month ago #239074 by tpartner
...and, not a topic for a LimeSurvey forum.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

  • stevie2022
  • stevie2022's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 years 1 month ago #239090 by stevie2022
Thanks for the help! here is the (redacted) code I use now:
<video autoplay="" height="960" id="myvideo" src="/upload/surveys/675229/files/videos/video.mp4" style="pointer-events: none;" width="1200"> </video>
</div>
<script type="text/javascript" charset="utf-8">
$(document).ready(function() {
// Hide the "Next" button
$('#ls-button-submit').hide();
 
var vid = document.getElementById("myvideo");
//vid.volume = 0.3;
vid.onended = function() {
// Hide the video
$('#divVideo').hide();
 
// Show the "Next" button
$('#ls-button-submit').show();
 
// Proceed to next page
//$('#ls-button-submit').show().trigger('click');
}
});

Please Log in to join the conversation.

Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose