0 votes
ago in SoSci Survey (dt.) by s363434 (110 points)
edited ago by SoSci Survey

Hallo ich habe eine between subject experiment. Eingestellt mittels Zufallsgenerator. An einen der beiden Zettel möchte ich eine Audiofile abspielen. Beim anderen Zettel soll das Audiofile nicht abspielen. Wie mache ich das?
mein php code:

if (value('KI04') == 1) {
  text('KI06');
} elseif (value('KI04') == 2) {
  text('KI05');
}

und mein html code:

<audio id="audio_with_controls" preload="auto" autoplay controls controlsList="nodownload">
controls controlsList="nodownload">
  <source src="AudioImagination.mp3" type="audio/mpeg" />
  <source src="AudioImagination.ogg" type="audio/ogg" />
  Your browser is not able to play this audio file 
</audio>

--> in der Fragebogen zusammenstellung eingebaut.

Danke!

1 Answer

0 votes
ago by SoSci Survey (368k points)

in der Fragebogen zusammenstellung eingebaut.

Nehmen Sie ihn da bitte wieder raus, und speichern Sie den HTML-Code stattdessen in einen "Text" im Fragenkatalog (Darstellung: "HTML-Code").

Und dann müssten Sie das Audio nur noch im PHP-code ergänzen. Wenn die Kennung des Textes z.B. AU01 wäre...

if (value('KI04') == 1) {
  text('KI06');
  text('AU01');  // Audio-HTML
} elseif (value('KI04') == 2) {
  text('KI05');
}

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

...