0 votes
in SoSci Survey (English) by s169050 (155 points)
edited by SoSci Survey

Hello,

For our survey, we created a loop in which we have a randomization list with a list of videos. Those videos are all shown and rated by the participant using a loop and multi-level structure.

This is the code we have implemented for this:

$codes = array_values(valueList('RD06'));
$i = loopToPage('loopEnd2', 4);
$randomID = id('RD', 6, $i+1);

if (value($randomID) > 0) {
 replace('%image%', $randomID, 'response');
 html(' xx video autoplay xx
         xx source src="%image%" type="video/mp4" xx
        xx /video xx');

However, before we were presenting a list of videos which were uploaded into the media files, and therefore the %image% code was being used. Now, we want to present a sequence of videos by calling them from URLs, like this:

1 = https://faubox.rrze.uni-erlangen.de/dl/......../EE_pos1_25%20frames.mp4
2 = https://faubox.rrze.uni-erlangen.de/dl/f........./P_neu1_25frames.mp4
3 = https://faubox.rrze.uni-erlangen.de/dl/.........../P_neg1_25%20frames.mp4

What would be the right code for that? The URLs are working, they do not change and lead to directly downloading the video.

Thank you very much for your help! :)

by SoSci Survey (328k points)
Well, does ist work? How does the HTML code of your page look like?

1 Answer

0 votes
by s169050 (155 points)
edited by s169050

Hi,

that's an example of the url: 3 = https://faubox.rrze.uni-erlangen.de/dl/fiW1BUD....W1cJPZxsGv/P_neg1_25 frames.mp4

When the video is called during the survey, just the first frame appears and nothing else. The video does not play automatically as when using the uploaded version in the media files and there is no option to press a play button.

That is why we are trying to understand which code we should use to efficiently call it during the survey. We want it to play automatically once.

Thanks for your help!

by SoSci Survey (328k points)
Please post a pretest link hat goes directly to the page with the stimulus. I won't be able to diagnose the problem unless I see the context. Also, give the browser console a look.
by SoSci Survey (328k points)
One problem may (!) be that the server says:

Content-disposition: attachment

That means: "Dear browser, please understand this file as a download". Yet, I cannot tell more unless I can observe it in the proper context.
by s169050 (155 points)
Hi, sorry I misunderstood when you asked for the link.

Here it is: https://www.soscisurvey.de/emo_videoclips/?act=M3DN5CGYYE4AXi4D8bcvYAKA
by SoSci Survey (328k points)
This manual explains how to create valid pretest URLs:
https://www.soscisurvey.de/help/doku.php/en:survey:pretest
by s169050 (155 points)
by SoSci Survey (328k points)
Looks good, so far. There's only one thing: The browser blocks autoplay by default, if there was no interaction between the use and the page.

Please use the JavaScript code suggested in the manual to enable a "play" button, if the autoplay fails: https://www.soscisurvey.de/help/doku.php/en:create:media#embedding_videos_using_html5
by s169050 (155 points)
Hi,

Thanks a lot! I did use the code and it works now. It is just a pity that the autoplay is blocked in this case, because it would be useful for our case. But if there is no other option, then we procede like that. Thank you very much for your help!
by SoSci Survey (328k points)
The blocking is a thing between you and the browser. Unfortunately, websites (especially advertising) abused the autoplay feature a lot. Therefore, I can fully understand why browsers are blocking that feature under certain circumstances.

An option would be to put the video on a page with the previous questions, and then only swap the page's content via JavaScript when a dummy-next-button is clicked. That would make sure that there's a user interaction and th autoplay would work. However, that's a lot of coding for the little autoplay.

Willkommen im Online-Support von SoSci Survey.

Hier bekommen Sie schnelle und fundierte Antworten von anderen Projektleitern und direkt von SoSci Survey.

→ Eine Frage stellen


Welcome to the SoSci Survey online support.

Simply ask a question to quickly get answers from other professionals, and directly from SoSci Survey.

→ Ask a Question

...