Turkframe is a PsiTurk wrapper for use around separately hosted experiments.
PsiTurk makes Mechanical Turk integration easier, but it can be time-consuming to adapt projects for use with PsiTurk. Turkframe eases the process of adding PsiTurk to an existing project with minimal modification.
Turkframe provides a 'wrapper' PsiTurk project to handle mTurk integration. When a worker is ready to begin the task, Turkframe simply produces an iframe pointing towards a separately hosted experiment. PsiTurk's condition, counterbalance, and uniqueId parameters are passed to the experiment, and the experiment can freely pass messages and data back to the PsiTurk frame.
- The
turkframePsiTurk project, as a template to be customized and pointed towards your experiment - The
turkframe.jsJavaScript API, to help separately hosted experiments communicate with Turkframe/PsiTurk
- Modify the
turkframePsiTurk project's config files, templates, styles, etc. to suit your needs. - Customize the inline script in
templates/exp.htmlto point Turkframe towards your experiment and register any custom message handlers. - Include a copy of the
turkframe.jsAPI in your experiment. - From your experiment, you may call
Turkframe.messageUp()to send custom messages to your handlers. - From your experiment, call
Turkframe.messageFinished()when ready to hand control back to PsiTurk.