Content and scoring
Video Stimulus
Watch a captioned video with a transcript.
Delivery
Respond, review and evaluate
Authoring
Visual editor available
No print view in this package

Try the interaction
Live example: @pie-element/video-stimulus@0.1.3 · players 1.0.0-beta.5.
Open all examples for this element →Use it in an item
Map the tag to an exact package version and match the model ID to the markup. The item player loads the views. You can use any frontend framework.
{
"elements": {
"video-stimulus": "@pie-element/video-stimulus@0.1.3"
},
"markup": "<video-stimulus id=\"example\"></video-stimulus>",
"models": [
{
"id": "example",
"element": "video-stimulus",
"language": "en",
"media": {
"version": 1,
"id": "lab-safety-demonstration",
"kind": "video",
"label": "Lab safety demonstration",
"description": "Watch how the student prepares to handle a heated container safely.",
"lang": "en",
"sources": [
{
"src": "/demo-assets/elements/video-stimulus/sample.webm",
"type": "video/webm"
}
],
"tracks": [
{
"src": "/demo-assets/elements/video-stimulus/captions-en.vtt",
"kind": "captions",
"lang": "en",
"label": "English",
"default": true
}
],
"transcript": {
"lang": "en",
"plainText": "Step one. Put on safety goggles before handling laboratory materials. Step two. Use heat-resistant gloves when touching a heated container. Step three. Place the container on a heat-safe surface, away from paper."
}
},
"presentation": {
"showLabel": true,
"showDescription": true,
"transcriptInitiallyExpanded": false
},
"accessibilityProfile": {
"audioContent": "meaningful",
"captionSupport": "track",
"visualSupport": "described"
}
}
]
} Responses and scoring
This element displays content and collects no scored response.
Model, configuration and session reference
The model holds content, configuration controls the editor, and the session holds the response. Fields below come from generated JSON Schemas.
Schema version: @pie-element/video-stimulus@0.1.5. Example version: 0.1.3. Use the schema matching your content. Schema checks cover data structure; controller validation checks authoring rules.
model fields (8)
| Field | Type | Meaning | Default / values |
|---|---|---|---|
idRequired | string | Identifier to identify the Pie Element in html markup, Must be unique within a pie item config. | — |
elementRequired | string | The html Element tag name: the key in the item config's `elements` map, e.g. "multiple-choice" | — |
accessibilityCatalogs | array | QTI-aligned accessibility catalogs whose cards dock to content nodes by `data-catalog-idref` | — |
mediaRequired | MediaAssetRef | The video: its sources, text tracks, transcript, label and description. Delivery reads it only when `version` is 1 and `kind` is `video`; `validate()` also requires `id`, `label`, `lang` and a playable source. | — |
language | string | The learner-facing strings' language, a BCP 47 tag; an invalid tag reads as `en`. | "en" |
presentation | VideoStimulusPresentation | What delivery shows around the video | — |
accessibilityProfile | VideoStimulusAccessibilityProfile | The author's accessibility declarations | — |
uiText | object | Overrides of the learner-facing strings by name; a blank value keeps the default | — |
Named object types
AccessibilityCatalog
| Field | Type | Meaning | Default / values |
|---|---|---|---|
identifierRequired | string | See the named type or the example model. | — |
cardsRequired | array | See the named type or the example model. | — |
CatalogCard
| Field | Type | Meaning | Default / values |
|---|---|---|---|
catalogRequired | string | See the named type or the example model. | — |
language | string | See the named type or the example model. | — |
content | string | See the named type or the example model. | — |
payload | CatalogCardPayload | See the named type or the example model. | — |
SignLanguageCardPayload
| Field | Type | Meaning | Default / values |
|---|---|---|---|
signLang | string | Language tag for the signed translation — BCP 47, which admits ISO 639-3 subtags for languages with no 639-1/2 code. "ase" is ASL, matching QTI 3 `xml:lang`. This is the language of the *adaptation*, not the item's base content language (AfA/PNP's `languageOfAdaptation`). The distinction is load bearing: a Spanish item's signed alternate is LSM, not ASL, so `signLang` must never be inferred from the item or assessment content language. Optional, and redundant on almost every card. The card's `language` states the same code and is the only field pie-players resolves a card on — resolution runs before anything knows the card is a signing card, so it can only key on the generic field — and the player falls back to it when this is absent. Author it only where the two differ: a card tagged with the item's content language (`language: 'en-US'`, `signLang: 'ase'`) so resolution reaches it by the default-language rung. The pie-api-aws importer emits `language` alone. | — |
mediaRequired | MediaAssetRef | See the named type or the example model. | — |
fragment | MediaFragmentRange | See the named type or the example model. | — |
MediaAssetRef
| Field | Type | Meaning | Default / values |
|---|---|---|---|
versionRequired | number | See the named type or the example model. | — |
idRequired | string | See the named type or the example model. | — |
kindRequired | MediaKind | See the named type or the example model. | — |
sourcesRequired | array | See the named type or the example model. | — |
poster | string | See the named type or the example model. | — |
thumbnail | string | See the named type or the example model. | — |
durationSeconds | number | See the named type or the example model. | — |
tracks | array | See the named type or the example model. | — |
transcript | TranscriptRef | See the named type or the example model. | — |
label | string | See the named type or the example model. | — |
description | string | See the named type or the example model. | — |
lang | string | Language of the asset itself, as authored metadata. Sign-language cards leave it unset: the card's `language` already states the adaptation language, and a second copy is a second thing to keep in agreement. | — |
MediaSource
| Field | Type | Meaning | Default / values |
|---|---|---|---|
srcRequired | string | See the named type or the example model. | — |
type | string | MIME type, e.g. "video/mp4". | — |
width | number | See the named type or the example model. | — |
height | number | See the named type or the example model. | — |
bitrate | number | See the named type or the example model. | — |
TextTrackRef
| Field | Type | Meaning | Default / values |
|---|---|---|---|
srcRequired | string | See the named type or the example model. | — |
kindRequired | string | See the named type or the example model. | —["captions","subtitles","descriptions","chapters","metadata"] |
langRequired | string | See the named type or the example model. | — |
labelRequired | string | See the named type or the example model. | — |
default | boolean | See the named type or the example model. | — |
TranscriptRef
| Field | Type | Meaning | Default / values |
|---|---|---|---|
src | string | See the named type or the example model. | — |
html | string | See the named type or the example model. | — |
plainText | string | See the named type or the example model. | — |
lang | string | See the named type or the example model. | — |
MediaFragmentRange
| Field | Type | Meaning | Default / values |
|---|---|---|---|
startSecondsRequired | number | See the named type or the example model. | — |
endSeconds | number | See the named type or the example model. | — |
SpokenAudioCardPayload
| Field | Type | Meaning | Default / values |
|---|---|---|---|
mediaRequired | MediaAssetRef | See the named type or the example model. | — |
fragment | MediaFragmentRange | See the named type or the example model. | — |
VideoStimulusPresentation
| Field | Type | Meaning | Default / values |
|---|---|---|---|
showLabel | boolean | `false` hides `media.label` visually; it stays the video's accessible name | true |
showDescription | boolean | `false` hides `media.description` | true |
transcriptInitiallyExpanded | boolean | Opens the transcript on first render | false |
VideoStimulusAccessibilityProfile
| Field | Type | Meaning | Default / values |
|---|---|---|---|
audioContent | AudioContentDeclaration | Whether the audio carries meaning; `meaningful` requires captions | "unknown" |
captionSupport | CaptionSupportDeclaration | How captions are provided; `track` requires a valid captions track in `media.tracks` | "unknown" |
visualSupport | VisualSupportDeclaration | Whether the visuals are described; `missing` fails validation | "unknown" |
configuration fields (3)
| Field | Type | Meaning | Default / values |
|---|---|---|---|
media | ConfigureProp | Not read | — |
presentation | ConfigureProp | Not read | — |
accessibilityProfile | ConfigureProp | Not read | — |
Named object types
ConfigureProp
| Field | Type | Meaning | Default / values |
|---|---|---|---|
settings | boolean | Indicates if the item has to be displayed in the Settings Panel | — |
label | string | Indicates the label for the item that has to be displayed in the Settings Panel | — |
session fields (2)
| Field | Type | Meaning | Default / values |
|---|---|---|---|
id | string | Identifier of the session | — |
element | string | The element the session belongs to | — |
Accessibility and content requirements
PIE targets WCAG 2.2 AA. Provide clear prompts and media alternatives, and test the question with a keyboard and assistive technology. Manual testing is still incomplete; see the coverage notes below.
Accessibility and evidence · Element coverage tracking(opens in new tab)
Element package source(opens in new tab) · Example source(opens in new tab) · Snapshot cb30a68f