0 votes
in SoSci Survey (English) by s098891 (355 points)

I know how to hide the audio player, and it works for all of the items execpt the first one.

by SoSci Survey (302k points)
Hard to answer without known the setting in detail. Would you mind posting a pretest URL that directly opens the page with the problem? Thanks.
by SoSci Survey (302k points)
The URL does not lead to the correct page, does it?

The "first item" would be PS01, if I got it right. I do not see a player there in Firefox?! Ist that the correct question? Which browser are you using?
by s098891 (355 points)
The URL leads to the beginning of the questionnaire -> choose a language -> 2 pages with information -> relevant item with dog picture.

This link might directly lead you to the page:
https://www.soscisurvey.de/belief_statements/index.php?i=B0PZAPW5VG6Q&rnd=TLTB

I'm using Chrome - I've just tried Firefox and it works!!!
by SoSci Survey (302k points)
Okay, if it's a browser issue, we shall be able to resolve that :)

I hope to have an answer until tomorrow.

1 Answer

0 votes
by SoSci Survey (302k points)

Sie verwenden unter dem Audio folgendes Script:

<script type="text/javascript">
<!--
window.addEventListener("load", function() {
  window.setTimeout(function() {
    var audio = document.getElementById("audio253");
    if (audio.paused) {
      var box = document.getElementById("audio253_box");
      box.style.width = "";
      box.style.height = "";
      box.style.overflow = "";
      box.style.opacity = "";
      box.className = "spacing";
    }
  }, 250);
 });
// -->
</script>

Meiner Einschätzung nach macht das Script genau das, was es soll. Es prüft kurz nach dem laden er Seite, ob das Audio gerade pausiert ist - und zweigt es an. Die Frage wäre eher, warum das in Firefox nicht (!) funktioniert, wenn man durch Abklemmen der Lautsprecher dafür sorgt, dass das Abspielen nicht funktioniert. Aber das ist eine andere Frage.

Für die Lösung des vorliegenden Problem stellt sich eher die Frage, warum das autoplay in Chrome nicht funktioniert. Eine Antwort darauf habe ich nicht, aber möglicherweise einen Lösungsansatz: Rufen Sie 250ms nach Laden der Seite die Funktion play() für das Audio-Element (nicht für das DIV, versteht sich) auf. Und blenden Sie den Player erst nach 1 Sek. ein, wenn es dann immer noch nicht läuft.

Für das zuverlässige Ein-/Ausblenden hat es sich übrigens gewährt, die Position von absolute und left auf -20000px zu setzen. Dann muss man zum Einblenden nicht alles ändern, sondern nur die Positionierung. Sie können dafür auch die Klasse "screenreader" missbrauchen.

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

...