You can use the special command fullscreen
to send a fullscreen request to the participant’s browser. Note that the success of this command is dependent on each browser’s configuration. Most browsers will block fullscreen requests if they happen before the user has interacted with the page in any way, so only call this command after a click or a key press has happened.
Use exitFullscreen
to quit fullscreen mode
Example:
[js try=”true” try=”data” highlight=6,21]newTrial(
newButton(“Start the experiment and go fullscreen!”)
.print()
.wait()
,
fullscreen()
)
newTrial(
newScale(100)
.before( newText(“It is cold here”) )
.after( newText(“It is warm here”) )
.slider()
.print()
.wait()
)
SendResults()
newTrial(
exitFullscreen()
,
newText(“Thank you for your participation!”)
.print()
,
newTimer().wait()
)
[/js]
Index
- Tutorial
- Commands by element categories
- Standard Element Commands
- Audio element
- Button element
- Canvas element
- DropDown element
- EyeTracker element
- Function element
- Html element
- Image element
- Key element
- MediaRecorder element
- Scale element
- Selector element
- Text element
- TextInput element
- Timer element
- Tooltip element
- Var element
- Video element
- Youtube element
- Special clear command
- Special end command
- Global PennController Commands
- PennController
- PennController.AddHost
- PennController.AddTable
- PennController.CheckPreloaded
- PennController.Debug
- PennController.DownloadVoiceButton
- PennController.FeedItems
- PennController.Footer
- PennController.GetTable
- PennController.GetURLParameter
- PennController.Header
- PennController.InitiateRecorder
- PennController.PreloadZip
- PennController.ResetPrefix
- PennController.SendResults
- PennController.Sequence
- PennController.SetCounter
- PennController.Template
- Installing PennController
- Ontology
- Aesthetics
- Preloading resources
- ZIPped resources
- Spreadsheet (CSV)
- Canvas creation
- Setup for audio recordings collection