Registry / http-networking / mkdocs-video

mkdocs-video

JSON →
library1.5.0pypypiunverified

mkdocs-video is a Python plugin for MkDocs that simplifies embedding videos into documentation pages using a straightforward Markdown syntax. The current version is 1.5.0, which features a rewritten HTML parsing mechanism using `lxml.html` for more granular configuration with Python-Markdown's Attribute Lists extension. The project maintains an active, though irregular, release cadence.

pip install mkdocs-video
INSTALL
IMPORT
SIG · MKDOCS-VIDEO
M
mkdocs-video
http-networkingpythonv1.5.0
Install
3.5s avg
Import
Disk
44MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
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
musl
py 3.103.910 runs
installs and imports cleanly · install 0.0s · import 0.000s · 44.9MB
glibc
py 3.103.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 `![type:video](path/to/video.mp4)`. 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 ![type:video](videos/my_local_video.mp4) # Embed a YouTube video ![type:video](https://www.youtube.com/watch?v=VIDEO_ID) # Embed a video with specific attributes using Attribute Lists (requires markdown_extensions: # - attr_list in mkdocs.yml, available since mkdocs-video v1.5.0) ![type:video](videos/another_video.mp4){: 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.
fix
Review 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.
fix
Enable `markdown_extensions: - attr_list` in your `mkdocs.yml`. Then, in your Markdown, add attributes like `![video](path.mp4){: 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.
fix
Ensure `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.
fix
Upgrade 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.
Agent activity
4 hits · last 30 days
node
2
Resources