Welcome to the LimeSurvey Community Forum

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

limit URL access

  • skade0
  • skade0's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 8 months ago #216130 by skade0
limit URL access was created by skade0
Hello, I would like to know if it is possible to limit to one (1) click on a URL by a participant in a question. For example, I want participants to watch a youtube video (provided through the URL) and then answer a set of questions about it. Is there a way to create a unique link that will work once and prevent them from watching it many times ? 
Thank you
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 8 months ago #216133 by Joffm
Replied by Joffm on topic limit URL access
You can show the video without controls.
WIth "next" button hidden.
At the  end of the video you automatically proceed to the next question.
Some examples here in the forum.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • skade0
  • skade0's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 8 months ago #216146 by skade0
Replied by skade0 on topic limit URL access
Thank you for your reply.
I will separate the video presentation and the answer page for that purpose.
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 8 months ago #216166 by Joffm
Replied by Joffm on topic limit URL access
Hi,
it is always better to have the video on a separate page.

But you have the option to show the video, and hide it after it was played

Here a small script
Code:
<div class="embed-responsive embed-responsive-16by9" id="divVideo">
<video autoplay="autoplay" id="myvideo"><source src="https://myServer/img/happypeanuts.mp4" type="video/mp4" /> browser unterstützt dieses Format nicht.</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');
        }
    });
</script>
 

Comment or remove the options you do not want.

​​​​​​​Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose