"+SLADi18n['intro'][eLANG]+"
"+ ""+ ""+ "
"+ "/*------------------------------------------------------------------------------ * Various tools for experiments *------------------------------------------------------------------------------ * Requires jQuery, Semantic UI modal and icon, and the dbsplab.fun DataHandler * (only to check if the sound level adjustment has been done already). *----------------------------------------------------------------------------*/ // Latest version at https://git.web.rug.nl/dBSPL/jspsych-plugins/src/branch/main/js/tools.js function is_browser_compatible(){ // Add here everything that needs to be tested for browser compatibility if( (new Audio()).canPlayType('audio/mp3') != 'probably' ) return false; /* if( (new Audio()).canPlayType('audio/mpeg') != 'probably' ) return false; */ /* if( (new Audio()).canPlayType('audio/wav') != 'probably' ) return false; if( (new Audio()).canPlayType('audio/flac') != 'probably' ) return false; */ return true; // for of } function show_error(msg, to="body", after=false) { if(after) $("
").appendTo(to); else $("").prependTo(to); } function sound_level_adjustment(sound_file, after_cb) { // Checks in the session if sound level adjustment has been performed for this // experiment, and if not, shows a sound level adjustment dialog. if(typeof after_cb==='undefined') after_cb = function(){}; window.DataHandler.get_sound_level_adj( // success function(is_adjusted){ if(is_adjusted) after_cb(); else _make_sound_level_adjustment(sound_file, after_cb); }, // error show_error ); } // Sound level adjustment dialog internationalisation var SLADi18n = {}; SLADi18n['title'] = {}; SLADi18n['title']['fr'] = "Réglage du volume"; SLADi18n['title']['en'] = "Sound level adjustment"; SLADi18n['title']['nl'] = "Geluidsvolume"; SLADi18n['title']['de'] = "Lautstärkeanpassung"; SLADi18n['intro'] = {}; SLADi18n['intro']['fr'] = "Il est conseillé de completer cette expérience dans un environnement calme, et de préférence en utilisant un casque de bonne qualité. Ajustez le volume de votre ordinateur de façon à ce que le son soit présenté à un niveau confortable, et gardez le volume identique pendant toute la durée de l'expérience."; SLADi18n['intro']['en'] = "You are kindly asked to perform this experiment in a calm environment, and preferably using good quality headphones. Adjust the sound level on your computer so that the sound plays at a comfortable level, and keep the volume the same during the whole experiment."; SLADi18n['intro']['nl'] = "U wordt vriendelijk verzocht om dit experiment in een stille omgeving uit te voeren en bij voorkeur een koptelefoon van goede kwaliteit te gebruiken. Pas het geluidsvolume op uw computer aan zodat het geluid op een comfortabel niveau wordt afgespeeld, en verander het geluidsniveau verder niet meer gedurende het experiment."; SLADi18n['intro']['de'] = "Wir bitten Sie freundlich, dieses Experiment in einer ruhigen Umgebung und möglichst mit hochwertigen Kopfhörern durchzuführen. Stellen Sie die Lautstärke Ihres Computers so ein, dass der Klang in einer angenehmen Lautstärke wiedergegeben wird, und behalten Sie diese Einstellung während des gesamten Experiments bei."; SLADi18n['loading'] = {}; SLADi18n['loading']['fr'] = "Chargement..."; SLADi18n['loading']['en'] = "Loading..."; SLADi18n['loading']['nl'] = "Bezig met laden..."; SLADi18n['loading']['de'] = "Wird geladen..."; SLADi18n['continue'] = {}; SLADi18n['continue']['fr'] = "Continuer"; SLADi18n['continue']['en'] = "Continue"; SLADi18n['continue']['nl'] = "Doorgaan"; SLADi18n['continue']['de'] = "Weiter"; SLADi18n['when-ready'] = {}; SLADi18n['when-ready']['fr'] = `Quand vous êtes prêt.e, cliquez sur "${SLADi18n['continue']['fr']}".`; SLADi18n['when-ready']['en'] = `When you are ready, click on "${SLADi18n['continue']['en']}".`; SLADi18n['when-ready']['nl'] = `Als u klaar bent, klik je op "${SLADi18n['continue']['nl']}".`; SLADi18n['when-ready']['de'] = `Um fortzufahren, klicken Sie bitte auf "${SLADi18n['continue']['de']}".`; function _make_sound_level_adjustment(sound_file, after_cb) { // The global LANG has to be defined var eLANG = LANG; // Fallback to English if lanugage is not supported if(typeof SLADi18n['intro'][eLANG] === 'undefined'){ eLANG = 'en'; } var snd; var dialog = $( ""+SLADi18n['intro'][eLANG]+"
"+ ""+ ""+ "
"+ "