Skip to main content

Interface: SessionOptions

Properties

activities

activities: Activity[]

The activities that compose this session

Defined in

m2c2kit/packages/session/src/SessionOptions.ts:7


activityCallbacks?

optional activityCallbacks: ActivityCallbacks

Callbacks executed when activity events occurs, such as when activity creates data or ends

Defined in

m2c2kit/packages/session/src/SessionOptions.ts:9


assetsUrl?

optional assetsUrl: string

URL of session assets folder (which contains wasm binary), if not the default location of "assets"

Defined in

m2c2kit/packages/session/src/SessionOptions.ts:15


autoEndAfterLastActivity?

optional autoEndAfterLastActivity: boolean

After the last activity ends or is canceled, should the session automatically end? Default is true

Defined in

m2c2kit/packages/session/src/SessionOptions.ts:27


autoGoToNextActivity?

optional autoGoToNextActivity: boolean

When an activity ends or is canceled, should the session automatically go to the next activity? Default is true

Defined in

m2c2kit/packages/session/src/SessionOptions.ts:25


autoStartAfterInit?

optional autoStartAfterInit: boolean

After the session initializes, should the session automatically start? Default is true

Defined in

m2c2kit/packages/session/src/SessionOptions.ts:23


dataStores?

optional dataStores: IDataStore[]

Array of one or more optional databases that implement the IDataStore interface for persisting data. For store item operations, the first data store will be used.

Defined in

m2c2kit/packages/session/src/SessionOptions.ts:17


diagnostics?

optional diagnostics: boolean

Should the session implement diagnostics that capture error events, show the user an error dialog, and stop the session if an m2c2kit error occurs? Default is false.

Remarks

URL params will override this setting.

Defined in

m2c2kit/packages/session/src/SessionOptions.ts:33


orientation?

optional orientation: "natural" | "landscape" | "portrait" | "portrait-primary" | "portrait-secondary" | "landscape-primary" | "landscape-secondary"

NOT IMPLEMENTED YET: Orientation the screen should be locked to for this session. Value will be passed into the ScreenOrientation.lock() Web API.

Defined in

m2c2kit/packages/session/src/SessionOptions.ts:35


rootElementId?

optional rootElementId: string

The id of the HTML element to use as the root element where m2c2kit activities will be rendered. Default is "m2c2kit".

Defined in

m2c2kit/packages/session/src/SessionOptions.ts:29


sessionCallbacks?

optional sessionCallbacks: SessionCallbacks

Callbacks executed when session events occur

Defined in

m2c2kit/packages/session/src/SessionOptions.ts:11


sessionUuid?

optional sessionUuid: string

Use a specified session UUID, rather than create a new one

Defined in

m2c2kit/packages/session/src/SessionOptions.ts:13


studyId?

optional studyId: string

The ID of the study (protocol, experiment, or other aggregate) that contains the repeated administrations of these sessions. The ID should be short, url-friendly, human-readable text (no spaces, special characters, or slashes), e.g., nyc-aging-cohort.

Defined in

m2c2kit/packages/session/src/SessionOptions.ts:19


studyUuid?

optional studyUuid: string

The unique identifier (UUID) of the study (protocol, experiment, or other aggregate) that contains the administration of this session.

Defined in

m2c2kit/packages/session/src/SessionOptions.ts:21


styleSheet?

optional styleSheet: string

Optional style sheet (CSS) to apply to the document instead of the default m2c2kit CSS. It is recommended to use the default CSS.

Defined in

m2c2kit/packages/session/src/SessionOptions.ts:31