This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| en:create:media [26.04.2016 14:10] – [Embedding of an mp3 using HTML5] admin | en:create:media [26.09.2025 09:33] (current) – admin | ||
|---|---|---|---|
| Line 20: | Line 20: | ||
| - | ===== Linking | + | ===== Linking |
| 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. | 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. | ||
| Line 34: | Line 34: | ||
| **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. | **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 ===== | ||
| - | ===== Incorporating | + | In many studies, embedding |
| - | There are several file formats that are good for use online, particularly RealMedia (RMA) and Windows Media (WMA). However, both formats exclude a relevant proportion of participants. In contrast, virtually all internet users can now play Flash files. The open-source software | + | * [[:de: |
| + | * [[:de: | ||
| + | * [[: | ||
| - | **Note:** The solutions below will play the audio file on one specific questionnaire page. When clicking to the next page, it stops. If you need to bypass this restriction, | ||
| - | ==== Simple embedding of an mp3 ==== | + | ===== Using HTML files ===== |
| - | If an audio file is saved in mp3 format and uploaded | + | SoSci Survey allows you to upload web pages (HTML, CSS and JS files) that can be used for information or as stimuli. The instructions [[:en: |
| - | **Note:** SoSci Survey embeds audio files with a flash-based EMFF player. While this solution also works for outdated browsers, flash is not supported in iOS (iPhones/iPads). Further, Firefox now blocks flash content as a default, and requires for explicit content activation by clicking, even if autoplay is activated. We thus recommend audio file embedding using HTML5. | + | The following examples assume that you have uploaded |
| + | **Important: | ||
| - | ====Embedding of an mp3 using HTML5==== | + | HTML pages can be linked in the questionnaire so that they open in a new browser tab: |
| - | Since the HTML5 tag '' | + | <code html> |
| - | + | <a href=" | |
| - | In order to make sure the audio file is played in all contemporary browsers, it should be present in mp3 __and__ ogg format. However, mp3 alone already provides | + | </code> |
| - | To embed a file, create a new [[en: | + | HTML pages can also be embedded directly into the questionnaire as ''< |
| <code html> | <code html> | ||
| - | <audio id=" | + | <iframe |
| - | < | + | |
| - | <source src="audio.ogg" | + | |
| - | Your browser is not able to play this audio file | + | |
| - | </audio> | + | |
| </ | </ | ||
| - | The file name(s) are entered | + | Please note that the width adapts to the screen |
| - | CSS formatting can be used to either adjust player size or to hide the player entirely. Please keep in mind that some browsers might ignore | + | The following HTML code embeds |
| <code html> | <code html> | ||
| - | <audio id="audio_with_controls" | + | <iframe src="stimulus.html" |
| - | <source src=" | + | |
| - | </audio> | + | |
| </ | </ | ||
| - | <code html> | + | It is more difficult to adjust the height so that the '' |
| - | <audio id=" | + | |
| - | <source src=" | + | |
| - | </ | + | |
| - | </ | + | |
| - | **Note:** Due to technical limitations, | + | **Tip:** If possible, save the HTML code of the stimulus directly as **Text**, setting //Display// to " |
| - | ====Embedding of an mp3 using Flash==== | ||
| - | If additional functions are needed (such as playing | + | ===== Problems with the Web Storage Space ===== |
| - | <code html> | + | 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. |
| - | <object type=" | + | |
| - | <param name=" | + | |
| - | <param name=" | + | |
| - | </ | + | |
| - | </ | + | |
| - | **Note:** If EMFF is not present on a host server, the necessary flash files (SWF) can be downloaded from the EMFF homepage and uploaded to the user's project. | ||
| + | ==== Survey server of the University ==== | ||
| - | ===== Embedding videos ===== | + | **Tip:** Check whether your university operates its own survey server ([[https:// |
| - | **Important: | ||
| - | ==== The special case of YouTube videos | + | ==== Online storage space of the university |
| - | Users who upload | + | 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. |
| - | + | ||
| - | To do this, open the video on YouTube, click on the //Share// button, then //Embed//: Copy the HTML code into a text element (**Text Elements and Labels**) and drag it into the questionnaire (**Compose Questionnaire**). If necessary, replace '' | + | |
| <code html> | <code html> | ||
| - | <iframe | + | <video width=" |
| + | < | ||
| + | </video> | ||
| </ | </ | ||
| - | With this HTML code, a (mostly invisible) YouTube website is opened within the questionnaire and the YouTube player is loaded. The user does not have to upload the file, nor deal with copyright laws. In exchange, YouTube is permitted to blend their own advertisements into the video. | + | **Important: |
| - | **Warning: | ||
| - | **Note:** Browser will access www.soscisurvey.de via secured (encrypted) HTTPS protocol. Some browsers deny including content from non-encrypted sources via iframe. When including external content, make sure, this content is available via HTTPS. Also use the HTTPS URL. | + | ==== Cloud storage ==== |
| + | If you have access to [[https:// | ||
| - | ====Embedding videos using HTML5==== | ||
| - | |||
| - | If you want to make sure your video can be displayed correctly for virtually all participants, | ||
| - | |||
| - | **Important: | ||
| - | |||
| - | To convert your video file into the file formats mp4, ogg, and webm, you can use a number of tools. It can be done quite conveniently using [[https:// | ||
| - | [[http:// | ||
| - | do so with VLC, do the following (instructions based on [[http:// | ||
| - | |||
| - | * Open VLC Media Player | ||
| - | * Menu: Media -> Convert/ | ||
| - | * File -> File Selection -> Add -> Choose video file | ||
| - | * Convert/ | ||
| - | * Settings -> Profile: “Video - H.264 + MP3 (MP4)” | ||
| - | * Destination -> Destination File -> Browse -> choose folder and file name, using .mp4 extension (e.g. video.mp4) | ||
| - | * Start | ||
| - | |||
| - | Possibly, the conversion parameters need to be adjusted to meet the needs of your project, e.g. concerning video bitrate. You can do so in the “Edit selected profile” dialog next to the profile selection. | ||
| - | |||
| - | This procedure is repeated using the profiles “Video - VP80 + Vorbis (WebM)” -> file extension “.webm”, | ||
| - | |||
| - | In SoSci Survey, you create a new [[: | ||
| <code html> | <code html> | ||
| - | <video width=" | + | <video width=" |
| - | <source src="filename.ogg" | + | <source src="https:// |
| - | <source src="filename.mp4" type=" | + | |
| - | <source src=" | + | |
| </ | </ | ||
| </ | </ | ||
| - | Obviously, you can use the '' | + | **Important: |
| - | ====Embedding videos using Flash==== | + | * Link to display the file\\ '' |
| + | * Link to download and integrate the file\\ '' | ||
| - | While video embedding using Flash has been the means of choice until just a few years ago, this solution now faces two major challenges: first, it does not work on iPhone/ | ||
| - | To convert your video into a flash video file, a helpful tool is the [[http:// | + | ==== Google Drive, Dropbox |
| - | When installing this tool, the suggested toolbars can be deactivated/ | + | |
| - | - Start the application | + | If you do not need to access |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | - " | + | |
| - | - The pre-set “high quality” with 1 MBit/sec is a good starting point -- yet, the image size and/or bit-rate may need adjusting. | + | |
| - | - Many more options | + | |
| - | - The box next to //Show HTML sample file// should be checked. | + | |
| - | - //Convert// – this will take a while | + | |
| - | The converter will save the Flash video (FLV) and the actual player to play the video (SWF file) in the target directory. In some cases a control file (XML) is included as well. The two or three output files should be uploaded to the survey project – an eventual HTML or CSS file in the target directory does not need to be uploaded. The video file size (FLV) may not exceed 64 MB on the www.soscisurvey.de server. | + | If you store videos on Google Drive or Dropbox |
| - | + | ||
| - | **Important: | + | |
| - | + | ||
| - | After converting | + | |
| - | + | ||
| - | This HTML code is best saved as a text element (**Text Elements and Labels**). For the text element' | + | |
| <code html> | <code html> | ||
| - | <object id=" | + | <iframe |
| - | < | + | |
| - | <param name="movie" value=" | + | |
| - | <param name=" | + | |
| - | <param name=" | + | |
| - | <param name=" | + | |
| - | <param name="menu" | + | |
| - | <param name=" | + | |
| - | <param name=" | + | |
| - | <param name=" | + | |
| - | </object> | + | |
| </ | </ | ||
| - | **Tip:** This Flash application, | + | **Warning:** Whenever |
| + | |||
| + | **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. | ||
| Line 200: | Line 137: | ||
| 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. | 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. | ||
| - | All options listed above (including YouTube) only work if the participant has a halfway up-to-date Flash Player. Flash is the most common media plug-in for browsers, but a relevant proportion of participants (depending on target population, 5-20%) will not have it installed. In addition, some participants use a Flash-Blocker to hide moving advertisements on some websites. | + | 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. |
| - | + | ||
| - | The solution to this problem is relatively simple: 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. I fit does not work properly, they should ... | + | |
| - | + | ||
| - | * check if the speakers are turned on, | + | |
| - | * possibly install the up-to-date Flash Player (include a link to the download page) and/or | + | |
| - | * temporarily disable an Flash blocker. | + | |
| **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). | **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). | ||