- Posts: 3
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Automatic proceeding when working locally fails
- selinaemhardt
- Topic Author
- Offline
- New Member
Less
More
4 years 8 months ago #187094
by selinaemhardt
Automatic proceeding when working locally fails was created by selinaemhardt
For my current study, I needed a timer with a subsequent auditory signal to indicate that the participants had to stop on working locally on their computer. So I came up with the following idea:
Participants could work on their desktop while a timer from a short, open question was counting down (10 minutes). After 10 minutes, the survey automatically proceeded to the next page where a youtube video with an alarm sound was set on autoplay. Like that, the participants heard when they had to stop with their local task on their computer and return to the online survey.
This worked fine at the beginning of the data collection phase for various browsers (chrome, firefox, safari).
I am not sure what changed, but for safari and chrome, the survey does not proceed to the next page and load the alarm video automatically anymore, if the participants are not looking at the survey in the browser at that moment. Since participants are instructed to work on their computer during the countdown (in a program on their personal desktop), they never hear the sound and the timer-alarm combination doesn't work anymore.
The study is currently activated, so I would really appreciate any help. It is a browser problem, so I don't know if there is an easy fix for this.
If not: Is there another (auditory) countdown possibility that might work?
I would be happy about any help because it is difficult for us to control what browser people use when participating in the study at home.
Thank you for your help and best wishes,
Selina
I attached a .lss file that demonstrated the idea and the problem. As you can see, the alarm video plays for Firefox after 10 seconds even when one is not looking at the survey in the browser. For chrome (and maybe safari and other browsers), the experiment does not continue.
Participants could work on their desktop while a timer from a short, open question was counting down (10 minutes). After 10 minutes, the survey automatically proceeded to the next page where a youtube video with an alarm sound was set on autoplay. Like that, the participants heard when they had to stop with their local task on their computer and return to the online survey.
This worked fine at the beginning of the data collection phase for various browsers (chrome, firefox, safari).
I am not sure what changed, but for safari and chrome, the survey does not proceed to the next page and load the alarm video automatically anymore, if the participants are not looking at the survey in the browser at that moment. Since participants are instructed to work on their computer during the countdown (in a program on their personal desktop), they never hear the sound and the timer-alarm combination doesn't work anymore.
The study is currently activated, so I would really appreciate any help. It is a browser problem, so I don't know if there is an easy fix for this.
If not: Is there another (auditory) countdown possibility that might work?
I would be happy about any help because it is difficult for us to control what browser people use when participating in the study at home.
Thank you for your help and best wishes,
Selina
I attached a .lss file that demonstrated the idea and the problem. As you can see, the alarm video plays for Firefox after 10 seconds even when one is not looking at the survey in the browser. For chrome (and maybe safari and other browsers), the experiment does not continue.
The topic has been locked.
- jelo
- Offline
- Platinum Member
Less
More
- Posts: 5033
- Thank you received: 1257
4 years 8 months ago #187109
by jelo
I see no easy fix, but I would use a mediafile, which is not embedded from a thirdparty site like Youtube. Use a audio file, which is part of your survey files.
To get a feeling for the amount of restrictions here an example from Chrome:
developers.google.com/web/updates/2017/0...oplay-policy-changes
sites.google.com/a/chromium.org/dev/audio-video/autoplay
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
Replied by jelo on topic Automatic proceeding when working locally fails
What time-frame are we talking about? When was the start of the data collection phase. The browsers are constantly changing in terms of protections from unwanted behavior of websites. In combination with a youtube video you will have a hard time to let automatic start of anything happen.selinaemhardt wrote: This worked fine at the beginning of the data collection phase for various browsers (chrome, firefox, safari).
I see no easy fix, but I would use a mediafile, which is not embedded from a thirdparty site like Youtube. Use a audio file, which is part of your survey files.
To get a feeling for the amount of restrictions here an example from Chrome:
developers.google.com/web/updates/2017/0...oplay-policy-changes
sites.google.com/a/chromium.org/dev/audio-video/autoplay
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
- selinaemhardt
- Topic Author
- Offline
- New Member
Less
More
- Posts: 3
- Thank you received: 0
4 years 8 months ago - 4 years 8 months ago #187134
by selinaemhardt
Replied by selinaemhardt on topic Automatic proceeding when working locally fails
Hello jelo,
thank you for the response. It worked fine in May and I just noticed coincidentally that it is now not working anymore. For now, I stopped the study and hope that I can activate it, after some small changes, again.
I tried to add a mp4 or mp3 file with the alarm sound.
However (at least for chrome), the problem remains that the sound (of mp4 and mp3) only starts auto-playing when I am actually looking at the online survey (which the participants won't do, because they are instructed to work locally on their computers until they hear the sound).
Is there anything I have to add to the iframe?
I tried:
<div class="ckeditor-html5-video" style="text-align: center;">
<video allow="autoplay" autoplay="autoplay" controls="controls" src="/upload/surveys/421766/files/videoplayback.mp4"> </video>
</div>
<p> </p>
but without success.
Thank you for your help and best wishes,
Selina
thank you for the response. It worked fine in May and I just noticed coincidentally that it is now not working anymore. For now, I stopped the study and hope that I can activate it, after some small changes, again.
I tried to add a mp4 or mp3 file with the alarm sound.
However (at least for chrome), the problem remains that the sound (of mp4 and mp3) only starts auto-playing when I am actually looking at the online survey (which the participants won't do, because they are instructed to work locally on their computers until they hear the sound).
Is there anything I have to add to the iframe?
I tried:
<div class="ckeditor-html5-video" style="text-align: center;">
<video allow="autoplay" autoplay="autoplay" controls="controls" src="/upload/surveys/421766/files/videoplayback.mp4"> </video>
</div>
<p> </p>
but without success.
Thank you for your help and best wishes,
Selina
Last edit: 4 years 8 months ago by selinaemhardt.
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10098
- Thank you received: 3589
4 years 8 months ago #187163
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 Automatic proceeding when working locally fails
I have found that several browsers (including Chrome) will now (by default) only allow autoplay if the video is muted which defeats your purpose.
You may need to look for a plugin like jPlayer that will allow you to programmatically start the video on page load.
You may need to look for a plugin like jPlayer that will allow you to programmatically start the video on page load.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- selinaemhardt
- Topic Author
- Offline
- New Member
Less
More
- Posts: 3
- Thank you received: 0
4 years 8 months ago #187173
by selinaemhardt
Replied by selinaemhardt on topic Automatic proceeding when working locally fails
Hello Tpartner,
To make sure: autoplaying the video works, but only if I look at the survey in the browser. I also attached an examplary .lss file above.
I am not familiar with adding jplayer and I am a bit lost with the online description on how to do this because they are not very specific and I am new to Limesurvey. I use limesurvey version 3.17.0 . Do you maybe have some specific instructions or code?
Thank you very much already in advance and best wishes!
To make sure: autoplaying the video works, but only if I look at the survey in the browser. I also attached an examplary .lss file above.
I am not familiar with adding jplayer and I am a bit lost with the online description on how to do this because they are not very specific and I am new to Limesurvey. I use limesurvey version 3.17.0 . Do you maybe have some specific instructions or code?
Thank you very much already in advance and best wishes!
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10098
- Thank you received: 3589
4 years 8 months ago #187205
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 Automatic proceeding when working locally fails
I sorry but I don't have time to create a custom question theme with jPlayer but I imagine that after you have installed the jPlayer files and added the appropriate HTML to your page, the JavaScript would look like this:
Code:
<script type="text/javascript" charset="utf-8"> $(document).on('ready pjax:scriptcomplete',function(){ // Initiate the player $("#jquery_jplayer_1").jPlayer({ ready: function(event) { $(this).jPlayer("setMedia", { title: "My Title", mp4: "/path/to/video.mp4" }); }, swfPath: "/path/to/js", supplied: "mp4", cssSelectorAncestor: "#jp_container_1", useStateClassSkin: true, autoBlur: false, smoothPlayBar: true, remainingDuration: true, toggleDuration: true }); // Start the player after 10 seconds setTimeout(function() { $("#jquery_jplayer_1").jPlayer('play'); }, 10000); }); </script>
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.