Inhaltsverzeichnis

Media Files in Questionnaires (Audio, Video, Documents)

Online questionnaires distinguish themselves from printed questionnaires, according to the methodological literature, because, among other things, they can incorporate audiovisual material. Few research projects currently make the effort to produce media content, but if you would like to include a document (such as a PDF), an audio file or a video in your questionnaire, this chapter will help you do so.

Important: Most media files (images, music, sounds, videos, and texts) are subject to the copyright. That means, you must not publish (e.g., upload) or modify these files without a written consent by the copyright owners. This as well applies to materials, that can be consumed free of charge (e.g., YouTube videos) and to materials modified by you (e.g., cutted videos). In case of a copyright infringement you risk an expensive cease-and-desist order (costs a few hundret or some thousand Euros) and deletion of the uploaded files during data collection.

Note: Pictures in internet-appropriate formats (see Images) can be uploaded in the standard way at www.soscisurvey.de. Due to frequently lacking awareness of copyright violations, the server administrator must first approve uploaded media files.

Important: If your questionnaire makes use of media files, inform your participants of this fact as early as possible. E.g., you could point it out in the questionnaire invitation or next to the questionnaire link, so participants won’t begin the questionnaire in an inappropriate environment, such as an open-space office or the subway, and then have to abort at the video. As a control, you can also include a short video or audio file on the first or second questionnaire page, so participants will prepare their headphones or speakers early.

Uploading media files

While questions and tests are saved directly to a database, images and media files must first be uploaded as separate files to a host server (Images and Media Files in the menu). There are two things to keep in mind when doing so:

  1. The files must be saved in an appropriate format. There are countless document formats (e.g. PDF, DOC, DOCX, ODT, TXT, RTF for text documents alone), but only very few are suitable for use in online questionnaires. Aside from the file size, a crucial factor is that all participants must be able to open the document – particularly with proprietary formats (e.g. Word DOC, Windows AVI, etc.), this is often not the case.
  2. By uploading, you are publishing the file on the internet, universally accessible to everyone. This is only permitted if you hold usage rights for the contents. This starts with text copyrights, extends to composition and performance in a piece of music, and extends well beyond the image rights for pictures and videos. If any persons are represented in the material, confidentiality rights must be respected as well. In short: Any time outside material (even as background music or only in excerpts) or representations of persons are used, written permission is required. Otherwise, a written reprimand may be issued. This can cost between several hundreds and multiple thousands or Euros.

Note: Capitalisation is critical in internet content. Uploading the file “Document.pdf” and then linking the file “document.pdf” will lead to errors.

Linking Documents

Most text and image contents in a questionnaire are formatted as text elements with HTML and directly embedded. However, longer documents (such as multiple-page instructions) may need to be linked as a downloadable file. A widely-used file format is PDF.

PDF files can be created with Adobe Acrobat (if purchased) or with the freeware OpenOffice Writer or FreePDF.

Once a file is uploaded to the host server, it can be linked for download with the HTML tag <a>. Often (not always!) browsers will open PDF files in a new window rather than downloading them. The addition of target ensures that this occurs in a new browser window or tab.

<a href="document.pdf" target="_blank">Download file</a>

Note: Whether the PDF file is opened in the browser or downloaded depends on the browser, or rather, the participant’s settings, and can’t be controlled by the researcher.

Music, Audio Files and Videos

In many studies, embedding audio and video files needs to be customised. Read the following instructions to find out how this works:

Using HTML files

SoSci Survey allows you to upload web pages (HTML, CSS and JS files) that can be used for information or as stimuli. The instructions Play music along several pages describe a specific use case.

The following examples assume that you have uploaded a file called stimulus.html (and any associated CSS and/or JS files) to the project directory.

Important: For security reasons, the server may block script content in HTML pages. Integrate the pages via index.php?html=<filename> (e.g. index.php?html=stimulus.html) so that scripts work as expected. This workaround is not necessary for files from the protected file storage.

HTML pages can be linked in the questionnaire so that they open in a new browser tab:

<a href="stimulus.html" target="_blank">View page</a>

HTML pages can also be embedded directly into the questionnaire as <iframe>.

<iframe src="stimulus.html" width="100%" height="400"></iframe>

Please note that the width adapts to the screen (display on mobile devices), but the height is fixed. This can result in part of the content being cut off at the bottom or only being visible by scrolling.

The following HTML code embeds the page so that the aspect ratio remains constant and no frame is visible.

<iframe src="stimulus.html" width="100%" style="aspect-ratio: 1.7; border:none;"></iframe>

It is more difficult to adjust the height so that the <iframe> becomes longer (higher) on narrow screens. This requires JavaScript (JavaScript in the Questionnaire).

Tip: If possible, save the HTML code of the stimulus directly as Text, setting Display to “HTML code” in the List of Questions, and then drag the corresponding text into the questionnaire page.

Problems with the Web Storage Space

At www.soscisurvey.de, 64 MB disk space per survey project is available by default. This is too little for longer videos in several formats.

Survey server of the University

Tip: Check whether your university operates its own survey server (Availability of SoSci Survey at your university) – As a rule, significantly fewer surveys are run on local survey servers than on www.soscisurvey.de, so storage space can often be allocated less restrictively there. You can easily move existing projects (Copying a Survey).

Online storage space of the university

Ideally, you can access online storage at your own university or company and upload the video files there. In the HTML code, simply enter the complete URL of the video file, e.g.

<video width="512" height="288" controls controlsList="nodownload"> 
  <source src="https://www.example.com/projectXYZ/filename.mp4" type="video/mp4" />
</video>

Important: The online memory must (!) be accessible via HTTPS. If you try to include unencrypted HTTP content in a questionnaire page that was transmitted encrypted via HTTPS, most browsers block this.

Cloud storage

If you have access to B2Drop, Sync&Share, Sciebo or another scientific cloud storage, you can also store videos there. After uploading the file to Sync&Share, select the icon next to the file to create a download link (chain icon). On the download page that opens, you will see “Download” and the name of the file in a box - this is a link. By right-clicking on the link, you can copy the link destination to the clipboard and then use it in the <video> tag:

<video width="512" height="288" controls controlsList="nodownload">
    <source src="https://syncandshare.lrz.de/dl/fiR1vpLSm7zeDmYRoxRAiAQF/sample.mp4" type="video/mp4" />
</video>

Important: Most cloud storage systems have different links. One link opens a website on which the video is displayed or offered for download. With Sync&Share, for example, this contains a getlink/. The other link leads directly to the download and contains, for example, a dl/ or a /download. Only the download link works in the <video> tag. Here is an example for Sync&Share.

Google Drive, Dropbox and others

If you do not need to access the video using JavaScript – e.g. to play or pause the video depending on certain events or to record timestamps – then you can also use external storage services that do not deliver the mp4 file directly. This can be YouTube (see above) or cloud storage services.

If you store videos on Google Drive or Dropbox and share them from there, these services integrate their own video players. So you don't get the video itself, but only a website that plays the video. Such an external website can be integrated into the questionnaire (as with YouTube) using <iframe>.

<iframe width="420" height="315" src="https://drive.google.com/uc?export=preview&id=1Mu_zc...etc" frameborder="0" allowfullscreen allow="autoplay" style="display: block; border: 0 auto;"></iframe>

Warning: Whenever the data is loaded from a third-party server, the respondent's IP address is transmitted to this server. Check with your organisation's data protection officer whether this is a problem and whether you may need additional consent from respondents.

Warning: It cannot be ruled out that external cloud services may limit the number of accesses (e.g. per 24 hours). Please ask the respective provider and/or the search engine you trust whether and what limits the selected cloud storage service uses.

Technical hurdles

Regardless of whether audio files or videos are embedded following the directions above or directly from an external provider (e.g. YouTube), it can never guarantee that the participant can actually see the media file.

Embed a short test video/audio clip on the first page of the questionnaire. The participants can then be asked to test the display in advance.

Tip: Optionally, some information (such as a number) can be hidden in the media file by displaying or recording it. Only users who enter this information correctly into a text box can continue to the questionnaire (this is then checked via filter on the next page of the questionnaire).

Of course, a series of other problems can also prevent the display of media. This can start with the fact that the participant is using a hopelessly out-of-date browser (e.g. Internet Explorer 5) and extend well beyond difficulties playing the file (a frighteningly small proportion of internet users comprehends the term “play button”). It has to be accepted that under some circumstances, a portion of the participants in an online questionnaire simply cannot play the files. However, with the instructions above, this portion should be reduced to very few percent.

Finally, most of the time, it is impossible to control whether the participant has actually watched/listened to the complete file. This would require a special play-software to transmit this information to SoSci Survey (which does not currently exist). For those who do not wish to code their own software, the following options should work: