Have an idea?

Visit Sawtooth Software Feedback to share your ideas on how we can improve our products.

How to prevent participants from fast-forwarding a youtube video

Dear community,

I am looking for a code to embed a youtube video and to prevent participants from fast-forwarding a video. I appreciate the help.

Thank you
asked Jan 12, 2016 by Sabrina
edited Jan 12, 2016

2 Answers

+1 vote
When you view a YouTube video, if the publishers of the video made it "shareable" you should be able to find a share icon underneath the video when viewed on the YouTube website. This will contain iframe information which you can just copy and paste into your survey. In your case, you also want to hide the controls, disable the keyboard controls,  and autostart the video, which is found in the following example:

<iframe width="853" height="480" src="https://www.youtube.com/embed/PCdtjA32BhA?autoplay=1&controls=0&disablekb=0&rel=0" frameborder="0" allowfullscreen></iframe>

Some browsers may not allow you to disable the keyboard controls; some will. There is probably a way to code up your own controllers. See https://developers.google.com/youtube/player_parameters for more information.
answered Jan 12, 2016 by Nathan Bryce Silver (9,505 points)
Thank you very much for the quick reply. Two further questions:
1) When testing the survey locally in order to see whether it works, I only get to see a black video field without the video running. Is that normal? I tested both my video and your entire example.
2) In order to continue the questionnaire, you have to click on the arrow. Is there a way to only acticate the continue button after a participant has actually seen the entire video?
0 votes
The embed code is given to you by Youtube.  On the page with the video, click on the Share button below the video.  Then click on the Embed tab.  There should be a link that starts with an iframe tag.  If you copy and paste that into a survey page it should embed the video.
answered Jan 12, 2016 by Brian McEwan Platinum Sawtooth Software, Inc. (56,045 points)