{"id":1760,"date":"2018-11-06T04:43:26","date_gmt":"2018-11-06T04:43:26","guid":{"rendered":"https:\/\/lab.florianschwarz.net\/PennController\/?post_type=yada_wiki&#038;p=1760"},"modified":"2019-02-14T21:15:01","modified_gmt":"2019-02-14T21:15:01","slug":"penncontroller-initiaterecorder","status":"publish","type":"yada_wiki","link":"https:\/\/lab.florianschwarz.net\/PennController\/wiki\/penncontroller-initiaterecorder\/","title":{"rendered":"PennController.InitiateRecorder"},"content":{"rendered":"<p class='command-format'><code>PennController.InitiateRecorder( url )<\/code><\/p>\n<p class='command-format'>or <code>PennController.InitiateRecorder( url , message )<\/code><\/p>\n<p><strong>Note:<\/strong> you can<em>not<\/em> use this command if you install a custom build of PennController that does not include the <a href=\"https:\/\/lab.florianschwarz.net\/PennController\/wiki\/voicerecorder-element\/\" class=\"wikilink-published\">VoiceRecorder element<\/a>.<\/p>\n<p>Use this to specify the URL of the PHP file to upload the audio recordings collected during the experiment.<\/p>\n<p><code>PennController.InitiateRecorder<\/code> creates a PennController trial asking for the participant&#8217;s consent to record audio samples. You can specify a <code>message<\/code> to replace the default one. Use the <a href=\"https:\/\/lab.florianschwarz.net\/PennController\/wiki\/penncontroller-label\/\" class=\"wikilink-published\">label<\/a> command on it to determine when it should appear in your <a href=\"https:\/\/lab.florianschwarz.net\/PennController\/wiki\/penncontroller-sequence\/\" class=\"wikilink-published\">sequence of trials<\/a>.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<p>[js highlight=&#8221;1-5&#8243; try=&#8221;data&#8221;]<br \/>\nPennController.InitiateRecorder(<br \/>\n    &#8220;https:\/\/myserver\/uploadVoices\/saveRecordings.php&#8221;<br \/>\n    ,<br \/>\n    &#8220;This experiment collects audio recordings. \\u003Cstrong\\u003EOnce you grant it access to your recording device, you will be notified of whether you are being recorded by a label at the top of the page\\u003C\/strong\\u003E&#8221;<br \/>\n);<\/p>\n<p>PennController(<br \/>\n    newVoiceRecorder(&#8220;recorder&#8221;)<br \/>\n        .print()<br \/>\n        .wait()<br \/>\n);<br \/>\n[\/js]<\/p>\n<p>Adds a page asking for the participant&#8217;s authorization to use their recording device, using a custom text message.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"inline_featured_image":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"wiki_cats":[13,5,4,33,35],"wiki_tags":[],"class_list":["post-1760","yada_wiki","type-yada_wiki","status-publish","hentry","wiki_cats-command","wiki_cats-documentation","wiki_cats-element","wiki_cats-global-command","wiki_cats-penncontroller-global"],"_links":{"self":[{"href":"https:\/\/lab.florianschwarz.net\/PennController\/wp-json\/wp\/v2\/yada_wiki\/1760","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lab.florianschwarz.net\/PennController\/wp-json\/wp\/v2\/yada_wiki"}],"about":[{"href":"https:\/\/lab.florianschwarz.net\/PennController\/wp-json\/wp\/v2\/types\/yada_wiki"}],"author":[{"embeddable":true,"href":"https:\/\/lab.florianschwarz.net\/PennController\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/lab.florianschwarz.net\/PennController\/wp-json\/wp\/v2\/comments?post=1760"}],"version-history":[{"count":4,"href":"https:\/\/lab.florianschwarz.net\/PennController\/wp-json\/wp\/v2\/yada_wiki\/1760\/revisions"}],"predecessor-version":[{"id":2795,"href":"https:\/\/lab.florianschwarz.net\/PennController\/wp-json\/wp\/v2\/yada_wiki\/1760\/revisions\/2795"}],"wp:attachment":[{"href":"https:\/\/lab.florianschwarz.net\/PennController\/wp-json\/wp\/v2\/media?parent=1760"}],"wp:term":[{"taxonomy":"wiki_cats","embeddable":true,"href":"https:\/\/lab.florianschwarz.net\/PennController\/wp-json\/wp\/v2\/wiki_cats?post=1760"},{"taxonomy":"wiki_tags","embeddable":true,"href":"https:\/\/lab.florianschwarz.net\/PennController\/wp-json\/wp\/v2\/wiki_tags?post=1760"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}