Skip to content

Conversation

@joe-replin
Copy link
Contributor

Update

  • Updated example.json to include _video in tracking configuration
  • Updated config.schema.json to include schema definition for _video tracking flag

New

  • Added video tracking functionality to capture learner interactions with video content
  • Created five new statement models following the xAPI Video Profile:
    • VideoStatementModel - Base class for all video statements
    • VideoPlayedStatementModel - Tracks when a video starts playing
    • VideoPausedStatementModel - Tracks when a video is paused, including progress and played segments
    • VideoSeekedStatementModel - Tracks video seeking behavior
    • VideoInteractedStatementModel - Tracks video interactions like playback rate, captions, volume, and transcript toggles
    • VideoCompletedStatementModel - Tracks video completion with progress counts
  • Added _video tracking flag (defaults to false) in the _tracking configuration
  • Added helper methods getTotalVideos() and getCompletedVideos() to track course wide video progress
  • Added eight video event listeners in StatementModel:
    • video:play - Video playback started
    • video:pause - Video playback paused
    • video:seeked - User seeked to different time in video
    • video:rateChange - Playback speed changed
    • video:captionsChange - Captions toggled
    • video:volumeChange - Volume adjusted
    • video:mediaComplete - Video watched to completion
    • video:transcriptToggle - Transcript opened or closed
  • Video statements include session ID, video length, current time, progress percentage, played segments, and total/completed video counts

Testing

  1. Enable video tracking in config.json by setting "_video": true in the _tracking object
  2. Add a media component to a course page
  3. Interact with the video by playing, pausing, seeking, adjusting volume, changing playback speed, and toggling captions
  4. Verify xAPI statements are sent to the LRS for each interaction
  5. Check that video completion statements include total and completed video counts
  6. Verify statements follow the xAPI Video Profile specification

@joe-replin joe-replin changed the title New: Add video tracking support for xAPI statements (fixes: #43) New: PR# 3 Add video tracking support (fixes: #43) Nov 10, 2025
@joe-replin joe-replin linked an issue Nov 10, 2025 that may be closed by this pull request
@joe-replin joe-replin changed the title New: PR# 3 Add video tracking support (fixes: #43) New: PR#3 Add video tracking support (fixes: #43) Nov 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Video Tracking Statements

3 participants