← Element library

Content and scoring

Video Stimulus

Watch a captioned video with a transcript.

Delivery

Respond, review and evaluate

Authoring

Visual editor available

Print

No print view in this package

The title "Lab safety demonstration" and the description "Watch how the student prepares to handle a heated container safely." above a "Show transcript" button and a paused 12-second video whose first frame shows safety goggles and the words "Captions and transcript provided".
Video Stimulus example

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"
      }
    }
  ]
}

Embed an item · Embed authoring · Print integration

Responses and scoring

This element displays content and collects no scored response.

Scoring, partial credit and rubrics →

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)
FieldTypeMeaningDefault / values
idRequiredstringIdentifier to identify the Pie Element in html markup, Must be unique within a pie item config.—
elementRequiredstringThe html Element tag name: the key in the item config's `elements` map, e.g. "multiple-choice"—
accessibilityCatalogsarrayQTI-aligned accessibility catalogs whose cards dock to content nodes by `data-catalog-idref`—
mediaRequiredMediaAssetRefThe 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.—
languagestringThe learner-facing strings' language, a BCP 47 tag; an invalid tag reads as `en`."en"
presentationVideoStimulusPresentationWhat delivery shows around the video—
accessibilityProfileVideoStimulusAccessibilityProfileThe author's accessibility declarations—
uiTextobjectOverrides of the learner-facing strings by name; a blank value keeps the default—

Named object types

AccessibilityCatalog
FieldTypeMeaningDefault / values
identifierRequiredstringSee the named type or the example model.—
cardsRequiredarraySee the named type or the example model.—
CatalogCard
FieldTypeMeaningDefault / values
catalogRequiredstringSee the named type or the example model.—
languagestringSee the named type or the example model.—
contentstringSee the named type or the example model.—
payloadCatalogCardPayloadSee the named type or the example model.—
SignLanguageCardPayload
FieldTypeMeaningDefault / values
signLangstringLanguage 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.—
mediaRequiredMediaAssetRefSee the named type or the example model.—
fragmentMediaFragmentRangeSee the named type or the example model.—
MediaAssetRef
FieldTypeMeaningDefault / values
versionRequirednumberSee the named type or the example model.—
idRequiredstringSee the named type or the example model.—
kindRequiredMediaKindSee the named type or the example model.—
sourcesRequiredarraySee the named type or the example model.—
posterstringSee the named type or the example model.—
thumbnailstringSee the named type or the example model.—
durationSecondsnumberSee the named type or the example model.—
tracksarraySee the named type or the example model.—
transcriptTranscriptRefSee the named type or the example model.—
labelstringSee the named type or the example model.—
descriptionstringSee the named type or the example model.—
langstringLanguage 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
FieldTypeMeaningDefault / values
srcRequiredstringSee the named type or the example model.—
typestringMIME type, e.g. "video/mp4".—
widthnumberSee the named type or the example model.—
heightnumberSee the named type or the example model.—
bitratenumberSee the named type or the example model.—
TextTrackRef
FieldTypeMeaningDefault / values
srcRequiredstringSee the named type or the example model.—
kindRequiredstringSee the named type or the example model.—["captions","subtitles","descriptions","chapters","metadata"]
langRequiredstringSee the named type or the example model.—
labelRequiredstringSee the named type or the example model.—
defaultbooleanSee the named type or the example model.—
TranscriptRef
FieldTypeMeaningDefault / values
srcstringSee the named type or the example model.—
htmlstringSee the named type or the example model.—
plainTextstringSee the named type or the example model.—
langstringSee the named type or the example model.—
MediaFragmentRange
FieldTypeMeaningDefault / values
startSecondsRequirednumberSee the named type or the example model.—
endSecondsnumberSee the named type or the example model.—
SpokenAudioCardPayload
FieldTypeMeaningDefault / values
mediaRequiredMediaAssetRefSee the named type or the example model.—
fragmentMediaFragmentRangeSee the named type or the example model.—
VideoStimulusPresentation
FieldTypeMeaningDefault / values
showLabelboolean`false` hides `media.label` visually; it stays the video's accessible nametrue
showDescriptionboolean`false` hides `media.description`true
transcriptInitiallyExpandedbooleanOpens the transcript on first renderfalse
VideoStimulusAccessibilityProfile
FieldTypeMeaningDefault / values
audioContentAudioContentDeclarationWhether the audio carries meaning; `meaningful` requires captions"unknown"
captionSupportCaptionSupportDeclarationHow captions are provided; `track` requires a valid captions track in `media.tracks`"unknown"
visualSupportVisualSupportDeclarationWhether the visuals are described; `missing` fails validation"unknown"
Open the complete JSON Schema
configuration fields (3)
FieldTypeMeaningDefault / values
mediaConfigurePropNot read—
presentationConfigurePropNot read—
accessibilityProfileConfigurePropNot read—

Named object types

ConfigureProp
FieldTypeMeaningDefault / values
settingsbooleanIndicates if the item has to be displayed in the Settings Panel—
labelstringIndicates the label for the item that has to be displayed in the Settings Panel—
Open the complete JSON Schema
session fields (2)
FieldTypeMeaningDefault / values
idstringIdentifier of the session—
elementstringThe element the session belongs to—
Open the complete JSON Schema

How to use the schemas →

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