If you see this, something is wrong
First published on Tuesday, Dec 3, 2024 and last modified on Friday, Feb 20, 2026
Video objects can be incorporated in Documents Live.
The videos can be of two types:
The syntax is the following:
\begin{video}\label{}
\url{the URL to your video}
\caption{}
\type{}
\theme{}
\end{video}
Note: the previous \height command is deprecated. It will not break your document, but it will have no effect.
If the label is specified, there will be a number attached to the video. caption works like for images or tables.
If the type is not specified, it defaults to mp4. The other type are youtube, vimeo and mux.
If specified, a theme can be applied to the viseo player. For backward compatibility, you can specify one of the four keyword as a argument for the command: city, fantasy, forest and sea.
In general, the argument for the \theme command should a comma separated list of two values: a standard HTML color , and an integer that specifies the size of the controls. For instance, the video with subtitles uses the following command
\theme{red, 24}This means that the theme color will be set to red, and the controls will be sized at a value of 24px.
To use a pure HTML 5 video player, omit the \theme and the \type commands.
To render a YouTube video, you must specify the youtube type, and give as an argument of the \url command the URL that you get from YouTube when you want to share a video. In the following video, the link is
https://youtu.be/uykQe2l7cXc?si=3n55NW5ffVwqHEbvHere is the result.
To display a Vimeo video, give the video a type vimeo, and extract the digits from the URL given by Vimio for sharing. For instance, if the URL is
https://vimeo.com/1144110111?share=copy&fl=sv&fe=cithe numeric ID of the Vimeo video is
1144110111You must provide this ID as the URL for the video. In the next example, the full code is
\begin{video}
\url{1144110111}
\type{vimeo}
\end{video}Here is the corresponding video.
To display a video hosted by mux , select mux as the video type, and provide either
m3u8 suffix
In the next video, the URL is
https://stream.mux.com/a1r1sgxcBJI902avWpkNUGVdv2ukUfNtZ6ndsmEsX8Ug.m3u8and the playback ID is
a1r1sgxcBJI902avWpkNUGVdv2ukUfNtZ6ndsmEsX8UgHere is the result.
Vidéos subtitles can be stored in text files with the .srt extension. The text file is a list of subtitle entries with two components: the time stamp of the subtitle in the video, and the subtitle itself. You can edit the subtitles to fix transcription errors.
In the video declaration, you can add a \srt command which specifies the name of the subtitle file that you have uploaded to your LaTeX2Web project. When the subtitles are provided, LaTeX2Web provides a transcript component to the video. This component features the text of the subtitles with some extra LaTeX2Web magic: when you click on some subtitle text, the video is moved directly to the place where the caption stands.
This way, you can combine the speed of text reading with the extra video experience.
Here is an example with the following code.
\begin{video}
\theme{red, 24}
\url{a1r1sgxcBJI902avWpkNUGVdv2ukUfNtZ6ndsmEsX8Ug}
\type{mux}
\srt{DepuislemenuView.srt}
\end{video}And here is the result.
Video 1