0 votes
in SoSci Survey (English) by s096529 (230 points)

I want to run an online study in which people will watch videos and rate the videos on a scale. I would like the video to stop playing after the button was pressed. Moreover, I want the survey to register what button was pressed as well as the time the button press occurred.

Is this possible with soSci survey?

by SoSci Survey (302k points)
Yould you plese specify your question:

How is the video embedded into the questionnaire? HTML 5 oder as YouTube iFrame?

> I would like the video to stop playing after the button was pressed.

Which button?
by s096529 (230 points)
The video will be embedded using HTML 5.

The experiment should allow people to press the buttons "1", "2", "3" or "4" during the video presentation.

1 Answer

+1 vote
by SoSci Survey (302k points)

If the video is embeded via HTML 5, it's possible - but you will have to do some JavaScript programming.

First, please read the chapter about internal variables, which you will need to store any data into.

Then, you will need a bit reading about JavaScript events. Let's assume, your video has the HTML ID "myVideo" and there's a button with the ID "myButton1", then the following HTML/JavaScript code would stop the video when the button is pressed:

<script type="text/javascript">
<!--

var button1 = document.getElementById("myButton1");
var video = document.getElementById("myVideo");

SoSciTools.attachEvent(button1, "click", function(evt) {
  video.stop()
});

// ->
</script>

Next step then would be to store the click (and the current timestamp of the video, I assume) into an internal variable. Before you do so, please clarify the format that you would like to have in the data set. This could be something like: buttonID, timestamp, buttonID, timestamp, buttonID, timestamp, buttonID, timestamp, ... - Yet, you should have an idea how to handle such comma-separated data in the analysis.

by s096529 (230 points)
Thank you, I will try that.

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

...