Skip to content

Information Interface

Bryan Fox edited this page Nov 16, 2018 · 6 revisions

Purpose

Interface for explaining following interfaces using text/video/audio.

An Information Interface presents a series of items in sequence, similar to prompts in other interfaces. Each item must contain a unique "id" prop and be identified as of the content types below (text, video, image, or audio).

Behavior

Displays static text content and media relevant to explaining the next steps for the participant during an interview. Audio/Video media is autoplayed and rendered with controls.

Content types

Text

Displays as a block of text with formatting using markdown.

{ "type": "text", "content": "Some arbitrary text content that can contain **markdown** tags." }
Property Possible Values
Content Text including markdown

Image

Displays as a full-sized graphic.

{ "type": "image", "content": "rubberduck.jpg", "description": "A text description of the content of the image" }
Property Possible Values Purpose
content name of a file stored in /assets/ e.g. /assets/rubberduck.jpg
description plain text image alt text, in case the image could not be loaded.

Audio

Displays as a html5 audio control, and autoplays media.

{ "type": "audio", "content": "click_the_thing.mp3", "description": "A text description of the content of the audio" }
Property Possible Values Purpose
content name of a file stored in /assets/, e.g. /assets/click_the_thing.mp3
description plain text fallback text in the case that audio format is not supported.

Video

Displays as a html5 video control, and autoplays media.

{ "type": "video", "content": "walkthough.webm", "description": "A text description of the content of the video" }
Property Possible Values Purpose
content name of a file stored in /assets/, e.g. /assets/walkthough.webm
description plain text fallback text in the case that video format is not supported.

General Interface API

See General Interface API.

Interface Specific API

In addition to all properties specified in the general interface API, this interface has the following parameters:

Property Possible Values Purpose
title
Required
A string of text This string is displayed as large text at the top of the interface content (which is vertically centered)
items
Optional

Default: Won't display any content
An array of content item objects Content items are stacked vertically and rendered according to their type

Example usage

{
  // ...required stage parameters
  "type": "Information",
  "title": "Large title text",
  "items": [
    { "id":"1", "type": "text", "content": "Some arbitrary text content that can contain **markdown** tags." },
    { "id":"2", "type": "audio", "content": "click_the_thing.mp3", "description": "A text description of the content of the audio" },
    { "id":"3", "type": "image", "content": "rubberduck.jpg", "description": "A text description of the content of the image" },
    { "id":"4", "type": "video", "content": "walkthough.webm", "description": "A text description of the content of the video" }
  ]
},
// ...