Before you keep reading...
Runestone Academy can only continue if we get support from individuals like you. As a student you are well aware of the high cost of textbooks. Our mission is to provide great books to you for free, but we ask that you consider a $10 donation, more if you can or less if $10 is a burden.
Before you keep reading...
Making great stuff takes time and $$. If you appreciate the book you are reading now and want to keep quality materials free for other students please consider a donation to Runestone Academy. We ask that you consider a $10 donation, but if you can give more thats great, if $10 is too much for your budget we would be happy with whatever you can afford as a show of support.
video directive embeds video in multiple formats on a page.
The general format of the
video directive is:
.. ``video``:: unique_id :options: + --- Content area --- | | one or more references to video files or URL's | + --------------------
For an alternative to embed directly to youtube, use the YouTube and Vimeo directive.
- unique id
A unique identifier after a space and the
videodirective. Valid identifiers must not contain spaces. You should also avoid the characters `` `
- content area
videodirective must contain at least one line of content.
The content can be either a file reference to a video, or a url to a video resource, one line per video.
You can specify as many video sources as you need. One in
.movformat and another in
.webmformat is generally enough to cover most browsers. The first format that works is the one that is played.
Boolean. If present, include the usual set of video controls:
Play, Pause, Rewind, and Fast Forward.
If not present, the video will automatically play when the page is loaded.
Boolean. If present, the video will loop continuously. Default is
Boolean. If present, load the video in the background when the page loads. Default is
false. The video will begin to download when ‘play’ is pressed.
String. Define a thumbnail for the video.
The string parameter defines the path to the image that should serve as the thumbnail:
Relative paths are relative to the current file location.
:thumb:is used, then the thumbnail image is displayed until the reader clicks on the thumbnail. Clicking on the thumbnail will cause the full video to appear at full size on the page.
:thumb:directive is not present, then the video will appear on the page in its full size.
Sphinx configuration options¶
No directive specific configuration options exist.
.. video:: video-ex1 :controls: :thumb: /_images/whileloop.png http://media.interactivepython.org/thinkcsVideos/whileloop.mov http://media.interactivepython.org/thinkcsVideos/whileloop.webm
Logs and Grading¶
Video directives are not tied to the grading interface. Interactions are logged in the database: each time a video is played, it is logged.
If you have logged-in users, you can have a log of who has played it.
If login is not required, a log of how many times it has been played is retained.