You can insert media objects directly into your survey using the Insert Media object capability. You can also link to items stored elsewhere on the Web.

YouTube videos are stored on servers elsewhere on the Web, so you need to link to them. The easiest way to do this is to use the embed code provided on the YouTube site. This is a piece of HTML to embed the link to your chosen video in your survey. This worksheet shows how to link to the video Getting Started with Snap WebHost which is available on YouTube. It explains how to find the embed code you need and how to insert it into your survey. It also tells you how to insert a video file directly into your survey.

Background

You can insert media objects directly in your survey, but you must link to a YouTube video as it is not stored with the survey.

If you insert video objects directly into your survey, you may have problems, as the people viewing the videos may have different video applications. This means that unless they have downloaded and installed the correct video player to see your video, they may not be able to view the video at all.

If you are not dealing with confidential information, it is usually better to upload the video to a site such as YouTube, and then link to the uploaded video, rather than inserting the video directly. Even then there may be some problems, depending on the capabilities of the device, its browser and its installed video applications.

Summary of steps

Step 1: Getting the YouTube link

Find the video that you wish to link to on the YouTube site. The example used in this worksheet is at http://www.youtube.com/watch?v=ARyI8gBuopo.

  1. Click the [Share] button below the video.
    YouTube showing Share button
  2. This displays a set of ways to share the video. Click the [Embed] button.

    YouTube showing Embed button

  3. An area displays showing the HTML code you need to embed the video in your survey.

    YouTube showing Embed link

  4. Copy all the text. For example:<iframe width=”420″ height=”315″ src=”http://www.youtube.com/embed/ARyI8gBuopo” frameborder=”0″ allowfullscreen></iframe>

Step 2: Inserting the link in your survey

  1. Open your survey showing the questionnaire view of the online (Web:HTML or Snap WebHost) edition.
  2. Place the cursor where you wish to insert the YouTube video and click the [Insert] button.
  3. Select HTML Field from the dropdown list. A New HTML Field dialog opens.
  4. Select the Custom HTML radio button.
  5. Paste the text you copied from the YouTube Embed field into the HTML pane.

    New html dialog with "custom HTML" highlighted and YouTube link

  6. Click [OK] to close the dialog. The inserted HTML code displays as a single tag in your survey.

    <iframe> link visible in questionnaire design

  7. Publish your survey. The YouTube video appears within your survey.

    YouTube embedded in published survey

Inserting your own video file into the survey directly

If you wish to insert a video directly into the survey, you need to have the video file. If the video file is small, you can embed it directly in the survey. It will then be stored with all the other survey information. If the video is large, it is better to put it somewhere else on the Internet (such as YouTube) and link to it in the same way that you linked to the YouTube video. You may need to ensure that all people viewing the online survey have the capability to play the video in the format that you have provided.

  1. Place the cursor at the point where you wish to insert the video. If it is not being included as part of a question then you may want to create an entirely separate question for it. If so, the Title, Sub-title or Instruction question styles are the most suitable, as they do not require any response.
  2. Click on the [Insert…] button and select Media Field… from the menu.
  3. The New media fielddialog opens. Click [Path] to choose the file you want to insert. The file must be on your local PC or network. Snap can recognise most multimedia file types.

    New media field dialog: limited

  4. If you wish to control the size of the inserted object, click [More>>] to expand the dialog.

    New media field dialog: full

  5. Set the width and height for the file to display. This needs to be large enough to display controls for users to play a multimedia file. You may need to publish and preview the survey to get an accurate size.
  6. Set autoplay to 1 to play the file automatically when the user opens the page with it on.
  7. When you are happy with the settings, click [OK].A token for the video appears in the questionnaire.
    New paper edition
  8. Publish the questionnaire to a preview to check that it appears correctly.

    Preview of  inserted wmv video in IE

If you wish to change the size of the display or the properties of the media object after you have inserted it, double click the file icon. This will open the New media field dialog box.

Conclusion

This worksheet has described how to link to a YouTube video and how to insert a video file directly into your survey.

You can insert audio files into your survey in the same way. See the topic: Inserting a multimedia object.

For information about inserting HTML links and code, see: Inserting HTML links and codes.

For information about opening a web page from your survey, see the worksheet: Adding extra information in pop-up windows and labels.

There is a great deal of background information about inserting video into web pages available on the internet, for example http://diveintohtml5.org/video.html.

There is reference information available about the New media field dialog.

If there is a topic you would like a worksheet on, email to snapideas@snapsurveys.com