10.3. Video Components#
You can add video components to any container in your course (such as a vertical or sequential). Studio places all video components inside verticals (which it calls units).
10.3.1. Create the XML File for a Video Component#
To add a video component to your course, add it to the course XML tree as follows.
<video
youtube="1.00:o2pLltkrhGM"
url_name="Introduction_Lecture"
display_name="Introduction Lecture"
youtube_id_1_0="o2pLltkrhGM">
</video>
If you prefer to place the video component in its own file, you create an XML
file in the video
directory for each video component in your course.
The name of the XML file must match the value of the @url_name attribute of the
video
element in the vertical XML file.
For example, the vertical XML file uses the following format.
<vertical display_name="Lesson_1_Unit_1">
<video url_name="Introduction_Lecture"/>
. . .
</vertical>
You create the file video/Introduction_Lecture.xml
to define the video
component.
10.3.2. Video Component XML File Elements#
The root element of the XML file for the HTML component is file is video
.
The video
element contains a single source
element.
10.3.2.1. source
Element#
The source
element contains the following attribute.
Attribute |
Meaning |
---|---|
|
The file path for the video file. |
10.3.3. video
Element Attributes#
Attribute |
Meaning |
---|---|
|
Required. The value that is displayed to students as the name of the
video component. If you do not supply a |
|
The speed and ID pairings for the YouTube video source. The value can contain multiple speed:ID pairs, separated by commas. |
|
Whether students can download the video track. |
|
Whether students can download the video. |
|
The file path for the HTML5 version of the video. |
|
Whether students can view the video captions. |
|
TBD |
|
TBD |
|
The YouTube ID for the video that plays at 75% normal speed. |
|
The YouTube ID for the video that plays at 100% normal speed. |
|
The YouTube ID for the video that plays at 125% normal speed. |
|
The YouTube ID for the video that plays at 150% normal speed. |
10.3.4. Example Video Component XML File#
The following example shows an XML file for a video component.
<video
youtube="0.75:xGKlr7nT_Zw,1.00:o2pLltkrhGM,1.25:XGsB9bA6rGU,1.50:_HuIF16HdTA"
url_name="Introduction_Lecture"
display_name="Introduction Lecture"
download_video="true"
html5_sources="["https://s3.amazonaws.com/edx-course-videos/school/DemoCourseIntroductionVideo.mov"]"
source=""
youtube_id_0_75="xGKlr7nT_Zw"
youtube_id_1_0="o2pLltkrhGM"
youtube_id_1_25="XGsB9bA6rGU"
youtube_id_1_5="_HuIF16HdTA">
<source src="https://s3.amazonaws.com/edx-course-videos/mit-6002x/6002-Tutorial-00010_100.mov"/>
</video>