CTATVideo - CMUCTAT/CTAT GitHub Wiki

CTATVideo

You can include a video in your tutor which can give you detailed logging information as to how students watch a piece of media. Even though this component can be tutored, it is more commonly used as an untutored component. Note that the video player can also playback audio files.

Code

Default video player, will not be graded:

<div id="videoplayer" class="CTATVideo"
     src="clip.mp4"></div>

Tutorable video player, will be graded based on a student clicking play/pause:

<div id="videoplayer" class="CTATVideo" data-ctat-tutor="true"
     src="clip.mp4"></div>

Running Example (graded)

CTATVideo Example

Attributes and Settings

  • id: Required. The name of the component, must be a valid html id name.
  • class: Required. The class list, must include CTATVideo and no other CTAT<component> classes.
  • src: URL A relative or fully qualified URL on a server that has appropriate CORS headers configured.
  • data-ctat-tutor: true or false. Default is false. Controls if direct actions on the component trigger grading.
  • data-ctat-autoplay: true or false. If true, the video automatically begins to play back as soon as it can do so without stopping to finish loading the data.
  • data-ctat-controls: true or false. Show a control panel at the bottom of the div in which the video plays

TPA Accessible Methods

Action Input Notes
PlayMedia URL Sets the media file for the player. If auto-start has been set, the video or audio will automatically start playing after the method has been called.

Style

.CTATVideo {}

Mass Production

Example for mass producing the video for a CTATVideo:

<div id="videoplayer" class="CTATVideo"
     src="%(video-src)%"></div>
⚠️ **GitHub.com Fallback** ⚠️