As of June 2019, some browsers implement a new policy preventing multimedia content from automatically playing before the user has interacted with the page. As a consequence, do not assume playback will automatically start if this is the first thing that should happen when your participants land on the page of the experiment. Most often though, you will have a screen asking your participants to click a button or press a key before you try to play any video, which qualifies as an interaction enabling automatic playback later on.
Video elements let you add video streams to the page:
Creation:
newVideo("myVideo", "http://myserver/video.mp4")
Creates a <video>
tag in the cache.
By default, PennController is set to preload all resources, which means the trial will not start until the video stream is stored in the browser’s cache.
You can omit the host URL if:
– you have already added it to the list of host URLs with the command PennController.AddHost.
– or, the video file is contained in a Zip file (see the Using Zip files page)
[js]
newVideo(“myVideo”, “video.mp4”)
[/js]
Commands
[yadawiki-list category=”NonTest command,Video element”]
Tests
[yadawiki-list category=”Test command,Video element”]
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