API Docs for: 0.5.1
Show:

ExpVideoPhysics Class

Test trial for the 'Your baby the physicist' study: audio instructions, intro video, and test video, with webcam recording.

Methods

exitFullscreen

()
Exit fullscreen mode

serializeContent

(
  • videosShown
  • eventTimings
  • videoID
)
Object

Parameters captured and sent to the server

Parameters:

  • videosShown Array

    Sources of videos (potentially) shown during this trial: [source of test video, source of alternate test video].

  • eventTimings Object
  • videoID String

    The ID of any webcam video recorded during this frame

Returns:

Object:

The payload sent to the server

showFullscreen

()
Make a specified element fullscreen

Properties

altSources

Array

Array of objects specifying video src and type for alternate test video, as for sources.

Default: []

Sub-properties:

attnSources

Array

Array of objects specifying attention-grabber video src and type, as for sources.

Default: []

Sub-properties:

audioSources

Array

List of objects specifying music audio src and type, as for audioSources.

Default: []

Sub-properties:

audioSources

Array

List of objects specifying intro announcement src and type. Example: [{'src': 'http://.../audio1.mp3', 'type': 'audio/mp3'}, {'src': 'http://.../audio1.ogg', 'type': 'audio/ogg'}]

Default: []

Sub-properties:

autoforwardOnEnd

Boolean

Whether to automatically advance to the next frame when video is complete. Generally leave this true, since controls will be hidden for fullscreen videos.

Default: true

autoplay

Boolean

Whether to automatically start the trial on load.

Default: true

fsButtonID

String
The element ID of a button to show if the user leaves fullscreen mode

fullScreenElementId

String
The element ID of the thing to make full screen (video element, div, etc)

introSources

Array

Array of objects specifying intro video src and type, as for sources.

Default: []

Sub-properties:

isLast

Boolean

Whether this is the last exp-physics-video frame in the group, before moving to a different frame type. (If so, play only the intro audio, no actual tests.)

Default: false

poster

String

Source URL for an image to show until the video starts playing.

Default: ''

sources

Array

Array of objects specifying video src and type for test video (these should be the same video, but multiple sources--e.g. mp4 and webm--are generally needed for cross-browser support). Example value:

[{'src': 'http://.../video1.mp4', 'type': 'video/mp4'}, {'src': 'http://.../video1.webm', 'type': 'video/webm'}]

Default: []

Sub-properties:

testLength

Number

Length to loop test videos, in seconds

Default: 20

Events

nextFrame

Move to next frame