{ "components": { "2": { "id": "2", "type": "lab.canvas.Screen", "content": [ { "type": "i-text", "version": "4.3.1", "originX": "center", "originY": "center", "left": 0, "top": -36.98, "width": 653.44, "height": 180.8, "fill": "#0d3b83", "stroke": "#ffffff", "strokeWidth": 0, "strokeDashArray": null, "strokeLineCap": "butt", "strokeDashOffset": 0, "strokeLineJoin": "round", "strokeUniform": false, "strokeMiterLimit": 4, "scaleX": 1, "scaleY": 1, "angle": 0, "flipX": false, "flipY": false, "opacity": 1, "shadow": null, "visible": true, "backgroundColor": "", "fillRule": "nonzero", "paintFirst": "fill", "globalCompositeOperation": "source-over", "skewX": 0, "skewY": 0, "text": "Welcome!", "fontSize": "100", "fontWeight": "normal", "fontFamily": "sans-serif", "fontStyle": "normal", "lineHeight": 1.16, "underline": false, "overline": false, "linethrough": false, "textAlign": "center", "textBackgroundColor": "", "charSpacing": 0, "id": "99", "styles": {} }, { "type": "i-text", "version": "4.3.1", "originX": "center", "originY": "center", "left": 0, "top": 75, "width": 149.98, "height": 18.08, "fill": "#aaaaaa", "stroke": null, "strokeWidth": 1, "strokeDashArray": null, "strokeLineCap": "butt", "strokeDashOffset": 0, "strokeLineJoin": "round", "strokeUniform": false, "strokeMiterLimit": 4, "scaleX": 1, "scaleY": 1, "angle": 0, "flipX": false, "flipY": false, "opacity": 1, "shadow": null, "visible": true, "backgroundColor": "", "fillRule": "nonzero", "paintFirst": "fill", "globalCompositeOperation": "source-over", "skewX": 0, "skewY": 0, "text": "press SPACE to start", "fontSize": "16", "fontWeight": "normal", "fontFamily": "sans-serif", "fontStyle": "normal", "lineHeight": 1.16, "underline": false, "overline": false, "linethrough": false, "textAlign": "center", "textBackgroundColor": "", "charSpacing": 0, "id": "273", "styles": {} } ], "viewport": [ 800, 600 ], "files": [], "responses": [ { "label": "", "event": "keypress", "target": "", "filter": "Space" } ], "parameters": [ { "name": "", "value": "", "type": "string" } ], "messageHandlers": [], "title": "welcome", "_tab": "Content" }, "4": { "id": "4", "type": "lab.html.Page", "items": [ { "required": true, "type": "text", "title": "
\nPress Space to download a CSV file with the data. In the CSV file, the audio is encoded as Base64 strings in the 'audio' column. Base64 can be converted to an audio file using a Python/R/JavaScript script or a website such as base64.guru.\n
\n\n\nNote: The string cannot be directly decoded as Base64 without first removing the Data-URL declaration preceding the Base64-encoded data. That is, remove the following part from the string: data:audio/ogg; codecs=opus;base64,\n
\nOnce extracted, the filetype of the audio is `.ogg`. Not all media players can play ogg files. VLC is a good free audio player that can.\n
\n\n\nIf you are running this study on JATOS, the data will be stored on JATOS, too. You can find more information in the lab.js docs. \n
" } ], "scrollTop": true, "submitButtonText": "Continue →", "submitButtonPosition": "hidden", "files": [], "responses": [ { "label": "press_space", "event": "keypress", "target": "", "filter": "Space" } ], "parameters": [ { "name": "", "value": "", "type": "string" } ], "messageHandlers": [ { "title": "", "message": "after:end", "code": "// Script for storing the entire data\r\n// \r\n// This is not strictly necessary, since lab.js stored the data \r\n// autmamatially. Theis adds a bit of convenience.\r\n//\r\n// This script must be added to the \"after:end\" stage.\r\n\r\n// ***** Configuration ********************************************\r\n// save the labjs csv data file to JATOS?\r\n// This creates a bit of data duplication because the data is \r\n// already saved on JATOS in json format. Saving it as csv adds \r\n// a bit of convenience at the expense of using more storage.\r\n// Leaving it set to `true` is fine, regardless of whether the \r\n// experiment is running on JATOS or not.\r\nsave_to_jatos = true;\r\n\r\n// Initiate download of data as 'CSV' file after the experiment?\r\n// (This is about the user's browser. The data will be stored by \r\n// lab.js regardless)\r\ndownload_csv = true; \r\n// ****************************************************************\r\n\r\n\r\nif (save_to_jatos) {\r\n const blob = this.options.datastore.exportBlob(filetype = 'csv');\r\n \r\n try{\r\n filename = \"data.csv\";\r\n jatos.uploadResultFile(blob, filename).done(() => { \r\n info = info.concat(`CSV uploaded to JATOS as ${ filename }.`);\r\n });\r\n } catch (err) {\r\n \"Upload to JATOS failed. \"\r\n }\r\n}\r\n\r\n\r\nif (download_csv) this.options.datastore.download();" } ], "title": "goodbye", "_tab": "Scripts" }, "5": { "id": "5", "type": "lab.html.Page", "items": [ { "type": "text", "title": "Audio recorder test", "content": "Use the record button below to test if the recording works, \nthen press the Space key to continue." }, { "required": true, "type": "html", "content": "