Install & Compatibility
Where this runs
tested against v1.5.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.910 runs
installs and imports cleanly · install 0.0s · import 0.000s · 44.9MB
glibcpy 3.10–3.910 runs
installs and imports cleanly · install 3.5s · import 0.000s · 46MB
44MB installed
● package 44MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
mkdocs-video
✓ # In mkdocs.yml
plugins:
- mkdocs-video
MkDocs plugins are enabled via the `mkdocs.yml` configuration file, not directly imported in Python code.
To quickly get started, install the package and then enable the `mkdocs-video` plugin in your `mkdocs.yml` file under the `plugins` section. You can then embed videos in your Markdown files using a simple image-like syntax with ``. For fine-grained control, especially with version 1.5.0 and newer, enable the `attr_list` Markdown extension and use attribute lists in your Markdown.
# mkdocs.yml
site_name: My Docs with Videos
plugins:
- mkdocs-video: # Minimal configuration
is_video: True # Optional: Forces <video> tag over <iframe>
# docs/index.md
# Embed a local video

# Embed a YouTube video

# Embed a video with specific attributes using Attribute Lists (requires markdown_extensions:
# - attr_list in mkdocs.yml, available since mkdocs-video v1.5.0)
{: autoplay loop muted style='width: 80%;'}
Debug
Known issues
breakingVersion 1.5.0 introduced a rewrite of the HTML parsing mechanism using `lxml.html`. While designed for more granular control with Attribute Lists, existing configurations or custom styles that relied on the previous parsing behavior might require adjustments.fixReview your `mkdocs.yml` and Markdown for video embedding. Ensure compatibility with the `Attribute Lists` extension if leveraging new granular controls. Test your documentation build thoroughly after upgrading.
affects: >=1.5.0
gotchaPlugin configuration parameters set in `mkdocs.yml` are applied globally to all relevant video elements. To fine-tune individual video elements, you must use the Python-Markdown `Attribute Lists` extension, which will override corresponding plugin attributes for that specific video.fixEnable `markdown_extensions: - attr_list` in your `mkdocs.yml`. Then, in your Markdown, add attributes like `{: style='width:50%' autoplay}` to apply per-video settings. affects: >=1.0.0
gotchaEarlier versions of `mkdocs-video` (specifically before v1.1.0) had a 'relative paths error' when used with `mkdocs` versions `>= 1.2`. While fixed in `mkdocs-video` v1.1.0, users with older plugin versions or specific MkDocs environments might encounter issues with relative video paths.fixEnsure `mkdocs-video` is updated to version 1.1.0 or newer. If you are using `mkdocs` version 1.2 or higher, this issue should be resolved by updating the plugin.
affects: <1.1.0
gotchaA bug in MkDocs 1.5.0 could cause `mkdocs serve` to sometimes lock up all browser tabs when navigating quickly. Although this was fixed in MkDocs 1.5.3, users running MkDocs 1.5.0 or 1.5.1 might experience this issue while developing.fixUpgrade your `MkDocs` installation to version 1.5.3 or newer to mitigate this issue. `pip install --upgrade mkdocs`.
affects: mkdocs-video (all), MkDocs (1.5.0, 1.5.1)
Upgrade
Version history
1.5.0latest on PyPI · released Mar 17, 2023
Audit
Dependencies
mkdocsrequiredThis is an MkDocs plugin and requires MkDocs to function.
lxmlrequiredUsed for HTML parsing, especially since version 1.5.0.