Package: mkdocs-video
MkDocs VideoThis plugin allows you to embed videos on the documentation pages using a simple Markdown syntax.ContentsInstallationUsageConfigurationMarkerStyleTag<video>Video typeVideo autoplayVideo loopVideo mutedVideo controlsEmbedding examplesInstallationInstall the package with pip:$pipinstallmkdocs-videoEnable the plugin in themkdocs.ymlfile:plugins:-mkdocs-videoSee how to useMkDocs PluginsUsageTo add a video to the final documentation page, you need to use the Markdown syntax for images with aspecific name(hereinaftermarker).See how to useMarkdown syntaxExample:content folder structure├── content
|   ├── ...
│   ├── video.md
│   └── videos
│       └── costa_rica.mp4
└── mkdocs.ymlvideo.md# Video example

Lorem ipsum dolor sit amet

![type:video](https://www.youtube.com/embed/LXb3EKWsInQ)<mkdocs-url>/videoYou can also use relative paths for videos stored together with your content![type:video](./videos/costa_rica.mp4)ConfigurationThe following parameters can be used to change the functionality and appearance of video elements in the final HTML. Keep in mind that the plugin configuration parameters are applied globally to all relevantmarkedelements. To fine-tune each video element, you can use theAttribute Listsextension.When using this plugin and the mentioned extension together, the following rules apply(with an illustrative examples):[Let's assume we have this plugin configuration]# mkdocs.ymlmarkdown_extensions:-attr_listplugins:-mkdocs-video:is_video:Truevideo_muted:Truevideo_controls:Truecss_style:width:"50%"The plugin attributes are used globally by default![type:video](video.mp4)<videostyle="width:50%"muted=""controls=""alt="type:video"><sourcesrc="video.mp4"type="video/mp4"></video>The extension attributes will override the corresponding plugin attributes, but the rest will remain by default.![type:video](video.mp4){: style='width: 100%'}<videostyle="width: 100%"muted=""controls=""alt="type:video"><sourcesrc="video.mp4"type="video/mp4"></video>The plugin attributes can be disabled for specific video element by addingdisable-global-configattribute.![type:video](video.mp4){: disable-global-config style='width: 100%'}<videoalt="type:video"style="width: 100%"><sourcesrc="video.mp4"type="video/mp4"></video>The extension attributesrcwill override video source... Do what you want with this info 🙃.![type:video](video.mp4){: src='another-video.mp4'}<videostyle="width:50%"muted=""controls=""alt="type:video"><sourcesrc="another-video.mp4"type="video/mp4"></video>MarkerBy default, the stringtype:videois used as amarkerin the Markdown syntax.You can change this value by adding the following lines to yourmkdocs.yml:plugins:-mkdocs-video:mark:"custom-marker"Now you can use thismarkerin the Markdown syntax:![custom-marker](https://www.youtube.com/embed/LXb3EKWsInQ)StyleBy default, the following CSS styles are used for the<iframe>tag that is inserted into the final page:position:relative;width:100%;height:22.172vw;You can change the style by adding the following lines to yourmkdocs.yml:plugins:-mkdocs-video:css_style:width:"100%"height:"22.172vw"...Tag<video>By default, the<iframe>tag will be used to display the video in the final page, but in some cases you may need to use<video>tag instead. You can use it by adding the following lines to yourmkdocs.yml:plugins:-mkdocs-video:is_video:True...Video typeThis parameter will only work with the<video>tag (is_video: True)You can specify the MIME type of the video(default:mp4)resource by adding the following lines to yourmkdocs.yml:plugins:-mkdocs-video:is_video:Truevideo_type:ogg...Video autoplayThis parameter will only work with the<video>tag (is_video: True)You can specify whether the video should be played automatically(default:False)or not by adding the following lines to yourmkdocs.yml:plugins:-mkdocs-video:is_video:Truevideo_autoplay:True...The operation of this parameter may be affected by browser settings or video provider configurationVideo loopThis parameter will only work with the<video>tag (is_video: True)You can specify whether the video should be looped(default:False)or not by adding the following lines to yourmkdocs.yml:plugins:-mkdocs-video:is_video:Truevideo_loop:True...The operation of this parameter may be affected by browser settings or video provider configurationVideo mutedThis parameter will only work with the<video>tag (is_video: True)You can specify whether the video should be muted(default:False)or not by adding the following lines to yourmkdocs.yml:plugins:-mkdocs-video:is_video:Truevideo_muted:True...The operation of this parameter may be affected by browser settings or video provider configurationVideo controlsThis parameter will only work with the<video>tag (is_video: True)You can specify whether the video controls should be displayed(default:True)or not by adding the following lines to yourmkdocs.yml:plugins:-mkdocs-video:is_video:Truevideo_controls:False...The operation of this parameter may be affected by browser settings or video provider configurationEmbedding examplesThe following list contains some of the popular services, as well as examples of direct and embedded links to their videos.YouTubehttps://www.youtube.com/watch?v=iSpglxHTJVMhttps://www.youtube.com/embed/iSpglxHTJVMVimeohttps://vimeo.com/224903454https://player.vimeo.com/video/224903454Dailymotionhttps://www.dailymotion.com/video/x7ogfqohttps://www.dailymotion.com/embed/video/x7ogfqoFacebook Watchhttps://www.facebook.com/gamechangersmovie/videos/343098689705587https://www.facebook.com/plugins/video.php?href=https://www.facebook.com/gamechangersmovie/videos/343098689705587ContributingFork it.Create your feature branch:git checkout -b my-new-featureCommit your changes:git commit -am 'Add some feature'Push to the branch:git push origin my-new-featureSubmit a pull requestLicenseThe MIT License (MIT)Copyright (c) 2023 Mikalai LisitsaPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.Did you like it?