- Posts: 7
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Triggering launch of questions when video is paused
- JenniWatson
-
Topic Author
- Offline
- New Member
-
Less
More
4 months 2 weeks ago #239660
by JenniWatson
Triggering launch of questions when video is paused was created by JenniWatson
Please help us help you and fill where relevant:
Your LimeSurvey version: [see right hand bottom of your LimeSurvey admin screen]
Own server or LimeSurvey hosting:
Survey theme/template:
==================
Hi, I am trying to create a survey where participants view a video and make comments as they go along, ideally they would watch the video and then at relevant points to them they can stop the video and this will trigger a set series of questions. Is this possible?
Your LimeSurvey version: [see right hand bottom of your LimeSurvey admin screen]
Own server or LimeSurvey hosting:
Survey theme/template:
==================
Hi, I am trying to create a survey where participants view a video and make comments as they go along, ideally they would watch the video and then at relevant points to them they can stop the video and this will trigger a set series of questions. Is this possible?
Please Log in to join the conversation.
4 months 2 weeks ago #239661
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Triggering launch of questions when video is paused
Use JavaScript pause event for an HTML video element to trigger showing question(s)
- www.w3schools.com/tags/av_event_pause.asp
So, for example, some HTML like this in the source of a text-display question:
And, this script (using jQuery) also in that question source:
Sample survey for LS 5.x attached:
- www.w3schools.com/tags/av_event_pause.asp
So, for example, some HTML like this in the source of a text-display question:
Code:
<div class="video-wrapper"> <video id="myVideo" width="320" height="240" controls> <source src="path/to/your/video.mp4" type="video/mp4"> Your browser does not support the video tag. </video> </div>
And, this script (using jQuery) also in that question source:
Code:
<script type="text/javascript" data-author="Tony Partner"> $(document).on('ready pjax:scriptcomplete',function(){ // Identify this question var thisQuestion = $('#question{QID}'); // Hide all other questions $('.question-container').not(thisQuestion).hide(); // Listener on the video $('#myVideo').on('pause', function(e) { $('.question-container').not(thisQuestion).fadeIn(500); }); }); </script>
Sample survey for LS 5.x attached:
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.
- JenniWatson
-
Topic Author
- Offline
- New Member
-
Less
More
- Posts: 7
- Thank you received: 0
4 months 1 week ago #239737
by JenniWatson
Replied by JenniWatson on topic Triggering launch of questions when video is paused
Many thanks, I think that’s a bit beyond my level of skill but I appreciate your advice!
Please Log in to join the conversation.
4 months 1 week ago #239740
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic Triggering launch of questions when video is paused
It is all provided by Tpartner, he even attached an example survey (LSS) that you can import and see for your self.
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Please Log in to join the conversation.
- JenniWatson
-
Topic Author
- Offline
- New Member
-
Less
More
- Posts: 7
- Thank you received: 0
4 months 1 week ago #239741
by JenniWatson
Replied by JenniWatson on topic Triggering launch of questions when video is paused
I think my total beginner status is tripping me up - when I tried to use the example survey nothing played at all.
I have spent hours on the forum etc but can’t get it to work, I have tried to work around with if statement etc but still stuck.
I have spent hours on the forum etc but can’t get it to work, I have tried to work around with if statement etc but still stuck.
Please Log in to join the conversation.
4 months 1 week ago #239743
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic Triggering launch of questions when video is paused
Where is your LS hosted? If it is a university or big organisation, there is a good chance that the XSS filter is on and the Javascript required for Tpartner's solution is most probably filtered out.
Therefore, it is very important to that when you ask about things like that, to mention the LS Version you are using, the Theme/Template as well as where it is hosted.
Therefore, it is very important to that when you ask about things like that, to mention the LS Version you are using, the Theme/Template as well as where it is hosted.
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Please Log in to join the conversation.
2 months 3 weeks ago #241373
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Triggering launch of questions when video is paused
Brilliant! Suggest using Google Forms, SurveyMonkey, or Typeform in 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.
2 months 3 weeks ago #241374
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic Triggering launch of questions when video is paused
@Tpartner: I thought the same. 
But to be honest, I think this is just the start of a spam attack.

But to be honest, I think this is just the start of a spam attack.
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
The following user(s) said Thank You: DenisChenu
Please Log in to join the conversation.
- DenisChenu
-
- Offline
- LimeSurvey Community Team
-
Less
More
- Posts: 13144
- Thank you received: 2422
2 months 2 weeks ago #241417
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic Triggering launch of questions when video is paused
No interest, didn't answer to question : deleted (then we don't have to track if there are hidden link …)
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Please Log in to join the conversation.
- JenniWatson
-
Topic Author
- Offline
- New Member
-
Less
More
- Posts: 7
- Thank you received: 0
2 months 2 weeks ago #241422
by JenniWatson
Replied by JenniWatson on topic Triggering launch of questions when video is paused
Apologies, I have been unwell so haven’t been following the thread. If the suggestion is that I am a spam attack then that’s a bit sad. I’m not, I’m just a confused newbie trying to work out LS.
Thanks for all of the suggestions, the LS is hosted by a university so maybe that is why the initial suggestion didn’t work (although I suspect it’s a me thing really).
My solution had actually been to use two surveys - one with the video and be with the questionnaire. That’s the closest I think I can get whilst staying within my study ethics and copyright rules.
Thanks for all of the suggestions, the LS is hosted by a university so maybe that is why the initial suggestion didn’t work (although I suspect it’s a me thing really).
My solution had actually been to use two surveys - one with the video and be with the questionnaire. That’s the closest I think I can get whilst staying within my study ethics and copyright rules.
Please Log in to join the conversation.
2 months 2 weeks ago #241425
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic Triggering launch of questions when video is paused
Hi,
as @Denis wrote, the probable spam attack was deleted.
So you obviously didn't see it.
It's not related to you.
Joffm
as @Denis wrote, the probable spam attack was deleted.
So you obviously didn't see it.
It's not related to you.
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Please Log in to join the conversation.
- DenisChenu
-
- Offline
- LimeSurvey Community Team
-
Less
More
- Posts: 13144
- Thank you received: 2422
2 months 2 weeks ago - 2 months 2 weeks ago #241426
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic Triggering launch of questions when video is paused
Sorry @JenniWatson : not you another user.
I delete the post.
Your question and your answers are cool
I delete the post.
Your question and your answers are cool
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Last edit: 2 months 2 weeks ago by DenisChenu.
Please Log in to join the conversation.